plot.slopetest: Create an interaction plot from an object of class...

Description Usage Arguments Value Examples

View source: R/plot_slopeDif.R

Description

Creates an interaction plot comparing high and low values of X at high and low value combinations of Z and W.

Usage

1
plot(x, legLoc = "topright", ...)

Arguments

x

An object of class "slopetest". The result of an slopeDif() function.

legLoc

A string. Where should the legend be located? Default = "topright".

...

Additional arguments passed to plot().

Value

A three-way interaction plot

Examples

 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)

RobertGM111/mixedPowerSim documentation built on Jan. 19, 2021, 12:34 a.m.