I am trying to do a single factor cfa with lavaan. It works for every other variable but lavaan seems to have an issue with this specific indicator of this latent variable called "PFC46":
fit <- cfa(model, data=data, ordered=c("other observed variables omitted ","PFC46"))
I then get this error:
Error in lav_samplestats_step1(Y = Data, wt = wt, ov.names = ov.names, :
lavaan ERROR: some categories of variable `PFC46' are empty in group 1; frequencies are [7 15 72 820 0]
But when I check if there are any empty variables I get this result with table()
1 2 3 4 5
17 8 15 75 838
Does anyone have an idea why its not working? To me it looks like it executes the code as if I added some grouping, which to my knowledge I have not.
Tried to remove any missing values. The column of PFC46 looks exactly like any other where I do not get an error and If i omit PFC46 completely from the analysis it works. Also changed it to a factor, double, integer its all the same. Also double and triple checked the order and the model.