$ ug : Ord.factor w/ 4 levels "1"<"2"<"3"<"4": 2 2 4 2 1 3 3 3 4 4 ... # prob. misunderstood "coding scheme reflecting the order" as ""create factor"
$ comm1: int 5 3 5 3 5 5 3 4 2 3 ...
$ comm2: int 4 3 5 3 5 4 5 2 4 2 ...
$ comm3: int 5 3 4 4 5 4 5 4 3 2 ...
> try_ordinal <- '
+ comm =~ comm1 + comm2 + comm3
+ comm ~ ug
+ '
>
> library(lavaan)
> try_ordinal_sem <- sem(
+ model = try_ordinal,
+ data = d,
+ estimator = "WLSMV"
+ # estimator = "mlr", # not possible anymore
+ # missing = "fiml", fixed.x = T
+ )
Error in t(Delta[[g]]) %*% lavsamplestats@WLS.V[[g]] :
non-conformable arguments
In addition: Warning messages:
1: In lav_data_full(data = data, group = group, group.label = group.label, :
lavaan WARNING: exogenous variable(s) declared as ordered in data: ug
2: In WLS.obs - WLS.est :
longer object length is not a multiple of shorter object length
3: In lavsamp...@WLS.obs[[g]] - WLS.est[[g]] :
longer object length is not a multiple of shorter object length