View source: R/MIX.initial_helper.R
getMIX.initial | R Documentation |
This function computes the initial values for the parameters for a longitudinal mixture 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.
getMIX.initial(
dat,
nClass,
prop_starts,
sub_Model,
cluster_TIC,
t_var,
records,
y_var,
curveFun,
m_var,
x_var,
x_type,
TVC,
decompose,
growth_TIC,
res_scale,
res_cor
)
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 |
nClass |
An integer specifying the number of latent classes for the mixture model. It takes the value passed from |
prop_starts |
A numeric vector of user-specified initial component proportions of latent classes. It takes the value passed from
|
sub_Model |
A string that specifies the sub-model for latent classes. Supported sub-models include |
cluster_TIC |
A string or character vector representing the column name(s) for time-invariant covariate(s) indicating cluster
formations. It takes the value passed from |
t_var |
A string specifying the prefix of the column names corresponding to the time variable for each study wave. This applies when
|
records |
A numeric vector denoting the indices of the observed study waves. This applies when |
y_var |
A string defining the prefix of the column names corresponding to the outcome variable for each study wave. This is applicable
when |
curveFun |
A string specifying the functional form of the growth curve. Supported options for |
m_var |
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 |
x_var |
A string specifying the baseline predictor if |
x_type |
A string indicating the type of predictor variable used in the model. Supported values are |
TVC |
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 |
decompose |
An integer specifying the decomposition option for temporal states. Supported values include |
growth_TIC |
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 |
res_scale |
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 |
res_cor |
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 |
A list containing initial values for each class in the specified model.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.