I have changed it to be ordered and also created a list and tried to run cfa.mi the following ways with the following errors:
> fitallM1a <- cfa.mi(Model1a, data = mi_list, estimator = "WLSMV")
Error in (function (model = NULL, dataList = NULL, dataFunction = NULL, :
lavaan ERROR: (generated) data is not a data.frame (or a matrix)
> fitallM1a <- cfa.mi(Model1a, datalist = mi_list, estimator = "WLSMV")
Error in runMI(model = model, data = data, fun = "cfa", ..., m = m, miArgs = miArgs, :
argument "data" is missing, with no default
> fitallM1a <- cfa.mi(Model1a, data = Imputed_dataM1, datalist = mi_list, estimator = "WLSMV")
Error in runMI(model = model, data = data, fun = "cfa", ..., m = m, miArgs = miArgs, :
argument "m" is missing, with no default
> fitallM1a <- cfa.mi(Model1a, data = Imputed_dataM1, list(mi_list), estimator = "WLSMV")
Error in runMI(model = model, data = data, fun = "cfa", ..., m = m, miArgs = miArgs, :
argument "m" is missing, with no default
I thought it should be a list not data frame (error first in the list) and I thought that if it is a list of imputed data sets that m is ignored.