Moderatoranalysis lavaan

65 views
Skip to first unread message

Isa...@hotmail.de

unread,
Apr 26, 2019, 5:52:12 AM4/26/19
to lavaan
Hello,

can anyone give me an example for the structure for moderation testing in a pathmodel with lavaan?
Unfortunately i can not find anything about this. I only find examples for mediation and moderated mediations in pathmodels. 

I am currently really asking myself if it is possible to test moderations in a pathmodel. 

To do so, i created this model: 

mdd1.txt4<-'
H2a=~SK_z+N2B_z+IntSN2B
H2b=~Habitus_z+N2B_z+IntHN2B
H2c=~Vergnuegen_z+N2B_z+IntVN2B
H3a=~SK_z+NfP_z+IntSNfP
H3b=~Habitus_z+NfP_z+IntHNfP
H3c=~Vergnuegen_z+NfP_z+IntVNfP
H4a=~SK_z+Druck_z+IntSDruck
H4b=~Habitus_z+Druck_z+IntHDruck
H4c=~Vergnuegen_z+Druck_z+IntVDruck
H5a=~SK_z+FoMO_z+IntSFoMO
H5b=~Habitus_z+FoMO_z+IntHFoMO
H5c=~Vergnuegen_z+FoMO_z+IntVFoMO
SoMePr_z~SK_z
SoMePr_z~Habitus_z
SoMePr_z~Vergnuegen_z
SoMePr_z~H2a
SoMePr_z~H2b
SoMePr_z~H2c
SoMePr_z~H3a
SoMePr_z~H3b
SoMePr_z~H3c
SoMePr_z~H4a
SoMePr_z~H4b
SoMePr_z~H4c
SoMePr_z~H5a
SoMePr_z~H5b
SoMePr_z~H5c
SoMePr_z~Relatedness
'

But R can not work with it. 
Any thought?

Thank you very much. 

Terrence Jorgensen

unread,
Apr 27, 2019, 4:49:48 AM4/27/19
to lavaan
can anyone give me an example for the structure for moderation testing in a pathmodel with lavaan?

Yes, you just need to add the product term to your data.frame, then include that variable as a predictor in the syntax to estimate the interaction effect.  Or you can use the shortcut "x:z" (to represent the product x*z) as a predictor (e.g., "y ~ x + z + x:z").

Terrence D. Jorgensen
Assistant Professor, Methods and Statistics
Research Institute for Child Development and Education, the University of Amsterdam

Reply all
Reply to author
Forward
0 new messages