Probing interaction for simple intercept and simple slope for the no-centered or mean-centered latent two-way interaction
probe3WayMC(fit, nameX, nameY, modVar, valProbe1, valProbe2, group,
omit.imps = c("no.conv", "no.se"))
character
vector of all 7 factor names used as the
predictors. The 3 lower-order factors must be listed first, followed by
the 3 second-order factors (specifically, the 4th element must be the
interaction between the factors listed first and second, the 5th element
must be the interaction between the factors listed first and third, and
the 6th element must be the interaction between the factors listed second
and third). The final name will be the factor representing the 3-way
interaction.
The name of factor that is used as the dependent variable.
The name of two factors that are used as the moderators. The effect of the independent factor on each combination of the moderator variable values will be probed.
The values of the first moderator that will be used to probe the effect of the independent factor.
The values of the second moderator that will be used to probe the effect of the independent factor.
In multigroup models, the label of the group for which the
results will be returned. Must correspond to one of
lavInspect(fit, "group.label")
.
character
vector specifying criteria for omitting
imputations from pooled results. Ignored unless fit
is of
class '>lavaan.mi
. Can include any of
c("no.conv", "no.se", "no.npd")
, the first 2 of which are the
default setting, which excludes any imputations that did not
converge or for which standard errors could not be computed. The
last option ("no.npd"
) would exclude any imputations which
yielded a nonpositive definite covariance matrix for observed or
latent variables, which would include any "improper solutions" such
as Heywood cases. NPD solutions are not excluded by default because
they are likely to occur due to sampling error, especially in small
samples. However, gross model misspecification could also cause
NPD solutions, users can compare pooled results with and without
this setting as a sensitivity analysis to see whether some
imputations warrant further investigation.
A list with two elements:
SimpleIntercept
: The intercepts given each combination of
moderator values. This element will be shown only if the factor intercept
is estimated (e.g., not fixed at 0).
SimpleSlope
: The slopes given each combination of moderator
values.
In each element, the first column represents values of the first moderator
specified in the valProbe1
argument. The second column represents
values of the second moderator specified in the valProbe2
argument.
The third column is the simple intercept or simple slope. The fourth column
is the standard error of the simple intercept or simple slope. The fifth
column is the Wald (z) statistic. The sixth column is the p
value testing whether the simple intercepts or slopes are different from 0.
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
(
For probing three-way interaction, the simple intercept of the independent
variable at the specific values of the moderators (Aiken & West, 1991) can
be obtained by
The simple slope of the independent varaible at the specific values of the
moderators can be obtained by
The variance of the simple intercept formula is
The variance of the simple slope formula is
Wald z statistic is used for test statistic (even for objects of
class '>lavaan.mi
).
Aiken, L. S., & West, S. G. (1991). Multiple regression: Testing and interpreting interactions. Newbury Park, CA: Sage.
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. 10.1037/1082-989X.9.3.275
indProd
For creating the indicator products with no
centering, mean centering, double-mean centering, or residual centering.
probe2WayMC
For probing the two-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.
# NOT RUN {
library(lavaan)
dat3wayMC <- indProd(dat3way, 1:3, 4:6, 7:9)
model3 <- "
f1 =~ x1 + x2 + x3
f2 =~ x4 + x5 + x6
f3 =~ x7 + x8 + x9
f12 =~ x1.x4 + x2.x5 + x3.x6
f13 =~ x1.x7 + x2.x8 + x3.x9
f23 =~ x4.x7 + x5.x8 + x6.x9
f123 =~ x1.x4.x7 + x2.x5.x8 + x3.x6.x9
f4 =~ x10 + x11 + x12
f4 ~ f1 + f2 + f3 + f12 + f13 + f23 + f123
f1 ~~ 0*f12
f1 ~~ 0*f13
f1 ~~ 0*f123
f2 ~~ 0*f12
f2 ~~ 0*f23
f2 ~~ 0*f123
f3 ~~ 0*f13
f3 ~~ 0*f23
f3 ~~ 0*f123
f12 ~~ 0*f123
f13 ~~ 0*f123
f23 ~~ 0*f123
x1 ~ 0*1
x4 ~ 0*1
x7 ~ 0*1
x10 ~ 0*1
x1.x4 ~ 0*1
x1.x7 ~ 0*1
x4.x7 ~ 0*1
x1.x4.x7 ~ 0*1
f1 ~ NA*1
f2 ~ NA*1
f3 ~ NA*1
f12 ~ NA*1
f13 ~ NA*1
f23 ~ NA*1
f123 ~ NA*1
f4 ~ NA*1
"
fitMC3way <- sem(model3, data = dat3wayMC, std.lv = FALSE,
meanstructure = TRUE)
summary(fitMC3way)
probe3WayMC(fitMC3way, nameX = c("f1" ,"f2" ,"f3",
"f12","f13","f23", # the order matters!
"f123"), # 3-way interaction
nameY = "f4", modVar = c("f1", "f2"),
valProbe1 = c(-1, 0, 1), valProbe2 = c(-1, 0, 1))
# }
Run the code above in your browser using DataLab