This function computes the initial values for the parameters for a longitudinal multiple-group model. The supported submodels (i.e., class-specific models) include (1) latent growth curve models, (2) latent change score models, (3) latent growth curve models or latent change score models with a time varying covariate, (4) multivariate latent growth curve models or multivariate latent change score models, (5) longitudinal mediation models. For the first three submodels, time-invariant covariates are allowed.
getMGroup.initial(
dat,
nClass,
grp_var,
sub_Model,
t_var,
y_var,
curveFun,
records,
m_var,
x_var,
x_type,
TVC,
decompose,
growth_TIC,
res_scale,
res_cor
)A list containing initial values for each class in the specified model.
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 getMGroup().
An integer specifying the number of manifested classes for the multiple group model. It takes the value passed from getMGroup().
A string specifying the column that indicates manifested classes. It takes the value passed from getMGroup().
A string that specifies the sub-model for latent classes. Supported sub-models include "LGCM" (for latent
growth curve models), "LCSM" (for latent change score models), "TVC" (for latent growth curve models or latent change
score models with a time-varying covariate), "MGM" (for multivariate latent growth curve models or latent change score models),
and "MED" (for longitudinal mediation models). It takes the value passed from getMGroup().
A string specifying the prefix of the column names corresponding to the time variable for each study wave. This applies when
sub_Model is "LGCM", "LCSM" or "TVC". For sub_Model being "MGM" or "MED", t_var should
be a string vector where each element corresponds to the time variable prefix for each respective longitudinal process. It takes the value
passed from getMGroup().
A string defining the prefix of the column names corresponding to the outcome variable for each study wave. This is applicable
when sub_Model is not "MGM". For sub_Model being "MGM", y_var should be a string vector where each element
corresponds to the prefix of the column names for each outcome variable across the study waves. It takes the value passed from getMGroup().
A string specifying the functional form of the growth curve. Supported options for y_model = "LGCM" include:
"linear" (or "LIN"), "quadratic" (or "QUAD"), "negative exponential"
(or "EXP"), "Jenss-Bayley" (or "JB"), and "bilinear spline" (or "BLS"). Supported options for
y_model = "LCSM" include: "quadratic" (or "QUAD"), "negative exponential" (or "EXP"),
"Jenss-Bayley" (or "JB"), and "nonparametric" (or "NonP"). It takes the value passed from getMGroup().
A numeric vector denoting the indices of the observed study waves. This applies when sub_Model is "LGCM",
"LCSM" or "TVC". For sub_Model being "MGM" or "MED", records should be a list of numeric vectors,
where each vector provides the indices of the observed study waves for each longitudinal process. It takes the value passed from getMGroup().
A string that specifies the prefix of the column names corresponding to the mediator variable at each study wave.
It takes the value passed from getMGroup().
A string specifying the baseline predictor if x_type = "baseline", or the prefix of the column names
corresponding to the predictor variable at each study wave if x_type = "longitudinal". It takes the value passed from getMGroup().
A string indicating the type of predictor variable used in the model. Supported values are "baseline"
and "longitudinal". It takes the value passed from getMGroup().
A string that specifies the prefix of the column names corresponding to the time-varying covariate at each time
point. It takes the value passed from getMGroup().
An integer specifying the decomposition option for temporal states. Supported values include 0 (no
decomposition), 1 (decomposition with interval-specific slopes as temporal states), 2 (decomposition with interval-
specific changes as temporal states), and 3 (decomposition with change-from-baseline as temporal states). It takes the value passed
from getMGroup().
A string or character vector of column names of time-invariant covariate(s) accounting for the variability
of growth factors if any. It takes the value passed from getMGroup().
A list where each element is a (vector of) numeric scaling factor(s) for residual variance to calculate the
corresponding initial value for a latent class, between 0 and 1 exclusive. It takes the value passed from getMGroup().
A list where each element is a (vector of) numeric initial value(s) for residual correlation in each class. It
needs to be specified if the sub_Model is "TVC" (when decompose != 0), "MGM", or "MED". It takes the value
passed from getMGroup().