Joint Modeling of Longitudinal and Time-to-Event Data under a Bayesian Approach

Shared parameter models for the joint modeling of longitudinal and time-to-event data using MCMC; Dimitris Rizopoulos (2016) .


JMbayes: Joint Models for Longitudinal and Survival Data under the Bayesian Approach

Travis-CI Build Status CRAN status Download counter Research software impact DOI

Description

This repository contains the source files for the R package JMbayes. This package fits joint models for longitudinal and time-to-event data under a Bayesian approach using MCMC. These models are applicable in mainly two settings. First, when focus is on the survival outcome and we wish to account for the effect of an endogenous (aka internal) time-dependent covariates measured with error. Second, when focus is on the longitudinal outcome and we wish to correct for nonrandom dropout.

The package contains two main joint-model-fitting functions, jointModelBayes() and mvJointModelBayes() with similar syntax but different capabilities.

Basic Features jointModelBayes()

  • It can fit joint models for a single longitudinal outcome and a time-to-event outcome.

  • The user can specify her own density function for the longitudinal responses using argument densLong (default is the normal pdf). Among others, this allows to fit joint models with categorical and left-censored longitudinal responses and robust joint models with Student's-t error terms. In addition, using the df.RE argument, the user can also change the distribution of the random effects from multivariate normal to a multivariate Student's-t with prespecified degrees of freedom.

  • For the survival outcome a relative risk models is assumed with a B-spline approximation for the baseline hazard (penalized (default) or regression splines can be used). Left-truncation and exogenous time-varying covariates can also be accommodated.

  • The user has now the option to define custom transformation functions for the terms of the longitudinal submodel that enter into the linear predictor of the survival submodel (arguments extraForm, param). For example, the current value of the longitudinal outcomes, the velocity of the longitudinal outcome (slope), the area under the longitudinal profile. From the aforementioned options, in each model up to two terms can be included. In addition, using argument transFun interactions terms, nonlinear terms (polynomials, splines) can be considered.

Basic Features mvJointModelBayes()

  • It can fit joint models for multiple longitudinal outcomes and a time-to-event outcome.

  • The longitudinal part of the joint model is a multivariate generalized linear mixed effects models, currently allowing for normal, binary and Poisson outcomes. This model is first fitted using function mvglmer().

  • For the survival outcome a relative risk models is assumed with a B-spline approximation for the baseline hazard (penalized (default) or regression splines can be used). Left-truncation, interval censored data and exogenous time-varying covariates can also be accommodated.

  • The user has now the option to define custom transformation functions for the terms of the longitudinal submodel that enter into the linear predictor of the survival submodel (argument Formulas). For example, the current value of the longitudinal outcomes, the velocity of the longitudinal outcome (slope), the area under the longitudinal profile. From the aforementioned options, in each model limitless terms can be included. In addition, using argument Interactions allows to include interactions terms of the longitudinal components with other observed factors. A special case for this argument is to use function tve() that allows for time-varying regression coefficients in the relative risk model. Furthermore, argument transFuns allows to transform the longitudinal components using some pre-defined transformation function (i.e., exp(), expit(), log, sqrt()).

  • The aforementioned features are illustrated in the Multivariate Joint Models vignette.

Dynamic predictions

  • Function survfitJM() computes dynamic survival probabilities.

  • Function predict() computes dynamic predictions for the longitudinal outcome.

  • Function aucJM() calculates time-dependent AUCs for joint models, and function rocJM() calculates the corresponding time-dependent sensitivities and specifies.

  • Function prederrJM() calculates prediction errors for joint models.

  • Function runDynPred() invokes a shiny application that can be used to streamline the calculation of dynamic predictions for models fitted by JMbayes.

Vignettes

Vignettes are available in the doc directory:

News

Changes in version: JMbayes_0.8-7

  • corrected several small bugs in the code.
  • several updates in the shiny app.
  • added functions to select the optimal intervention time.

Changes in version: JMbayes_0.8-69

  • corrected floor ambiguity in C++.
  • added number of false positives and false negatives, as well as F1 score and Youden in rocJM().
  • several updates in the shiny app.

Changes in version: JMbayes_0.8-68

  • vignette in doc/ directory for dynamic predictions.

Changes in version: JMbayes_0.8-67

  • the shiny app for dynamic prediction now works for multivariate models.

Changes in version: JMbayes_0.8-66

  • added function for dynamic predictions from multivariate models.
  • new methods for aucJM(), rocJM() and prederrJM() for multivariate models.
  • handling of interval censored data.
  • allow for time-varying effects in the survival submodel.
  • added a vignette in the doc/ directory for multivariate models.
  • faster C++ implementation.
  • corrected issues in predVars in model.frames.

Changes in version: JMbayes_0.8-6

  • extractFrames() now correctly constructs the design matrix for hierarchical centering.

