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

Feature request: Extract odds ratio sections #192

Open OlivierPDS opened 1 year ago

OlivierPDS commented 1 year ago

Hello,

Thank you very much for your work on the Mplus Automation package for R. I use it daily and it has been of immense help to automate the estimation of many GMMs.

I wonder whether there are any plans to expand the coverage of extracting data from the Mplus output files. In particular, it would be very useful if mplusModeller could return the odds ratios sections in R objects when adding predictors and distal outcomes to GMM via the manual 3-step approach:

Odds ratio:

Confidence intervals:

Alternative parameterization:

If not, can someone point me to some code to get me started on working on this myself.

Thanks again for this great package,

michaelhallquist commented 11 months ago

Thanks for your note. I think this should be pretty straightforward. It would help if you could upload an example .out file so that I make sure I understand the various sections. If you change the file extension to .txt, you should be able to upload it here and we can give it a look.

Michael

linem7 commented 1 month ago

Hi @michaelhallquist and @OlivierPDS ,

I would like to follow up on this issue, which has been confusing me recently. I am also conducting a regression mixture model using the BCH method to explore the relationship between predictors and classes. The default output in Mplus includes sections titled "TESTS OF CATEGORICAL LATENT VARIABLE MULTINOMIAL LOGISTIC REGRESSIONS USING THE 3-STEP PROCEDURE" and "ODDS RATIOS FOR TESTS OF CATEGORICAL LATENT VARIABLE MULTINOMIAL LOGISTIC REGRESSIONS USING THE 3-STEP PROCEDURE." These sections contain the coefficients and odds ratios referring to the relationship between predictors and classes across different reference groups.

However, the readModels function does not extract this information for further reporting. So I wonder is it possible to extend the readModels functionality to include these details? I have attached my output here for your reference. rmm example.txt

Thank you so much for your attention.

Best, Linem

michaelhallquist commented 1 month ago

FYI, the results of the R3STEP procedure are now provided in $r3step (commit 47b4d6c307c8b46bbebdcbbdc4e0ad71fc31c3d2) and odds ratios and their confidence intervals are now in $parameters$odds and $parameters$ci.odds, respectively (commit faa98d3349af52c91647b75b46f091d712f1f765). I'm leaving this open because I haven't yet looked at the odds ratio results for latent class models.