I am running a lavaan model with semTools::semMI, using the following input:
out <- sem.mi(model, data = data, seed = 1234, ordered = ordered,
m = 20, miArgs = list(noms = "county2"))
Lavaan throws an error:
Error in (function (model = NULL, dataList = NULL, dataFunction = NULL, :
lavaan ERROR: (generated) data is not a data.frame (or a matrix)
I'm not able to fix this error... Data are in a date frame:
> class(data)
[1] "data.frame"