Tried several thing, but nothing works, like:
CFA_model_1_order <- cfa(CFA_model_1, data = MyData,
ordered=c("D1.1", "D1.2", "D1.3", "D1.4", "D1.5", "D1.6",
"D2.1", "D2.2", "D2.3", "D2.4", "D2.5",
"D3.1", "D3.2", "D3.3", "D3.4",
"D4.1", "D4.2", "D4.3", "D4.4", "D4.5",
"D5.1", "D5.2", "D5.3", "D5.4", "D5.5", "D5.6", "D5.7", "D5.8",
"D6.1", "D6.2", "D6.3", "D6.4", "D6.5", "D6.6", "D6.7", "D6.8"))
or to make sure the items are not classed as numeric but as ordered factors:
itemsfac <- items %>% mutate_if(is.numeric, as.ordered)
CFA_model_1_order <- cfa(CFA_model_1, data = MyData)
Any suggestions?