Dear everyone,
I am trying to run a few models using the mplusObject and mplusModeler functions and it seems I cant get them to work with multiple imputed datasets. Creating the 15 imputed datasets as well as the .dat file with the list of imputed datasets works well, but in the generated .inp script, it seems to use the wrong dataset name (without "implist"). I also get this result when I use the example from the CRAN manual (p.48). When I use the version from github, I get a different error message from mplusModeler, but it still doesn't work (Assertion on 'df' failed: Must be of type 'data.frame', not 'list'):
> idat <- list(data.frame(mpg = mtcars$mpg, hp = c(100, mtcars$hp[-1])),
+ data.frame(mpg = mtcars$mpg, hp = c(110, mtcars$hp[-1])),
+ data.frame(mpg = mtcars$mpg, hp = c(120, mtcars$hp[-1])))
> testobjimp <- mplusObject(MODEL = "[mpg];", rdata = idat, imputed = TRUE)
R variables selected automatically as any variable name that
occurs in the MODEL, VARIABLE, or DEFINE section.
> testimp <- mplusModeler(testobjimp,modelout = "testimp.inp",writeData = "ifmissing", hashfilename=TRUE,run = TRUE)
Wrote model to: testimp.inp
Fehler in .cleanHashData(df = df, keepCols = keepCols, dropCols = dropCols, :
Assertion on 'df' failed: Must be of type 'data.frame', not 'list'.
Has anyone else experienced this and could help me?
Best regards and thanks in advance
Malte