I am trying to use the reliability function for calculating a CFA and this error occurs: "You will find additional options and better formatting using itemAnalysis(). Error in apply(items, c(1, 2), is.numeric) : dim(X) must have positive length." I am confused because I didn't use apply() function.
This is my code:
model_1 <- "
DS_Komp =~ DS01_01 + DS01_02 + DS01_03 + DS01_04 + DS01_05
results_1 <- sem(model_1, d)
rel_1 <- reliability(results_1)