Learn R Programming

joineR (version 1.0-2)

joint: Fit joint model for survival and longitudinal data measured with error

Description

This generic function fits a joint model with random latent association, building on the formulation described in Wulfsohn and Tsiatis (1997) while allowing for the presence of longitudinal and survival covariates, and three choices for the latent process. The link between the longitudinal and survival processes can be proportional or separate.

Usage

joint(data, long.formula, surv.formula, 
      model=c("intslope", "int", "quad"), 
      sepassoc = FALSE, longsep = FALSE, survsep = FALSE, 
      gpt, lgpt, max.it, tol)

Arguments

data
an object of class jointdata containing the variables named in the formulae arguments.
long.formula
a formula object with the response variable, and the covariates to include in the longitudinal sub-model.
surv.formula
a formula object with the survival time, censoring indicator and the covariates to include in the survival sub-model. The response must be a survival object as returned by the Surv function.
model
a character string specifying the type of latent association. This defaults to the intercept and slope version as seen in Wulfsohn and Tsiatis. For association via the random intercept only, choose model="int", whereas for a qu
sepassoc
if TRUE then the joint model is fitted with separate association, see Details.
longsep
if TRUE, parameter estimates and log-likelihood from a separate linear mixed model analysis of the longitudinal data (see the lme function in the package nlme for details) are returned.
survsep
if TRUE, parameter estimates and log-likelihood from a separate analysis of the survival data using the Cox proportional hazards model are returned (see coxph in the survival package for details).
gpt
the number of quadrature points across which the integration with respect to the random effects will be performed. Defaults to gpt = 3 which produces stable estimates in most datasets.
lgpt
the number of quadrature points which the log-likelihood is evaluated over following a model fit. This defaults to lgpt = 10, though lgpt = 3 is often sufficient.
max.it
the maximum number of iterations of the EM algorithm that the function will perform. Defaults to max.it = 200, though more iterations may be necessary for large, complex data.
tol
the tolerance level before convergence of the algorithm is deemed to have occurred. Default value is tol = 0.001.

Value

  • A list containing the parameter estimates from the joint model and, if required, from either or both of the separate analyses. The combined log-likelihood from a separate analysis and the log-likelihood from the joint model are also produced as part of the fit.

Details

The joint function fits a joint model to survival and longitudinal data. The formulation is similar to Wulfsohn and Tsiatis (1997). A linear mixed effects model is assumed for the longitudinal data $$Y_i = X_{i1}(t_i)\beta_1+D_i(t_i)U_i+\epsilon_i,$$ where $U_i$ is a vector of random effects, $(U_{0i}, \ldots U_{qi})$ whose length depends on the model chosen, ie. $q=1$ for the random intercept model. $D_i$ is the random effects covariate matrix, which will be time-dependent for all but the random intercept model. $X_{i1}$ is the longitudinal design matrix for unit $i$, and $t_i$ is the vector of measurement times for subject $i$. Measurement error is represented by $\epsilon_i$. The Cox proportional hazards model is adopted for the survival data, $$\lambda(t)=\lambda_0(t)\exp{{X_{i2}(t)^T\beta_2+D_i(t)(\gamma^TU_i)}}.$$ The parameter $\gamma$ determines the level of association between the two processes. For the intercept and slope model with separate association we have $$D_i(t) (\gamma^T U_i)=\gamma_0 U_{0i}+\gamma_1 U_{1i} t,$$ whereas under proportional association $$D_i(t) (\gamma^T U_i)=\gamma (U_{0i}+U_{1i} t).$$ $X_{i2}$ is the vector of survival covaraites for unit $i$. The baseline hazard is $\lambda_0$. The function uses an EM algorithm to estimate parameters in the joint model. Starting values are provided by calls to standard R functions lme and coxph for the longitudinal and survival components respectively.

References

The general approach and model formulation is described by Wulfsohn and Tsiatis (1997) with extensions found in Henderson et al (2000). Wulfsohn, M. S. and Tsiatis, A. A. (1997) A Joint Model for Survival and Longitudinal Data Measured with Error. Biometrics, 53, 330-339. Henderson, R., Diggle, P. and Dobson, A. (2000) Joint modelling of longitudinal measurements and event time data. Biostatistics, 1, 465-480.

See Also

lme, coxph, jointdata, jointplot.

Examples

Run this code
data(heart.valve)
heart.surv <- UniqueVariables(heart.valve, 
                              var.col = c("fuyrs","status"),
                              id.col = "num")
heart.long <- heart.valve[, c("num", "time", "log.lvmi")]
heart.cov <- UniqueVariables(heart.valve, 
                             c("age", "hs", "sex"), 
                             id.col = "num")
heart.valve.jd <- jointdata(longitudinal = heart.long, 
                            baseline = heart.cov, 
                            survival = heart.surv, 
                            id.col = "num", 
                            time.col = "time")
fit <- joint(data = heart.valve.jd, 
             long.formula = log.lvmi ~ 1 + time + hs, 
             surv.formula = Surv(fuyrs,status) ~ hs, 
             model = "intslope")

Run the code above in your browser using DataLab