getFit {MplusLGM} | R Documentation |
Get fit indices from Latent Growth Models (LGM)
Description
Extract key information from Mplus LGM objects, including model summaries, fit statistics, class details, warnings, and errors. The function accounts for non-converging models and compiles the extracted information into a single data frame to facilitate model evaluation and comparison.
Usage
getFit(lgm_object)
Arguments
lgm_object |
A single LGM |
Details
- Model summaries such as the title, log-likelihood value and number of observations, parameters and latent classes.
- Model fit indices such as the BIC, aBIC, AIC, AICC and CAIC along with statistics from the BLRT and adjusted LMR-LRT, if requested.
- Latent class counts and proportions.
- Classification confidence measures such as the average posterior probabilities (APPA) and entropy.
- Mplus warnings or errors encountered during model estimation.
This output facilitates side-by-side comparison of models to support model evaluation and selection.
Value
A data frame with a row for each LGM of the input list.
Examples
# Example usage:
fit_indices <- getFit(lgm_object = GCM_model)
fit_indices <- getFit(lgm_object = list(GCM_model, GBTM_models, LCGA_models))
print(fit_indices)