Joint Modelling of Repeated Measurements and Time-to-Event Data

Analysis of repeated measurements and time-to-event data via random effects joint models. Fits the joint models proposed by Henderson and colleagues (single event time) and by Williamson and colleagues (2008) (competing risks events time) to a single continuous repeated measure. The time-to-event data is modelled using a (cause-specific) Cox proportional hazards regression model with time-varying covariates. The longitudinal outcome is modelled using a linear mixed effects model. The association is captured by a latent Gaussian process. The model is estimated using am Expectation Maximization algorithm. Some plotting functions and the variogram are also included. This project is funded by the Medical Research Council (Grant numbers G0400615 and MR/M013227/1).


Travis-CI Build Status AppVeyor Build Status CRAN_Status_Badge codecov Research software impact

The joineR package implements methods for analyzing data from longitudinal studies in which the response from each subject consists of a time-sequence of repeated measurements and a possibly censored time-to-event outcome. The modelling framework for the repeated measurements is the linear model with random effects and/or correlated error structure (Laird and Ware, 1982). The model for the time-to-event outcome is a Cox proportional hazards model with log-Gaussian frailty (Cox, 1972). Stochastic dependence is captured by allowing the Gaussian random effects of the linear model to be correlated with the frailty term of the Cox proportional hazards model. The methodology used to fit the model is described in Henderson et al. (2002) and Wulfsohn and Tsiatis (1997).

The joineR package also allows competing risks data to be jointly modelled through a cause-specific hazards model. The importance of accounting for competing risks is detailed in Williamson et al. (2007a,b). The methodology used to fit this model is described in Williamson et al. (2008).

Example

The joineR package comes with several data sets including one the describes the survival of patients who underwent aortic valve replacement surgery. The patients were routinely followed up in clinic, where the left ventricular mass index (LVMI) was calculated. To fit a joint model, we must first create a jointdata object, which holds the survival, longitudinal, and baseline covariate data, along with the names of the columns that identify the patient identifiers and repeated time outcomes.

library(joineR)
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")

With the creation of the heart.valve.jd object, we can fit a joint model using the joint function. For this, we need 4 arguments:

  • jointdata: the data object we created above
  • long.formula: the linear mixed effects model formula for the longitudinal sub-model
  • surv.formula: the survival formula the survival sub-model
  • model: the latent association structure.
fit <- joint(data = heart.valve.jd, 
             long.formula = log.lvmi ~ 1 + time + hs, 
             surv.formula = Surv(fuyrs, status) ~ hs, 
             model = "intslope")
 
summary(fit)
#> 
#> Call:
#> joint(data = heart.valve.jd, long.formula = log.lvmi ~ 1 + time + 
#>     hs, surv.formula = Surv(fuyrs, status) ~ hs, model = "intslope")
#> 
#> Random effects joint model
#>  Data: heart.valve.jd 
#>  Log-likelihood: -424.7062 
#> 
#> Longitudinal sub-model fixed effects: log.lvmi ~ 1 + time + hs                              
#> (Intercept)        4.993354492
#> time              -0.006966354
#> hsStentless valve  0.055452730
#> 
#> Survival sub-model fixed effects: Surv(fuyrs, status) ~ hs                           
#> hsStentless valve 0.7926683
#> 
#> Latent association:                 
#> gamma_0 0.8227578
#> 
#> Variance components:
#>         U_0         U_1    Residual 
#> 0.113521695 0.001757578 0.037086210 
#> 
#> Convergence at iteration: 13 
#> 
#> Number of observations: 988 
#> Number of groups: 256

Full details on the data and the functions are provided in the help documentation and package vignette. The purpose of this code is to simply illustrate the ease and speed in fitting the models.

Multivariate data

joineR only models a single repeated measurement and a single event time. If multiple longitudinal outcomes are available (see Hickey et al., 2016), a separate package is available: joineRML.

Funding

This project was funded by the Medical Research Council (Grant numbers G0400615 and MR/M013227/1).

Using the latest developmental version

To install the latest developmental version, you will need the R package devtools and to run the following code

library('devtools')
install_github('graemeleehickey/joineR', build_vignettes = FALSE)

