Table of Contents

Package **JM** fits shared parameter models for the joint modelling of normal longitudinal responses and event times under a maximum likelihood approach. Various options for the survival model and optimization/integration algorithms are provided.

The package has a single model-fitting function named `jointModel()`

, which accepts as main arguments a linear mixed effects object fit returned by function `lme()`

of package **nlme**, and a survival object fit returned by either function `coxph()`

or function `survreg()`

of package **survival**. For the longitudinal process only linear mixed effects models are currently available. For the event process, the `method`

argument of `jointModel()`

specifies the type survival model to be fitted and the type of the numerical integration method. Available options are:

`method = ‘Cox-PH-GH’:`

the time-dependent version of a proportional hazards model with unspecified baseline hazard function. The Gauss-Hermite integration rule is used to approximate the required integrals. This option corresponds to the joint model proposed by Wulfsohn and Tsiatis (1997, Biometrics).

`method = ‘piecewise-PH-GH’:`

a relative risk model with a piecewise-constant baseline risk function. The Gauss-Hermite integration rule is used to approximate the required integrals.

`method = ‘weibull-AFT-GH’:`

a time-dependent accelerated failure time model with Weibull or Exponential (by setting argument`scaleWB`

of`jointModel()`

to 1) baseline risk function. The Gauss-Hermite integration rule is used to approximate the required integrals.

`method = ‘weibull-PH-GH’:`

a relative risk model with a Weibull or Exponential (by setting argument`scaleWB`

of`jointModel()`

to 1) baseline risk function. The Gauss-Hermite integration rule is used to approximate the required integrals.

`method = ‘spline-PH-GH’:`

a relative risk model with a B-spline approximation for the baseline risk function. The Gauss-Hermite integration rule is used to approximate the required integrals.

`method = ‘ch-Laplace’:`

an additive log cumulative risk model, in which the log cumulative baseline risk function is approximated using B-splines. A fully exponential Laplace approximation method is used to approximate the required integrals.

For all types of joint models fitted by JM (except the last one) there is the option to use a pseudo adaptive Gauss-Hermite rule. This is much faster than the default option and produces results of equal or better quality. It can be invoked via the ‘method’ argument of jointModel() by specifying in the `method`

argument an option with `“aGH”`

instead of `“GH”`

, e.g., `“spline-PH-aGH”`

instead of `“spline-PH-GH”`

.

**Current Version**: 1.1-0

**Author**: Dimitris Rizopoulos d.rizopoulos@erasmusmc.nl

**Maintainer**: Dimitris Rizopoulos d.rizopoulos@erasmusmc.nl

**Depends**: R (>= 2.14.0), MASS, nlme, splines, survival

**License**: GPL (>= 2)

*Methods for Basic Generics:*Function`jointModel()`

return objects of class`jointModel`

, for which the following methods are available:`print()`

,`coef()`

,`fixef()`

,`ranef()`

,`fitted()`

,`residuals()`

,`summary()`

,`plot()`

,`predict()`

,`vcov()`

, and`logLik()`

. A detailed description of these functions is available at the on-line help files.

*Stratification:*Joint models with`method = “spline-PH-GH”`

or`method = “spline-PH-aGH”`

also allow for stratification factors, i.e., different coefficients for the B-spline approximation of the log baseline risk function are assumed for different levels of categorical variable. To fit such a stratified joint model the user needs to include the stratification factors in the definition of the survival model, which must only be a Cox model. The supporting function`wald.strata()`

can be used to test for equality of the spline coefficients across strata with a Wald test.

*Competing risks:*Competing risks joint models can be also fitted with options`method = “spline-PH-GH”`

or`method = “spline-PH-aGH”`

. As first step, the survival dataset must be transformed to the competing risks long format using function`crLong()`

. Then in the survival submodel the competing risks indicator must be included as a stratification factor. Finally, the joint model is fitted by providing the stratified survival submodel as second argument, and setting argument`CompRisk`

to`TRUE`

.

*MI Residuals:*A new method for calculating residuals and producing diagnostics plots in joint models. This is based on the idea of multiply imputing the missing longitudinal responses under the fitted joint model, creating thus random versions of the complete data set. These complete data sets can then be used to extract conclusions regarding the modelling assumptions, and how these assumptions are affected by the nonrandom dropout.

*Dynamic Prediction:*Function`survfitJM()`

can be used to provide predictions and dynamic predictions of survival probabilities for new subjects in the study, taking into account their longitudinal history and baseline covariates. Function`predict()`

can be analogously used to provide marginal or subject-specific predictions for the longitudinal outcome.

*Dynamic Discrimination Index:*function`dync()`

can be used to provide a dynamic discrimination index for joint models using ROC methodology. In particular, this function computes time-dependent AUCs, and their weighted average over the follow-up period.

*ROC Analysis:*function`rocJM()`

calculates sensitivity and specificity, and the corresponding ROC and AUC for joint models.

*Export Results:*function`xtable.jointModel()`

enhances package**xtable**and produces a LaTeX table with the results of a joint modeling analysis.

- Download latest version from CRAN.

- The Reference manual of the package.

- The changes in the current and previous versions of the package can be found in the NEWS file.

- A paper presenting the main features of the package has been published in the Journal of Statistical Software.

- A book introducing the family of joint models for longitudinal and survival data, and their implementation in the R package
**JM**has been published by Chapman and Hall/CRC. The R code used in the book is available at R-forge.

R script files illustrating the features of the package