survfitJM {JM}R Documentation

Prediction in Joint Models

Description

This function computes the conditional probability of surviving later times than the last observed time for which a longitudinal measurement was available.

Usage

survfitJM(object, newdata, idVar = "id", survTimes = NULL, 
        last.time = NULL, M = 200, CI.levels = c(0.025, 0.975), scale = 1.6)

Arguments

object an object inheriting from class jointModel.
newdata a data frame that contains the longitudinal and covariate information for the subjects for which prediction of survival probabilities is required. The names of the variables in this data frame must be the same as in the data frames that were used to fit the linear mixed effects model (using lme()) and the survival model (using coxph() or survreg()) that were supplied as the two first argument of jointModel. In addition, this data frame should contain a variable that identifies the different subjects (see also argument idVar).
idVar the name of the variable in newdata that identifies the different subjects.
survTimes a numeric vector of times for which prediction survival probabilities are to be computed.
last.time a numeric vector or character string. This specifies the known time at which each of the subjects in newdat was known to be alive. If NULL, then this is automatically taken as the last time each subject provided a longitudinal measurement. If a numeric vector, then it is assumed to contain this last time point for each subject. If a character string, then it should be a variable in the data frame newdata.
M integer denoting how many Monte Carlo samples to use – see Details.
CI.levels a numeric vector of length two that specifies which quantiles to use for the calculation of confidence interval for the predicted probabilities – see Details.
scale a numeric value that controls the acceptance rate of the Metropolis-Hastings algorithm – see Details.

Details

Based on a fitted joint model (represented by object), and a history of longitudinal responses tilde{y_i}(t) = {y_i(s), 0 <=q s <=q t} and a covariates vector x_i (stored in newdata), this function provides estimates of Pr(T_i > u | T_i > t, tilde{y}_i(t), x_i), i.e., the conditional probability of surviving time u given that subject i, with covariate information x_i, has survived up to time t and has provided longitudinal the measurements tilde{y}_i(t).

To estimate Pr(T_i > u | T_i > t, tilde{y}_i(t), x_i) a Monte Carlo procedure is followed with the following steps:

Step 1:
Simulate new parameter values, say theta^*, from N(hat{theta}, C(hat{theta})), where hat{theta} are the MLEs and C(hat{theta}) their large sample covariance matrix, which are extracted from object.
Step 2:
Simulate random effects values, say b_i^*, from their posterior distribution given survival up to time t, the vector of longitudinal responses tilde{y}_i(t) and theta^*. This is achieved using a Metropolis-Hastings algorithm with independent proposals from a properly centered and scaled multivariate t distribution. The scale argument controls the acceptance rate for this algorithm.
Step 3
Using theta^* and b_i^*, compute Pr(T_i > u | T_i > t, b_i^*, x_i; theta^*).
Step 4:
Repeat Steps 1-3 M times.

Based on the M estimates of the conditional probabilities, we compute useful summary statistics, such as their mean, median, and quantiles (to produce a confidence interval).

Value

A list of class survfitJM with components:

summaries a list with elements numeric matrices with numeric summaries of the predicted probabilities for each subect.
survTimes a copy of the survTimes argument.
last.time a numeric vector with the time of the last available longitudinal measurement of each subject.
obs.times a list with elements numeric vectors denoting the timings of the longitudinal measurements for each subject.
y a list with elements numeric vectors denoting the longitudinal responses for each subject.
full.results a list with elements numeric matrices with predicted probabilities for each subject in each replication of the Monte Carlo scheme described above.
success.rate a numeric vector with the success rates of the Metropolis-Hastings algorithm described above for each subject.
scale a copy of the scale argument.

Note

Predicted probabilities are not computed for joint models with method = "ch-GH", method = "ch-Laplace" and method = "ph-GH".

Author(s)

Dimitris Rizopoulos d.rizopoulos@erasmusmc.nl

See Also

jointModel, plot.survfitJM

Examples

# linear mixed model fit
fitLME <- lme(sqrt(CD4) ~ obstime + obstime:drug, 
    random = ~ 1 | patient, data = aids)
# cox model fit
fitCOX <- coxph(Surv(Time, death) ~ drug, data = aids.id, x = TRUE)

# joint model fit
fitJOINT <- jointModel(fitLME, fitCOX, 
    timeVar = "obstime", method = "weibull-PH-GH")

# sample of the patients who are still alive
ND <- aids[aids$patient == "141", ]
ss <- survfitJM(fitJOINT, newdata = ND, idVar = "patient", M = 50)
ss

[Package JM version 0.4-0 Index]