Learn R Programming

FastJM (version 1.7.0)

JMMLSM: Joint Modeling for Continuous Outcomes

Description

Joint modeling of longitudinal continuous data and competing risks

Usage

JMMLSM(
  cdata,
  ydata,
  long.formula,
  surv.formula,
  variance.formula,
  random,
  control = JMMLSM_control()
)

Value

Object of class JMMLSM with elements

ydata

the input longitudinal dataset for fitting a joint model. It has been re-ordered in accordance with descending observation times in cdata.

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.

beta

the vector of fixed effects for the mean trajectory in the mixed effects location and scale model.

tau

the vector of fixed effects for the within-subject variability in the mixed effects location and scale 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 CompetingRisk = TRUE.

alpha1

the vector of association parameter(s) for the mean trajectory for type 1 failure.

alpha2

the vector of association parameter(s) for the mean trajectory for type 2 failure. Valid only if CompetingRisk = TRUE.

vee1

the vector of association parameter(s) for the within-subject variability for type 1 failure.

vee2

the vector of association parameter(s) for the within-subject variability for type 2 failure. Valid only if CompetingRisk = TRUE.

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 H01. Valid only if CompetingRisk = TRUE.

Sig

the variance-covariance matrix of the random effects.

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 beta.

setau

the standard error of tau.

segamma1

the standard error of gamma1.

segamma2

the standard error of gamma2. Valid only if CompetingRisk = TRUE.

sealpha1

the standard error of alpha1.

sealpha2

the standard error of alpha2. Valid only if CompetingRisk = TRUE.

sevee1

the standard error of vee1.

sevee2

the standard error of vee2. Valid only if CompetingRisk = TRUE.

seSig

the vector of standard errors of covariance of random effects.

loglike

the log-likelihood value.

EFuntheta

a list with the expected values of all the functions of random effects.

CompetingRisk

logical value; TRUE if a competing event are accounted for.

quadpoint

the number of Gauss Hermite quadrature points used for numerical integration.

LongitudinalSubmodelmean

the component of the long.formula.

LongitudinalSubmodelvariance

the component of the variance.formula.

SurvivalSubmodel

the component of the surv.formula.

random

the component of the random.

call

the matched call.

Arguments

cdata

A survival data frame with one row per subject, containing the survival time, event indicator, and baseline covariates.

ydata

A longitudinal data frame in long format.

long.formula

A formula object specifying the response variable and fixed-effect covariates in the longitudinal mean submodel.

surv.formula

A formula object specifying the survival time, event indicator, and covariates in the survival submodel.

variance.formula

A one-sided formula object specifying the fixed-effect covariates in the within-subject variance submodel.

random

A one-sided formula object specifying the random-effects structure in the longitudinal submodel. For example, a random-intercept model can be specified as ~ 1 | ID, and a random-intercept and random-slope model can be specified as ~ x1 + ... + xn | ID.

control

A list of fitting-control options, typically generated by JMMLSM_control(). Available options include:

maxiter

Maximum number of EM iterations. The default is 1000.

tol

Convergence tolerance for the EM algorithm. The default is 1e-4.

quadpoint

Number of Gauss--Hermite quadrature points used for numerical integration. The default is 15.

verbose

Logical value indicating whether to print detailed information at each iteration. The default is FALSE.

initial.para

Optional list of user-supplied initial parameter values for the EM algorithm. The default is NULL.

method

Numerical integration method used in the E-step. Available options are "adaptive" and "standard". The default is "adaptive".

opt

Optimization method used to fit the initial linear mixed-effects model. Available options are "nlminb" and "optim". The default is "nlminb".

Details

Fits a joint mean and within-subject variability model for longitudinal continuous outcomes and competing risks or single-failure time-to-event outcomes.

Examples

Run this code
require(FastJM)
data(ydata)
data(cdata)
## fit a joint model
if (FALSE) {
fit <- JMMLSM(cdata = cdata, ydata = ydata, 
              long.formula = Y ~ Z1 + Z2 + Z3 + time,
              surv.formula = Surv(survtime, cmprsk) ~ var1 + var2 + var3,
              variance.formula = ~ Z1 + Z2 + Z3 + time)
              
## make dynamic prediction of two subjects
cnewdata <- cdata[cdata$ID %in% c(122, 152), ]
ynewdata <- ydata[ydata$ID %in% c(122, 152), ]
survfit <- survfitJM(fit, seed = 100, ynewdata = ynewdata, cnewdata = cnewdata, 
                     u = seq(5.2, 7.2, by = 0.5), Last.time = "survtime",
                     obs.time = "time", method = "GH")
oldpar <- par(mfrow = c(2, 2), mar = c(5, 4, 4, 4))
plot(survfit, include.y = TRUE)
par(oldpar)
}

Run the code above in your browser using DataLab