Changes in version: JMbayes_0.8-3

  • added function mvglmer() for fitting multivariate mixed models using JAGS.
  • added function mvJointModelBayes() for fitting multivariate joint models.

Changes in version: JMbayes_0.8-1

  • shiny app for dynamic predictions from mixed models.

Changes in version: JMbayes_0.8-0

  • package version for JSS paper v72i07.

Changes in version: JMbayes_0.7-9

  • aucJM() and prederrJM() now work with left truncated data.

Changes in version: JMbayes_0.7-8

  • support the use of offset().

Changes in version: JMbayes_0.7-6

  • resolve small bugs in summary.JMbayes().

Changes in version: JMbayes_0.7-5

  • resolve imports from other packages in NAMESPACE.

Changes in version: JMbayes_0.7-2

  • jointModelBayes() can now accept Cox models with left-truncation.

Changes in version: JMbayes_0.7-0

  • New function rocJM() calculates dynamic sensitivity and specificity and the plot produce the ROC curve plot.
  • The new function cvDCL() calculates an estimate of the dynamic cross-entropy.
  • The new function dynInfo() calculates the dynamic Kullaback-Leibler information provided by an extra longitudinal measurement.
  • Function jointModelBayes() can now handle survival submodels with exogenous time-varying covariates.
  • The MCMC algorithm implements now hierarchical centering for the parameters of mixed effects model.
  • Several improvements in the shiny web app for calculating dynamic predictions.

Changes in version: JMbayes_0.6-1

  • Impovements for estimating the weight function.
  • Faster implementation of the MCMC.
  • First internal implementation of optimal screening frequency.

Changes in version: JMbayes_0.6-0

  • Impovements in the shiny web interface.
  • Added functionality for estimating the weight function of the cumulative effect parameterization.
  • Small bug fixes.

Changes in version: JMbayes_0.5-3

  • Small bug fixes.

Changes in version: JMbayes_0.5-2

  • Updates for estimating the weight function.

Changes in version: JMbayes_0.5-1

  • A shiny web application has been added in the demo folder.

Changes in version: JMbayes_0.5-0

  • The MCMC is now implemented with efficient custom-made code and no longer relies on JAGS, WinBUGS or OpenBUGS.

  • The user can specify her own density function for the longitudinal outcome (default is the normal). Among others, this allows fitting joint models with categorical or left-censored longitudinal responses.

  • The baseline hazard is now only estimated with B-splines (regression or penalized).

  • The user has now the option to define custom transformation functions for the longitudinal model terms that enter into the linear predictor of the survival submodel.

  • survfitJM.JMbayes() is faster.

  • Backward-incompatible version; the aforementioned changes require refitting joint models that have been fitted with previous versions.


Changes in version: JMbayes_0.4-1

  • new versions of functions ins() and ibs() with updated 'weight.fun' argument, and makepredictcall() methods.

  • methods have been added for the fitted() and residuals() generics to calculate fitted values and residuals, respectively.

  • a method has been added for the xtable() generic from package xtable for producing a LaTeX table with the results of the joint model.


Changes in version: JMbayes_0.4-0

  • the new function bma.combine() combines predictions using Bayesian model averaging.

  • logLik.JMbayes() can now calculate marginal log-likelihoods averaging over the random effects and the parameters.

  • the new function marglogLik() calculates marginal likelihood contributions for individual subjects.

  • the new generic function aucJM() calculates time-dependent AUCs for joint models.

  • the new generic function dynCJM() calculates a dynamic discrimination index (weighted average of time-dependent AUCs) for joint models.

  • the new generic function prederrJM() calculates prediction errors for joint models.

  • jointModelBayes() can now fit robust joint models in which both the error terms for the longitudinal outcome and the random effects are assumed to follow a Student's t distribution. This is controlled by the arguments 'robust' and 'df' for the error terms, and 'robust.b' and 'df.b' for the random effects.


Changes in version: JMbayes_0.2-0

  • the new control argument 'ordSpline' sets the order of the spline for the B-spline basis (i.e., it is passed to the 'ord' argument of splineDesign()). By setting to 1 a piecewise-constant baseline hazard is fitted.

  • corrected some typos in .Rd files.

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("JMbayes")

0.8-71 by Dimitris Rizopoulos, 9 months ago


https://github.com/drizopoulos/JMbayes


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


Authors: Dimitris Rizopoulos <[email protected]>


Documentation:   PDF Manual  


Task views: Survival Analysis


GPL (>= 2) license


Imports MASS, foreach, jagsUI, Rcpp, xtable, shiny, splines, Hmisc

Depends on nlme, survival, doParallel, rstan

Linking to Rcpp, RcppArmadillo

System requirements: JAGS (http://mcmc-jags.sourceforge.net)


See at CRAN