Learn R Programming

MplusLGM (version 1.0.0)

getFit: 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)

Value

A data frame with a row for each LGM of the input list.

Arguments

lgm_object

A single LGM mplusObject or a list of LGM mplusObject (nested lists supported).

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.

Examples

Run this code
# \donttest{
# Example usage:
fit_indices <- getFit(lgm_object = GCM_model)
fit_indices <- getFit(lgm_object = list(GCM_model, GBTM_models, LCGA_models))

print(fit_indices)
# }

Run the code above in your browser using DataLab