Hi all,
re-posting as a new topic.
PS.
The suggestion on dummyfying ordered categorical has already been brought to my attention by Terrence D. Jorgensen, whom I thank.
hi, I am having a similar problem with ordinal data. lavaan version: 0.6-5
this is the error message i get:
> cc_fit_r <- lavaan::cfa(cc_model_r, data = cc, ordered = c("gend", "disab", "orph", "sol", "edu"), conditional.x = FALSE, std.lv = FALSE)
Error in Delta.group[, x.el.idx[[mm]]] <- DELTA :
number of items to replace is not a multiple of replacement length
In addition: Warning messages:
1: In th[th.idx > 0L] <- TAU[, 1L] :
number of items to replace is not a multiple of replacement length
2: In WLS.obs - WLS.est :
longer object length is not a multiple of shorter object length
3: In diff * diff * WLS.VD :
longer object length is not a multiple of shorter object length
4: In th[th.idx > 0L] <- TAU[, 1L] :
number of items to replace is not a multiple of replacement length
And this is my model:
cc_model_r <- '
cc =~ a*edu + b*sol # 2 reflective items to identify the formative construct
cc <~ c*age + d*gend + e*disab + f*orph # formative construct
'
Data can be retrieved
here.
I suspected the issue might be related to NAs. A crosstab revealed that there are 12 NAS between edu and sol and 85 NAs between sol and gend. I tried re-fitting the model using the argument missing = "pairwise", but unsuccessfully.
Regards
Manolo