References

  1. Cox DR. Regression models and life-tables. J R Stat Soc Ser B Stat Methodol. 1972; 34(2): 187-220.

  2. Henderson R, Diggle PJ, Dobson A. Joint modelling of longitudinal measurements and event time data. Biostatistics. 2000; 1(4): 465-480.

  3. Hickey GL, Philipson P, Jorgensen A, Kolamunnage-Dona R. Joint modelling of time-to-event and multivariate longitudinal outcomes: recent developments and issues. BMC Med Res Methodol. 2016; 16(1): 117.

  4. Laird NM, Ware JH. Random-effects models for longitudinal data. Biometrics. 1982; 38(4): 963-974.

  5. Williamson PR, Kolamunnage-Dona R, Tudur-Smith C. The influence of competing-risks setting on the choice of hypothesis test for treatment effect. Biostatistics. 2007; 8(4): 689–694.

  6. Williamson PR., Tudur-Smith C, Sander JW, Marson AG. Importance of competing risks in the analysis of anti-epileptic drug failure. Trials. 2007; 8: 12.

  7. Williamson PR, Kolamunnage-Dona R, Philipson P, Marson AG. Joint modelling of longitudinal and competing risks data. Stat Med. 2008; 27: 6426–6438.

  8. Wulfsohn MS, Tsiatis AA. A joint model for survival and longitudinal data measured with error. Biometrics. 1997; 53(1): 330-339.

News

joineR 1.2.3

Bugs

  • Fixed errors when subjects IDs were character format.

Housekeeping

  • Added ORCID IDs for authors.

  • Added Depsy badge to README.

joineR 1.2.2

Minor update

  • Modified the control parameters for the call to nlme::lme() that is used to generate initial parameter estimates. In some bootstrap settings, this was throwing an error, leading to the entire bootstrap run to cease.

Housekeeping

  • Added hex sticker badge.

joineR 1.2.1

Minor updates

  • Added Rd file for joint.object to describe what is contained in an object of class joint.

  • Added the ubiquitous aids dataset for teaching purposes.

Bugs

Fixed an error in the liver dataset.

Maintanence

  • Updated the documentation for the datasets.

  • Added ByteCompile: true to the DESCRIPTION.

joineR 1.2.0

Major updates

  • joint now allows for competing risks data (2 failure types) as per the model developed by Williamson et al. (2008). Other functions have been upgraded to handle the competing risks data.

  • A second vignette for the competing risks model is available.

Minor updates

  • R version 3.4.0 deprecated the recycling of 1x1 matrices, and led to warnings being thrown. This is now fixed.

Maintanence

  • General code and documentation tidy-up.

  • New unit tests added to increase code coverage.

joineR 1.1.0

Minor updates

  • Add simjoint function to simulate data from joint models with several types of association structures.

  • Removed jlike function and integrated likelihood calculation directly into em.alg function.

  • Minor bug fixes to the joint and em.alg functions.

Maintanence

  • Added a NEWS.md file to track changes to the package.

  • Added some unit tests + code coverage monitoring integration.

  • Converted Rd files to roxygen.

  • Converted Sweave vignette to rmarkdown.

  • Updates to vignette and documentation.

  • Minor updates to DESCRIPTION and NAMESPACE to pass R CMD checks, provide additional information, and removed dependency of boot and gdata packages.

  • Added a README.Rmd.

  • Added project to GitHub with integrated Travis CI and appveyor.

joineR <1.1

  • First version of software with subsequent minor patches. No NEWS file was maintained prior to version 1.1

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("joineR")

1.2.4 by Pete Philipson, a month ago


https://github.com/graemeleehickey/joineR/


Report a bug at https://github.com/graemeleehickey/joineR/issues


Browse source code at https://github.com/cran/joineR


Authors: Pete Philipson [aut, cre] (<https://orcid.org/0000-0001-7846-0208>>), Ines Sousa [aut] (<https://orcid.org/0000-0002-2712-1713>>), Peter J. Diggle [aut] (<https://orcid.org/0000-0003-3521-5020>>), Paula Williamson [aut] (<https://orcid.org/0000-0001-9802-6636>>), Ruwanthi Kolamunnage-Dona [aut] (<https://orcid.org/0000-0003-3886-6208>>), Robin Henderson [aut], Graeme L. Hickey [aut] (<https://orcid.org/0000-0002-4989-0054>>), Maria Sudell [ctb], Medical Research Council [fnd] (Grant numbers: G0400615 and MR/M013227/1)


Documentation:   PDF Manual  


Task views: Survival Analysis


GPL-3 | file LICENSE license


Imports graphics, lattice, MASS, nlme, statmod, stats, utils

Depends on survival

Suggests knitr, rmarkdown, testthat, covr


Imported by joineRmeta.

Suggested by joineRML.


See at CRAN