Usage
ctModel(n.manifest, n.latent, Tpoints, LAMBDA, manifestNames = "auto",
latentNames = "auto", T0VAR = "auto", T0MEANS = "auto",
MANIFESTMEANS = "auto", MANIFESTVAR = "auto", DRIFT = "auto",
CINT = "auto", DIFFUSION = "auto", TRAITVAR = NULL,
MANIFESTTRAITVAR = NULL, n.TDpred = 0, TDpredNames = "auto",
TDPREDMEANS = "auto", TDPREDEFFECT = "auto", T0TDPREDCOV = "auto",
TDPREDVAR = "auto", TRAITTDPREDCOV = "auto", TDTIPREDCOV = "auto",
n.TIpred = 0, TIpredNames = "auto", TIPREDMEANS = "auto",
TIPREDEFFECT = "auto", T0TIPREDEFFECT = "auto", TIPREDVAR = "auto",
startValues = NULL)
Arguments
n.manifest
Number of manifest indicators per individual at each measurement occasion / time point.
Manifest variables are included as the first element of the wide data matrix, with all the 1:n.manifest manifest variables
at time 1 followed by those of time 2, an
n.latent
Number of latent processes.
Tpoints
Number of time points, or measurement occasions, in the data. This will generally be the maximum
number of time points for a single individual, but may be one extra if sample relative time intervals are used,
see
LAMBDA
n.manifest*n.latent loading matrix relating latent to manifest variables,
with latent processes 1:n.latent along the columns, and manifest variables
1:n.manifest in the rows.
manifestNames
n.manifest length vector of manifest variable names as they appear in the data structure,
without the _Tx time point suffix. Defaults to Y1, Y2, etc.
latentNames
n.latent length vector of latent variable names
(used for naming parameters, defaults to eta1, eta2, etc).
T0VAR
lower triangular n.latent*n.latent cholesky matrix of latent process initial variance / covariance.
"auto" freely estimates all parameters.
T0MEANS
n.latent*1 matrix of latent process means at first time point, T0.
"auto" freely estimates all parameters.
MANIFESTMEANS
n.manifest*1 matrix of manifest means.
"auto" fixes all parameters to 0, but some may need to be freed (by specifying character labels) when a process has multiple indicators.
'free' frees all parameters - identification problems may result if CINT is a
MANIFESTVAR
lower triangular n.manifest*n.manifest cholesky matrix of variance / covariance
between manifests at each measurement occasion (i.e. measurement error / residual).
"auto" freely estimates variance parameters,
and fixes covariances between manifests
DRIFT
n.latent*n.latent DRIFT matrix of continuous auto and cross effects,
relating the processes over time.
"auto" freely estimates all parameters.
CINT
n.latent * 1 matrix of continuous intercepts, allowing for non 0
asymptotic levels of the processes.
"auto" freely estimates all parameters.
DIFFUSION
lower triangular n.latent*n.latent cholesky matrix of diffusion process
variance and covariance (latent error / dynamic innovation).
"auto" freely estimates all parameters.
TRAITVAR
Either NULL, if no trait / individual heterogeneity effect,
or lower triangular n.latent*n.latent cholesky matrix of trait variance / covariance.
"auto" freely estimates all parameters.
MANIFESTTRAITVAR
either NULL (default) if no trait variance / individual heterogeneity in the level of
the manifest indicators, otherwise a lower triangular n.manifest * n.manifest variance / covariance matrix.
Set to "auto" to include and free all parameters - but ide
n.TDpred
Number of time dependent predictors in the dataset.
Each time dependent predictor must have Tpoints-1 columns
(A value of a predictor at the final time point would not have any time to show an effect),
which are included in the data matrix after mani
TDpredNames
n.TDpred length vector of time dependent predictor variable names,
as they appear in the data structure, without the _Tx time point suffix.
Default names are TD1, TD2, etc.
TDPREDMEANS
(n.TDpred * (Tpoints - 1)) rows * 1 column matrix of time dependent predictor means.
If 'auto', the means are freely estimated. Otherwise,
the means for the Tpoints-1 observations of your first time dependent predictor
are followed by those of TDpre
TDPREDEFFECT
n.latent*n.TDpred matrix of effects from time dependent predictors to latent processes.
Effects from 1:n.TDpred columns TDpredictors go to 1:n.latent rows of latent processes.
"auto" freely estimates all parameters.
T0TDPREDCOV
n.latent rows * ((Tpoints-1) rows * n.TDpred) columns covariance matrix
between latents at T0 and time dependent predictors.
"auto" freely estimates all parameters.
TDPREDVAR
lower triangular (n.TDpred * (Tpoints-1)) rows * (n.TDpred * (Tpoints-1)) columns variance / covariance
cholesky matrix for time dependent predictors.
"auto" (default) freely estimates all parameters.
TRAITTDPREDCOV
n.latent rows * (n.TDpred*(Tpoints-1)) columns covariance matrix of
latent traits and time dependent predictors.
The Tpoints-1 columns of the first preditor are followed by those of the second and so on.
Covariances with the trait variance of latent
TDTIPREDCOV
(n.TDpred * (Tpoints-1)) rows * n.TIpred columns covariance
matrix between time dependent and time independent predictors.
"auto" (default) freely estimates all parameters.
n.TIpred
Number of time independent predictors.
Each TIpredictor is inserted at the right of the data matrix, after the time intervals.
TIpredNames
n.TIpred length vector of time independent predictor variable names,
as they appear in the data structure. Default names are TI1, TI2, etc.
TIPREDMEANS
n.TIpred * 1 matrix of time independent predictor means.
If 'auto', the means are freely estimated.
TIPREDEFFECT
n.latent*n.TIpred effect matrix of time independent predictors on latent processes.
"auto" freely estimates all parameters and generates starting values.
T0TIPREDEFFECT
n.latent*n.TIpred effect matrix of time independent
predictors on latents at T0. "auto" freely estimates all parameters, though note that under the default
setting of stationary
for ctFit
, this matrix is ignored as the effect
TIPREDVAR
symmetric n.TIpred * n.TIpred variance / covariance
matrix for all time independent predictors.
"auto" (default) freely estimates all parameters.
startValues
a named vector, where the names of each value must match a parameter in the specified model,
and the value sets the starting value for that parameter during optimization.
If not set, random starting values representing relatively stable processes with s