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!