Shared parameter models for the joint modeling of longitudinal and time-to-event data using MCMC; Dimitris Rizopoulos (2016)
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.
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.
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.
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 are available in the doc
directory:
Multivariate_Joint_Models.html illustrates the
basic capabilities of mvJointModelBayes()
.
Dynamic_Predictions.html illustrates how dynamic predictions from multivariate joint models can be computed and evaluated.
Changes in version: JMbayes_0.8-7
Changes in version: JMbayes_0.8-69
Changes in version: JMbayes_0.8-68
Changes in version: JMbayes_0.8-67
Changes in version: JMbayes_0.8-66
Changes in version: JMbayes_0.8-6
Changes in version: JMbayes_0.8-3
Changes in version: JMbayes_0.8-1
Changes in version: JMbayes_0.8-0
Changes in version: JMbayes_0.7-9
Changes in version: JMbayes_0.7-8
Changes in version: JMbayes_0.7-6
Changes in version: JMbayes_0.7-5
Changes in version: JMbayes_0.7-2
Changes in version: JMbayes_0.7-0
Changes in version: JMbayes_0.6-1
Changes in version: JMbayes_0.6-0
Changes in version: JMbayes_0.5-3
Changes in version: JMbayes_0.5-2
Changes in version: JMbayes_0.5-1
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.