getsub.LCSM_l: Define Latent Change Score Models as Class-specific Models...

View source: R/MIX.SUBMODEL.LCSM_helper.R

getsub.LCSM_lR Documentation

Define Latent Change Score Models as Class-specific Models (Submodels) for a Longitudinal Mixture Model

Description

This function defines latent change score models as class-specific models (submodels) for a longitudinal mixture model.

Usage

getsub.LCSM_l(
  dat,
  nClass,
  t_var,
  records,
  y_var,
  curveFun,
  intrinsic,
  growth_TIC,
  starts
)

Arguments

dat

A wide-format data frame, with each row corresponding to a unique ID. It contains the observed variables with repeated measurements and occasions for each longitudinal process, and time-invariant covariates (TICs) if any. It takes the value passed from getMIX().

nClass

An integer specifying the number of latent classes for the mixture model. It takes the value passed from getMIX().

t_var

A string specifying the prefix of the column names corresponding to the time variable at each study wave. It takes the value passed from getMIX().

records

A numeric vector specifying indices of the study waves. It takes the value passed from getMIX().

y_var

A string specifying the prefix of the column names corresponding to the outcome variable at each study wave. It takes the value passed from getMIX().

curveFun

A string specifying the functional form of the growth curve. Supported options for latent change score models include: "quadratic" (or "QUAD"), "negative exponential" (or "EXP"), "Jenss-Bayley" (or "JB"), and "nonparametric" (or "NonP"). It takes the value passed from getMIX().

intrinsic

A logical flag indicating whether to build an intrinsically nonlinear longitudinal model. It takes the value passed from getMIX().

growth_TIC

A string or character vector specifying the column name(s) of time-invariant covariate(s) contributing to the variability of growth factors if any. It takes the value passed from getMIX().

starts

A list of initial values for the parameters, either takes the value passed from getMIX() or derived by the helper function getMIX.initial().

Value

A list of manifest and latent variables and paths for an mxModel object.


nlpsem documentation built on Sept. 13, 2023, 1:06 a.m.