View source: R/probeInteraction.R
probe2WayMC | R Documentation |
Probing interaction for simple intercept and simple slope for the no-centered or mean-centered latent two-way interaction
probe2WayMC(fit, nameX, nameY, modVar, valProbe, group = 1L,
omit.imps = c("no.conv", "no.se"))
fit |
A fitted lavaan::lavaan or lavaan.mi::lavaan.mi object with a latent 2-way interaction. |
nameX |
|
nameY |
The name of factor that is used as the dependent variable. |
modVar |
The name of factor that is used as a moderator. The effect of
the other independent factor will be probed at each value of the
moderator variable listed in |
valProbe |
The values of the moderator that will be used to probe the effect of the focal predictor. |
group |
In multigroup models, the label of the group for which the
results will be returned. Must correspond to one of
|
omit.imps |
|
Before using this function, researchers need to make the products of the
indicators between the first-order factors using mean centering (Marsh, Wen,
& Hau, 2004). Note that the double-mean centering may not be appropriate for
probing interaction if researchers are interested in simple intercepts. The
mean or double-mean centering can be done by the indProd()
function. The indicator products can be made for all possible combination or
matched-pair approach (Marsh et al., 2004). Next, the hypothesized model
with the regression with latent interaction will be used to fit all original
indicators and the product terms. See the example for how to fit the product
term below. Once the lavaan result is obtained, this function will be used
to probe the interaction.
Let that the latent interaction model regressing the dependent variable
(Y
) on the independent variable (X
) and the moderator (Z
)
be
Y = b_0 + b_1X + b_2Z + b_3XZ + r,
where b_0
is the
estimated intercept or the expected value of Y
when both X
and
Z
are 0, b_1
is the effect of X
when Z
is 0,
b_2
is the effect of Z
when X
is 0, b_3
is the
interaction effect between X
and Z
, and r
is the residual
term.
To probe a two-way interaction, the simple intercept of the independent variable at each value of the moderator (Aiken & West, 1991; Cohen, Cohen, West, & Aiken, 2003; Preacher, Curran, & Bauer, 2006) can be obtained by
b_{0|X = 0, Z} = b_0 + b_2 Z.
The simple slope of the independent varaible at each value of the moderator can be obtained by
b_{X|Z} = b_1 + b_3 Z.
The variance of the simple intercept formula is
Var\left(b_{0|X = 0, Z}\right) =
Var\left(b_0\right) + 2Z \times Cov\left(b_0, b_2\right) +
Z^2 \times Var\left(b_2\right)
,
where Var
denotes the variance of a parameter
estimate and Cov
denotes the covariance of two parameter estimates.
The variance of the simple slope formula is
Var\left(b_{X|Z}\right) = Var\left(b_1\right) + 2Z \times
Cov\left(b_1, b_3\right) + Z^2 \times Var\left(b_3\right)
Wald z statistic is used for test statistic (even for objects of class lavaan.mi::lavaan.mi).
A list with two elements:
SimpleIntercept
: The simple intercepts given each value of the
moderator.
SimpleSlope
: The simple slopes given each value of the moderator.
In each element, the first column represents the values of the moderator
specified in the valProbe
argument. The second column is the simple
intercept or simple slope. The third column is the SE of the simple
intercept or simple slope. The fourth column is the Wald (z)
statistic, and the fifth column is the associated p value testing
the null hypothesis that each simple intercept or slope is 0.
Sunthud Pornprasertmanit (psunthud@gmail.com)
Terrence D. Jorgensen (University of Amsterdam; TJorgensen314@gmail.com)
Tutorial:
Schoemann, A. M., & Jorgensen, T. D. (2021). Testing and interpreting
latent variable interactions using the semTools
package.
Psych, 3(3), 322–335. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.3390/psych3030024")}
Background literature:
Aiken, L. S., & West, S. G. (1991). Multiple regression: Testing and interpreting interactions. Newbury Park, CA: Sage.
Cohen, J., Cohen, P., West, S. G., & Aiken, L. S. (2003). Applied multiple regression/correlation analysis for the behavioral sciences (3rd ed.). New York, NY: Routledge.
Marsh, H. W., Wen, Z., & Hau, K. T. (2004). Structural equation models of latent interactions: Evaluation of alternative estimation strategies and indicator construction. Psychological Methods, 9(3), 275–300. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1037/1082-989X.9.3.275")}
Preacher, K. J., Curran, P. J., & Bauer, D. J. (2006). Computational tools for probing interactions in multiple linear regression, multilevel modeling, and latent curve analysis. Journal of Educational and Behavioral Statistics, 31(4), 437–448. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.3102/10769986031004437")}
indProd()
For creating the indicator products with no
centering, mean centering, double-mean centering, or residual centering.
probe3WayMC()
For probing the three-way latent interaction
when the results are obtained from mean-centering, or double-mean centering
probe2WayRC()
For probing the two-way latent interaction
when the results are obtained from residual-centering approach.
probe3WayRC()
For probing the two-way latent interaction
when the results are obtained from residual-centering approach.
plotProbe()
Plot the simple intercepts and slopes of the
latent interaction.
dat2wayMC <- indProd(dat2way, 1:3, 4:6) # double mean centered by default
model1 <- "
f1 =~ x1 + x2 + x3
f2 =~ x4 + x5 + x6
f12 =~ x1.x4 + x2.x5 + x3.x6
f3 =~ x7 + x8 + x9
f3 ~ f1 + f2 + f12
f12 ~~ 0*f1 + 0*f2 # not necessary, but implied by double mean centering
"
fitMC2way <- sem(model1, data = dat2wayMC, meanstructure = TRUE)
summary(fitMC2way)
probe2WayMC(fitMC2way, nameX = c("f1", "f2", "f12"), nameY = "f3",
modVar = "f2", valProbe = c(-1, 0, 1))
## can probe multigroup models, one group at a time
dat2wayMC$g <- 1:2
model2 <- "
f1 =~ x1 + x2 + x3
f2 =~ x4 + x5 + x6
f12 =~ x1.x4 + x2.x5 + x3.x6
f3 =~ x7 + x8 + x9
f3 ~ c(b1.g1, b1.g2)*f1 + c(b2.g1, b2.g2)*f2 + c(b12.g1, b12.g2)*f12
f12 ~~ 0*f1 + 0*f2
"
fit2 <- sem(model2, data = dat2wayMC, group = "g")
probe2WayMC(fit2, nameX = c("f1", "f2", "f12"), nameY = "f3",
modVar = "f2", valProbe = c(-1, 0, 1)) # group = 1 by default
probe2WayMC(fit2, nameX = c("f1", "f2", "f12"), nameY = "f3",
modVar = "f2", valProbe = c(-1, 0, 1), group = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.