mvjmcs {FastJM} | R Documentation |
Joint modeling of multivariate longitudinal and competing risks data
Description
Joint modeling of multivariate longitudinal continuous data and competing risks
Usage
mvjmcs(
ydata,
cdata,
long.formula,
random = NULL,
surv.formula,
maxiter = 10000,
opt = "nlminb",
tol = 0.005,
print.para = TRUE,
initial.para = NULL
)
Arguments
ydata |
A longitudinal data frame in long format. |
cdata |
A survival data frame with competing risks or single failure. Each subject has one data entry. |
long.formula |
A list of formula objects specifying fixed effects for each longitudinal outcome. |
random |
A formula or list of formulas describing random effects structures (e.g., |
surv.formula |
A formula for the survival sub-model, including survival time and event indicator. |
maxiter |
Maximum number of EM iterations. Default is 10000. |
opt |
Optimization method for mixed model. Default is |
tol |
Convergence tolerance for EM algorithm. Default is 0.0001. |
print.para |
Logical; if |
initial.para |
Optional list of initialized parameters. Default is |
Details
Function fits a joint model for multiple longitudinal outcomes and competing risks using a fast EM algorithm.
Value
Object of class mvjmcs
with elements
beta |
the vector of all biomarker-specific fixed effects for the linear mixed effects sub-models. |
betaList |
the list of biomarker-specific fixed effects for the linear mixed effects sub-model. |
gamma1 |
the vector of fixed effects for type 1 failure for the survival model. |
gamma2 |
the vector of fixed effects for type 2 failure for the survival model.
Valid only if |
alpha1 |
the vector of association parameter(s) for type 1 failure. |
alpha2 |
the vector of association parameter(s) for type 2 failure. Valid only if |
H01 |
the matrix that collects baseline hazards evaluated at each uncensored event time for type 1 failure. The first column denotes uncensored event times, the second column the number of events, and the third columns the hazards obtained by Breslow estimator. |
H02 |
the matrix that collects baseline hazards evaluated at each uncensored event time for type 2 failure.
The data structure is the same as |
Sig |
the variance-covariance matrix of the random effects. |
sigma |
the vector of the variance of the biomarker-specific measurement error for the linear mixed effects sub-models. |
iter |
the total number of iterations until convergence. |
convergence |
convergence identifier: 1 corresponds to successful convergence, whereas 0 to a problem (i.e., when 0, usually more iterations are required). |
vcov |
the variance-covariance matrix of all the fixed effects for both models. |
sebeta |
the standard error of |
segamma1 |
the standard error of |
segamma2 |
the standard error of |
sealpha1 |
the standard error of |
sealpha2 |
the standard error of |
seSig |
the vector of standard errors of covariance of random effects. |
sesigma |
the standard error of variance of biomarker-specific measurement error for the linear mixed effects sub-models. |
pos.mode |
the posterior mode of the conditional distribution of random effects. |
pos.cov |
the posterior covariance of the conditional distribution of random effects. |
CompetingRisk |
logical value; TRUE if a competing event are accounted for. |
ydata |
the input longitudinal dataset for fitting a joint model.
It has been re-ordered in accordance with descending observation times in |
cdata |
the input survival dataset for fitting a joint model. It has been re-ordered in accordance with descending observation times. |
PropEventType |
a frequency table of number of events. |
LongitudinalSubmodel |
the component of the |
SurvivalSubmodel |
the component of the |
random |
the component of the |
call |
the matched call. |
id |
the grouping vector for the longitudinal outcome. |
opt |
the numerical optimizer for obtaining the initial guess of the parameters in the linear mixed effects sub-models. |
runtime |
the total computation time. |
Examples
require(FastJM)
require(survival)
data(mvcdata)
data(mvydata)
# Fit joint model with two biomarkers
fit <- mvjmcs(ydata = mvydata, cdata = mvcdata,
long.formula = list(Y1 ~ X11 + X12 + time,
Y2 ~ X11 + X12 + time),
random = list(~ time | ID,
~ 1 | ID),
surv.formula = Surv(survtime, cmprsk) ~ X21 + X22, maxiter = 1000, opt = "optim",
tol = 1e-3, print.para = FALSE)
fit
# Extract the parameter estimates of longitudinal sub-model fixed effects
fixef(fit, process = "Longitudinal")
# Extract the parameter estimates of survival sub-model fixed effects
fixef(fit, process = "Event")
# Obtain the random effects estimates for first 6 subjects
head(ranef(fit))