View source: R/TVC.initial_helper.R
getTVC.initial | R Documentation |
This function computes the initial values of the parameters for a latent growth curve model or a latent change score model with a time-varying covariate and time-invariant covariates (if any).
getTVC.initial(
dat,
t_var,
y_var,
curveFun,
records,
growth_TIC,
TVC,
decompose,
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 (for the longitudinal outcome and time-varying covariates), occasions, and time-invariant covariates
(TICs) if any. It takes the value passed from |
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 |
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 |
curveFun |
A string specifying the functional form of the growth curve. Supported options for |
records |
A numeric vector specifying the indices of the observed study waves. It takes the value passed from |
growth_TIC |
A string or character vector specifying the column name(s) of time-invariant covariate(s) that account for the
variability of growth factors, if any. It takes the value passed from |
TVC |
A string specifying the prefix of the column names corresponding to the time-varying covariate at each study wave.
It takes the value passed from |
decompose |
An integer specifying the decomposition option for temporal states. Supported values include |
res_scale |
A numeric value or numeric vector. For a model with |
res_cor |
A numeric value. When |
A list containing the initial values for parameters related to growth factors, TVC, TICs (if any), and path coefficients (if any) for a latent growth curve model or a latent change score model with a time-varying covariate and time-invariant covariates (if any).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.