Dear all,
I am trying to run a moderation analysis using lavaan.
I have a model with a number of latent variables and single-item observed indicators.
First, I defined the measurement model as follows
1) measurement model
mod.PE <-' PE =~ V2_PE1 + V2_PE2
EE =~ V2_EE1 + V2_EE2 + V2_EE3
SI =~ V2_SI1 + V2_SI2 + V2_SI3
BI =~ V2_BI1 + V2_BI2 + V2_BI3
HM =~ V2_HM1 + V2_HM2 + V2_HM3
FC =~ V2_FC1 + V2_FC2 + V2_FC4
PE ~~ EE
PE ~~ SI
PE ~~ HM
PE ~~ FC
EE ~~ SI
EE ~~ HM
EE ~~ FC
SI ~~ HM
SI ~~ FC
HM ~~ FC
BI ~~ PE
BI ~~ EE
BI ~~ SI
BI ~~ FC
BI ~~ HM '
fit.PE <- lavaan::cfa(mod.PE,
data = Datensatz_neu.sav,
missing="FIML",
estimator = "ML")
summary(fit.PE, standardized=TRUE, fit.measures=TRUE)
2)I then defined the structural model as follows and included observed single-item indicators as well:
mod.PE <-' PE =~ V2_PE1 + V2_PE2
EE =~ V2_EE1 + V2_EE2 + V2_EE3
SI =~ V2_SI1 + V2_SI2 + V2_SI3
BI =~ V2_BI1 + V2_BI2 + V2_BI3
HM =~ V2_HM1 + V2_HM2 + V2_HM3
FC =~ V2_FC1 + V2_FC2 + V2_FC4
BI ~ PE + EE + SI + FC + HM + CarUse + PublicTransportUse + TechAcceptance + NoInteractions + NoUses + EE * CarUse
PE ~ FC + EE + HM + SI + CarUse + PublicTransportUse + TechAcceptance + NoInteractions + NoUses
EE ~ FC + SI + HM + CarUse + PublicTransportUse + TechAcceptance + NoInteractions + NoUses
HM ~ FC + SI + CarUse + PublicTransportUse + TechAcceptance + NoInteractions + NoUses
FC ~ SI + CarUse + PublicTransportUse + TechAcceptance + NoInteractions + NoUses
SI ~ TechAcceptance
'
fit.PE <- lavaan::cfa(mod.PE,
data = Datensatz_neu.sav,
missing="FIML",
estimator = "ML")
summary(fit.PE, standardized=TRUE, fit.measures=TRUE, rsquare = TRUE)
I noticed that the effect of car use on BI is significant and that EE becomes significant when car use is included in the model. Hence, I want to check whether car use moderates the relation between EE and BI.
3) I performed mean centering now using this function for BI, EE and car use: variableCarUse.c <- scale(Datensatz_neu.sav$CarUse, center = TRUE, scale = FALSE)
4) I then performed a simple regression using the lm function and find a significant moderation effect.
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -0.03953 0.07905 -0.500 0.6174
variableEEc 0.55832 0.06579 8.487 8.8e-16 ***
variableCarUse.c -0.06340 0.02722 -2.329 0.0205 *
variableEEc:variableCarUse.c -0.05975 0.02715 -2.201 0.0285 *
--Now my question: Ideally I want to include all latent variables as defined in the measurement model to see whether moderating effect is robust in the multivariate latent context, or is it also ok to check for moderating effects only with the M, the IV and DV in one model as I did with the function lm?
If it is not ok, how do I have to specify my measurement model? Somehow I don't know now how to include the interaction term in the model.
-- I also added the interaction term in the structural model of step 2 before (EE*Car Use) and I also found a significant effect but I think this is not correct because I when I add the interaction effect of Car use * SI or car use * FC, the interaction term is 1) always the same for every variable and 2) it is the same as the single effect of car use on the outcome variable.
Something is wrong here I guess.
Thanks a lot.
I hope my clarifications are clear.