michaelhallquist / MplusAutomation

The MplusAutomation package leverages the flexibility of the R language to automate latent variable model estimation and interpretation using Mplus, a powerful latent variable modeling program developed by Muthen and Muthen (www.statmodel.com). Specifically, MplusAutomation provides routines for creating related groups of models, running batches of models, and extracting and tabulating model parameters and fit statistics.
81 stars 46 forks source link

Error extracting MODINDICES in output file #188

Closed AlexandreGareau closed 1 year ago

AlexandreGareau commented 1 year ago

When using readModels() MODINCES are not extracted, either with what = "all" or what = "mod_indices

Here is something that also appears in the output, which I don't know if it is related <simpleError in is.na(columnNames) || is.null(columnNames): 'length = 7' in coercion to 'logical(1)'>

The mplus.object created from the readModels() function contains the mod_indices list() but it is empty $ mod_indices : list()

michaelhallquist commented 1 year ago

Hi Alexandre,

Thanks for letting me know. I imagine this error has to do with an update to the Mplus output structure in a recent version. I'm planning to make some updates this summer to bring the package in line with Mplus 8.9. Could you upload the relevant .out file (you'll probably need to change the suffix to .txt for Github) so I can test and fix this?

Thanks, Michael

AlexandreGareau commented 1 year ago

Hi Michael,

Thank you for the quick reply. I am using Mplus. 8.4. I created a test.out because I can't share the actual ouput for professional reasons. test.txt

michaelhallquist commented 1 year ago

Thanks, Alexandre. I think this was fixed by a previous modification. I am able to read your file without a problem, including modindices (https://github.com/michaelhallquist/MplusAutomation/commit/6ad0d7306c32c983d9186a9ec3aa6f7ed23d89f4). You may need to install the development version of the package since this fix occurred after the last CRAN release:

library(devtools)

install_github("michaelhallquist/MplusAutomation")

Best, Michael