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

Fixed parsing of TECH10 output in newer Mplus versions #182

Closed sam-crawley closed 1 year ago

sam-crawley commented 1 year ago

An additional line was added, so updated the parsing to account for this, and added a test.

The first commit is a simple fix for the bug, the second reworks TECH10 parsing completely, and also extracts the new value in newer versions of Mplus.

sam-crawley commented 1 year ago

This fixes #173

cjvanlissa commented 1 year ago

Thank you for doing this, @sam-crawley ! Including tests was a wonderful touch. Just wondering if the function also still works with old-style output?

sam-crawley commented 1 year ago

I've added a test with an output generated from an older Mplus version.

cjvanlissa commented 1 year ago

Thank you very much @sam-crawley!

michaelhallquist commented 1 year ago

Indeed, thanks for this update, @sam-crawley! And thanks to @cjvanlissa for merging it into the codebase. I just reviewed the code as well and it looks great to me. Next time I roll out a CRAN update, I'll put this code through my internal checks, which has TECH10 outputs going back to Mplus 5. But I appreciate your adding formal tests for the update, which is definitely the direction things should go.

Cheers, Michael