Learn R Programming

joineRmeta

The joineRmeta package implements methods to analyse multi-study joint data consisting of a single continuous longitudinal outcome, and a single possible censored time-to-event outcome. The modelling framework for the longitudinal data is a linear mixed effects model (Laird and Ware, 1982). The modelling framework for the time-to-event outcome is a Cox proportional hazards model with an unspecified baseline hazard (Cox, 1972). The longitudinal and time-to-event sub-model are linked through an association structure. Currently only the random effects only proportional association is available (see Gould et al, 2015). The methodology used to fit the model is described in Henderson et al (2000) and Wulfsohn and Tsiatis (1997).

The joineRmeta package contains methods to perform the second stage of a two stage meta-analysis (MA) of study specific joint modelling fits, and one stage MA of multi-study joint data where between study heterogeneity can be accounted for using interaction terms with study membership variables, study level random effects, or baseline hazard stratified by study. The package also contains plotting and simulation functions.

Example

The joineRmeta package contains several simulated datasets. One of these is simdat which contains data from 5 studies, each containing 500 simulated individuals. This data first must be transformed into a joint data object

library(joineRmeta)
data(simdat)
jointdat<-tojointdata(longitudinal = simdat$longitudinal, 
  survival = simdat$survival, id = "id", longoutcome = "Y", 
  timevarying = c("time","ltime"), survtime = "survtime", cens = "cens",
  time = "time")
jointdat$baseline$study <- as.factor(jointdat$baseline$study)
jointdat$baseline$treat <- as.factor(jointdat$baseline$treat)

Using the data held in the jointdata object jointdat we can then fit a one stage multi-study joint model.

  • data: the data object we created above
  • long.formula: the linear mixed effects model formula for the longitudinal sub-model
  • long.rand.ind: vector of character strings denoting variables to assign individual level random effects to
  • long.rand.stud: vector of character strings denoting variables to assign study level random effects to
  • sharingstrct: the association structure linking the sub-models - currently this must be set to "randprop".
  • surv.formula: the survival formula the survival sub-model.
  • study.name: character string denoting the variable name of the study membership variable.
  • strat: logical value denoting whether or not the baseline hazard is to be stratified by study.
fit <- jointmeta1(data = jointdat, 
                  long.formula = Y ~ 1 + time + treat, 
                  long.rand.ind = c("int", "time"), 
                  long.rand.stud = "treat",
                  sharingstrct = "randprop",
                  surv.formula = Surv(survtime, cens) ~ treat, 
                  study.name = "study", 
                  strat = T)
summary(fit)

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 model fitting.

Funding

This work was supported by the Health eResearch Centre (HeRC) funded by the Medical Research Council Grant MR/K006665/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('mesudell/joineRmeta', 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. Gould LA, Boye M, Bois F, et al. Joint modeling of survival and longitudinal non-survival data: current methods and issues. Report of the DIA Bayesian joint modeling working group. Stat Med. 2015; 34(14): 2181-2195.

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

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

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

Copy Link

Version

Install

install.packages('joineRmeta')

Monthly Downloads

4

Version

0.1.2

License

GPL-3 | file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Maria Sudell

Last Published

January 24th, 2020

Functions in joineRmeta (0.1.2)

jointmeta1

One stage joint meta function
confint.jointmeta1SE

Extract confidence intervals
joineRfits2

Study specific joint model fits using the joineR package
joineRfits

Study specific joint model fits using the joineR package
formula.jointmeta1

Extract formulae from joint model fit
fixef.jointmeta1

Extract fixed effects
jointmeta2

Function to pool joint model fits in two stage MA
jointmetaplot

Produce plots of longitudinal and survival outcomes
jlike

Function to calculate joint likelihood used in the jointmeta1 function
jointmetaSE

Bootstrapping function to obtain standard errors for jointmeta1 fit
EMalgRandprop

EM algorithm function used in jointmeta1
JMfits2

Study specific joint model fits using the JM package
longst

Function for longitudinal starting values
removeafter

Code to remove longitudinal information recorded after survival outcome
summary.jointmeta1

Summary function for jointmeta1
sep

Function to determine if estimates from separate models were requested
sortDat

Sort data by order of increasing survival time
onestage0

One stage jointmeta1 fit and bootstrapped standard errors
jointmetaplotall

Arrange study plots into a grid
JMfits

Study specific joint model fits using the JM package
jointmeta1.object

Fitted jointmeta1 object
jointmeta1SE.object

A jointmeta1SE object
vcov.jointmeta1SE

Extract the variance covariance matrix from the bootstrapped results
print.jointmeta1

Print function for jointmeta1 objects
onestage4

One stage jointmeta1 fit and bootstrapped standard errors
onestage3

One stage jointmeta1 fit and bootstrapped standard errors
onestage1

One stage jointmeta1 fit and bootstrapped standard errors
print.jointmeta1SE

Print function for jointmeta1SE objects
onestage2

One stage jointmeta1 fit and bootstrapped standard errors
rancov

Function to extract the estimated covariance matrices for the random effects specified in the model
ranef.jointmeta1

Function to extract estimated random effects
simdat3

Simulated joint longitudinal and survival dataset containing 5 studies
simdat2

Simulated joint longitudinal and survival dataset containing 3 studies
simdat2randlevels

Data simulation function for the case with both individual level random effects and study level random effects
simdat

Simulated joint longitudinal and survival dataset containing 5 studies
simjointmeta

Simulation of multi-study joint data
tojointdata

Function to change multi-study data into jointdata format
simdat1randlevel

Data simulation function for the case with only individual level random effects
survst

Function for survival starting values