Moderation indProd with categorical variables

6 views
Skip to first unread message

Janine Rook

unread,
Nov 27, 2025, 10:30:29 AM (yesterday) Nov 27
to lavaan
Dear all,

I am trying to fit a SEM model including a moderation. Please find my model below. My model does not show multivariate normality and includes a combination of continuous and ordinal variables, which is why I chose to use the estimator 'WLSMV'.  In this model x1, x2, x3, x4, y1, y2, y3, z1 are continuous. y4 and y5 are ordered factors with 4 and 5 levels respectively. I have ~1500 participants in my dataset. With the model I would like to investigate how be moderates the effect of z1 on cg, while controlling for c1, c2, c3 and c4. c4 is a categorical covariate, but I dummy coded this variable as it is an exogenous variable. I am using lavaan in R.

I found out that indProd() requires the data to be continuous. Since my ordered variables have 4 and 5 levels, do you think it is possible to operationalize these indicators as continuous variables and use estimator = 'MLR' instead of 'WLSMV'?

data_int <- indProd(data, var = c('y1', 'y2', 'y3, 'y4', 'y5), var2 = 'z1', match = F, residualC = F, meanC = F, doubleMC = T) 

 model <- ' 
cg =~ x1 + x2 + x3 + x4 
be =~ y1 + y2 + y3 + Y4 + y5 

int =~ y4.z1 + y5.z1 + y1.z1 + y2.z1 + y3.z1

cg ~ z1 + be + c1 + c2 + c3 + c4 
c3 ~~ c4 
x1~~ x2 
y1 ~~ y2 
z1 ~~ y4.z1 + y5.z1 + y1.z1 + y2.z1 + y3.z1 
'

sem(model, data = data_int, estimator = 'WLSMV', ordered = c('y4', 'y5'), std.lv = T) 

Thank you very much in advance!

Sunthud Pornprasertmanit

unread,
12:21 AM (15 hours ago) 12:21 AM
to lav...@googlegroups.com
https://pubmed.ncbi.nlm.nih.gov/32158022/

Please check this out. I think you may make a parcel from y4 and y5 and treat the new parcel as a continuous item.

--
You received this message because you are subscribed to the Google Groups "lavaan" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lavaan+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/lavaan/b7b03ef8-55c0-482a-99f7-09766047b939n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages