I am trying to impute a data set that utilized planned missingness. The syntax is below:
fit.fiml = cfa(Test2.model, data=W12, estimator = "ML", missing = "FIML", control=list(rel.tol=1e-8, iter.max=1000), verbose=TRUE)
fit.aux <- auxiliary(fit.fiml, aux = auxvars, data = W12, estimator = "ML", missing = "FIML", fun= "cfa", control=list(rel.tol=1e-8, iter.max=1000), verbose=TRUE)
I am new to R and firstly would like to know if this is the correct syntax for adding auxiliary variables.
When this runs I get the following errors:
Error in validObject(.Object) :
invalid class “Fit” object: invalid object for slot "fx.group" in class "Fit": got class "NULL", should be or extend class "numeric"
In addition: Warning messages:
1: In lav_data_full(data = data, group = group, group.label = group.label, :
lavaan WARNING: some cases are empty and will be removed:
2 73 106
2: In lav_data_full(data = data, group = group, group.label = group.label, :
lavaan WARNING: due to missing values, some pairwise combinations have less than 10% coverage
3: In lavaan::lavaan(model = list(id = 1:589, lhs = c("OA", "OA", "OA", :
lavaan WARNING: model has NOT converged!
Any advice would be helpful. Thanks!