View source: R/multiple_model.R
| trajeR_mult | R Documentation |
Fits a multivariate (joint) group-based trajectory model for multiple longitudinal outcomes.
trajeR_mult(
formulas,
ng,
models,
Method = "L",
Risk = NULL,
TCOV = NULL,
data = NULL,
degre.nu = NULL,
degre.phi = NULL,
ssigma = TRUE,
ymax = NULL,
ymin = NULL,
paraminit = NULL,
control = list(maxit = 100),
hessian = FALSE
)
formulas |
A list of formulas, one for each longitudinal outcome (e.g., |
ng |
A list of integers specifying the number of latent groups for each outcome. |
models |
A character vector of distribution models for each outcome (e.g., c("CNORM", "LOGIT")). Supported models are "CNORM", "LOGIT", "ZIP", "BETA", "POIS". |
Method |
The estimation method. "L" for Likelihood or "EM" for Expectation-Maximization. |
Risk |
An optional one-sided formula for global risk factors that influence group membership (e.g., |
TCOV |
Formula or Matrix. Optional time-dependent covariates. |
data |
data.frame. The dataset containing all variables. |
degre.nu |
A list or vector specifying the polynomial degree for the zero-inflation part of "ZIP" models. |
degre.phi |
A list or vector specifying the polynomial degree for the precision parameter (phi) of "BETA" models. |
ssigma |
Logical. If TRUE, assumes a common standard deviation across groups for "CNORM" models. Can be a vector of logicals, one for each CNORM model. Default is TRUE. |
ymax |
A list or vector of maximum values for censoring in "CNORM" models. |
ymin |
A list or vector of minimum values for censoring in "CNORM" models. |
paraminit |
An optional list of numeric vectors for user-defined initial parameters. The list should have one element per model, plus an optional last element for the psi parameters. |
control |
A list of control parameters for the optimization algorithm (e.g., |
hessian |
Logical. If TRUE, computes the Hessian matrix to estimate standard errors. Default is FALSE. |
An object of class trajectory.mult containing the fitted model parameters for each outcome, the interaction parameters (psi), likelihood, and convergence status.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.