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.
84 stars 46 forks source link

"Error extracting SUMMARY OF DATA in output file" when running 3-level SEM #163

Open pehkawn opened 2 years ago

pehkawn commented 2 years ago

I've been attempting to extract data from the output of an empty three-level model in Mplus. However, running mplusModeler() or readModels() returns the error message:

Error extracting SUMMARY OF DATA in output file: model0.out

<simpleError in extractValue(pattern = "^\\s*Average cluster size\\s*", section,     filename, type = "dec"): More than one match found for parameter: ^\s*Average cluster size\s*
  model0.out>

I tried defining the same model with only one cluster, and the error message is gone. I can therefore only assume this has something to do with the model have more than one cluster.

andrew0302 commented 2 years ago

I'm having a simular issue with a cross-nested model. I get almost the same error message:

<simpleError in extractValue(pattern = "^\sNumber of clusters\s", section, filename, type = "int"): More than one match found for parameter: ^\sNumber of clusters\s sim.out>

michaelhallquist commented 2 years ago

Hi there,

I just pushed a commit that now parses the summary of data section for crossclassified models. I tested this against Mplus User's Guide example 9.24, which is the only cross-classified output I personally have. If you'd like me to test your specific case, please upload your .out file here (you'll have to label it as .txt for Github to accept it).

Re: the threelevel output above, @pehkawn, I couldn't replicate the issue. Could you upload your output file here?

I should also clarify that these 'simpleError' messages by the package do not reflect complete failure of parsing, but a localized error in parsing a certain section. So, your outputs may otherwise be intact and perfectly usable.

pehkawn commented 2 years ago

Sorry for my late reply. Here it is. (.txt suffix added in order to be able to upload GitHub.)