Learn R Programming

MplusLGM (version 1.0.0)

getPoly: Refine Polynomial Order in Latent Growth Modelling (LGM)

Description

Refine the polynomial order for each class of a LGM by iteratively removing non-significant growth factors, and running the updated models.

Usage

getPoly(lgm_object, wd = "Results")

Value

A LGM mplusObject including the results of the updated model with the refined polynomial order.

Arguments

lgm_object

A LGM mplusObject, typically generated with the LGMobject and runLGM functions.

wd

A character string specifying the directory where the results folder will be created for saving Mplus input, output, and data files. Default is the current working directory.

Details

The getPoly function refines the polynomial order of a LGM mplusObject through an iterative process. In addition to ensuring the statistical significance of growth factors in each latent class, the function ensure that the best loglikelihood value of the updated model is replicated.

The function works as follows:

  • 1. Extract model information from the provided LGM mplusObject.

  • 2. Evaluate the statistical significance of the highest-order growth factor in each class.

  • 3. Remove non-significant growth factors (p-value > 0.05) from the model.

  • 4. Update the LGM mplusObject to reflect changes in the growth factor structure.

  • 5. Re-run the updated mplusObject until log-likelihood values are successfully replicated using the runLGM function.

  • 6. Repeat the process until the highest-order growth factor of all classes are statistically significant or reduce to intercept-only.

The function automates the procedure outlined for model selection in: Van Der Nest et al,. (2020). "An overview of mixture modelling for latent evolutions in longitudinal data: Modelling approaches, fit statistics and software." Advances in Life Course Research 43: 100323.

See Also

LGMobject for creating the mplusObject of a latent growth model. runLGM for conducting latent growth modelling with a mplusObject.

Examples

Run this code
# \donttest{
# Example usage:
final_model <- getPoly(
  lgm_object = LCGA_best,
  wd = "Results"
  )

final_fit <- getFit(final_model)

 print(final_fit)
# }

Run the code above in your browser using DataLab