mplusModeler with multiple imputed datasets

Skip to first unread message

Jun 9, 2021, 12:03:43 PM6/9/21
to MplusAutomation
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


Jun 9, 2021, 12:18:08 PM6/9/21
to MplusAutomation

nevermind, I have gotten it to work using the 0.8 version.


Joshua Wiley

Jun 14, 2021, 7:28:19 PM6/14/21
to, MplusAutomation
Hi Malte,

It's also just been fixed, I think, in the most recent development version thanks to @cjvanlissa 



You received this message because you are subscribed to the Google Groups "MplusAutomation" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit
Reply all
Reply to author
0 new messages