Description Usage Arguments Value Examples
View source: R/plot_slopeDif.R
Creates an interaction plot comparing high and low values of X at high and low value combinations of Z and W.
1 |
x |
An object of class "slopetest". The result of an |
legLoc |
A string. Where should the legend be located? Default = "topright". |
... |
Additional arguments passed to |
A three-way interaction plot
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | library(mixedPowerSim)
library(lme4)
nCluster <- 20
nObs <- 15
db0 <- .1
db1 <- .1
db2 <- .1
db3 <- .1
db4 <- .1
db5 <- .1
db6 <- .1
db7 <- .1
SDb0 <- 1
SDresid <- 5
simDat <- simMixedXYZ(nCluster = nCluster, nObs = nObs,
db0 = db0, db1 = db1, db2 = db2,
db3 = db3, db4 = db4, db5 = db5, db6 = db6, db7 = db7,
SDb0 = SDb0, SDresid = SDresid, XWithin = TRUE, ZWithin = FALSE, WWithin = TRUE)
mod <- lmer(Y~X * Z * W + (1|Cluster), data = simDat$simulatedData)
difTest <- slopeDif(mod)
plot(difTest)
## OR
plot(difTest)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.