Replies: 1 comment 3 replies
-
Hello! I am new to R, trying to use it to estimate SEM with two latent IVs (both from ordinal indicators), a binary observed IV for a moderator, and two observed ordinal DVs. The latents are structural and sociocultural. I am trying to model (1) the path of structural (latent) --> acad_satisfaction, (2) sociocultural (latent) --> belonging, (3) Pell as a moderator for paths (1) and (2). I see that in Lavaan the : is only for interactions between 2 observed variables, and it was not clear how to interact an observed and latent with indProd. Here is what I tried with modsem: acad_s ~ structural + pell + structural:pell I receive the error message "Unable to find observed variables in data: [1] "strcl_1" "strcl_2" "strcl_3" "strcl_4" "soccl_1" "soccl_2" "soccl_4" This seems like an easy syntax fix...what am I doing wrong? I also want to know how (or if) I need to specify that the indicators for the latents (strcl_1-4, soccl_1-8) are categorical like with Lavaan, and if/how to specify WLMSV. Thank you! |
Beta Was this translation helpful? Give feedback.
-
👋 Welcome!
We’re using Discussions as a place to connect with other members of our community. We hope that you:
build together 💪.
To get started, comment below with an introduction of yourself and tell us about what you do with this community.
Beta Was this translation helpful? Give feedback.
All reactions