Learn R Programming

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

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()).

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:

basic capabilities of mvJointModelBayes().

predictions from multivariate joint models can be computed and evaluated.

Copy Link

Version

Install

install.packages('JMbayes')

Monthly Downloads

623

Version

0.8-85

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Last Published

January 9th, 2020

Functions in JMbayes (0.8-85)

JMbayes

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

Anova Method for Fitted Joint Models
aids

Didanosine versus Zalcitabine in HIV Patients
JMbayesObject

Fitted JMbayes Object
IndvPred_lme

Individualized Predictions from Linear Mixed Models
DerivSplines

Derivatives and Integrals of B-splines and Natural Cubic splines
jointModelBayes

Joint Models for Longitudinal and Time-to-Event Data
marglogLik

Calculates Marginal Subject-specific Log-Likelihood Contributions
mvJointModelBayes

Multivariate Joint Models for Longitudinal and Time-to-Event Data
pbc2

Mayo Clinic Primary Biliary Cirrhosis Data
mvglmer

Multivariate Mixed Models
prothro

Prednisone versus Placebo in Liver Cirrhosis Patients
ranef

Random Effects Estimates for Joint Models
coef

Estimated Coefficients and Confidence Intervals for Joint Models
logLik.JMbayes

Log-Likelihood for Joint Models
prederrJM

Prediction Errors for Joint Models
predict

Predictions for Joint Models
dynInfo

Dynamic Information of an Extra Longitudinal Measurement
dynCJM

A Dynamic Discrimination Index for Joint Models
survfitJM

Prediction in Joint Models
fitted & residuals

Fitted Values and Residuals for Joint Models
runDynPred

Shiny Application for Dynamic Predictions
cvDCL

Dynamic Information
plot.survfitJM

Plot Method for survfit.JMbayes and survfit.mvJMbayes Objects
gt

The Generalized Student's t Distribution
xtable

xtable Method from Joint Models.
tve

Time-Varying Effects using P-splines
plot

MCMC Diagnostics for Joint Models
aucJM

Time-Dependent ROCs and AUCs for Joint Models
bma.combine

Combines Predictions for Bayesian Model Averaging