Description Usage Arguments Details Value Author(s) References See Also Examples
Using the available longitudinal information up to a starting time point, this function computes an estimate of the ROC and the AUC at a horizon time point based on joint models.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | aucJM(object, newdata, Tstart, ...)
## S3 method for class 'JMbayes'
aucJM(object, newdata, Tstart, Thoriz = NULL,
Dt = NULL, idVar = "id", simulate = FALSE, M = 100, ...)
## S3 method for class 'mvJMbayes'
aucJM(object, newdata, Tstart, Thoriz = NULL,
Dt = NULL, idVar = "id", M = 100, ...)
rocJM(object, newdata, Tstart, ...)
## S3 method for class 'JMbayes'
rocJM(object, newdata, Tstart, Thoriz = NULL,
Dt = NULL, idVar = "id", simulate = FALSE, M = 100, ...)
## S3 method for class 'mvJMbayes'
rocJM(object, newdata, Tstart, Thoriz = NULL,
Dt = NULL, idVar = "id", M = 100, ...)
predict_eventTime(object, newdata, cut_points, ...)
## S3 method for class 'mvJMbayes'
predict_eventTime(object, newdata, cut_points,
idVar = "id", M = 500L, low_percentile = 0.025, ...)
find_thresholds(object, newdata, Dt, ...)
## S3 method for class 'mvJMbayes'
find_thresholds(object, newdata, Dt, idVar = "id",
M = 200L, variability_threshold = NULL,
n_cores = max(1, parallel::detectCores() - 2), ...)
|
object |
an object inheriting from class |
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 |
Tstart |
numeric scalar denoting the time point up to which longitudinal information is to be used to derive predictions. |
Thoriz |
numeric scalar denoting the time point for which a prediction of the survival status is of interest;
|
Dt |
numeric scalar denoting the length of the time interval of prediction; either |
idVar |
the name of the variable in |
simulate |
logical; if |
M |
a numeric scalar denoting the number of Monte Carlo samples; see |
cut_points |
a numeric matrix with first column time-points followed by other columns of optimal cut-points from an ROC curve. |
variability_threshold |
numeric value denoting the treshold in the spread of the posterior distribution calculated from the 2.5% percentile to the median. Default is the 25% percentile of the event times distribution. |
low_percentile |
a numeric value indicating the percentile based on which it will be judged whether the spread of the posterior predictive distribution is too large. |
n_cores |
an integer indicating the number of cores to use for parallel computing. |
... |
additional arguments; currently none is used. |
Based on a fitted joint model (represented by object
) and using the data supplied in argument newdata
, this function
computes the following estimate of the AUC:
\mbox{AUC}(t, Δ t) = \mbox{Pr} \bigl [ π_i(t + Δ t \mid t) < π_j(t + Δ t \mid t) \mid \{ T_i^* \in (t, t + Δ t] \} \cap \{ T_j^* > t + Δ t \} \bigr ],
with i and j denote a randomly selected pair of subjects, and
π_i(t + Δ t \mid t) and π_j(t + Δ t \mid t) denote the conditional survival probabilities calculated by
survfitJM
for these two subjects, for different time windows Δ t specified by argument Dt
using
the longitudinal information recorded up to time t =
Tstart
.
The estimate of \mbox{AUC}(t, Δ t) provided by aucJM()
is in the spirit of Harrell's
c-index, that is for the comparable subjects (i.e., the ones whose observed event times can be ordered), we
compare their dynamic survival probabilities calculated by survfitJM
. For the subjects who due to
censoring we do not know if they are comparable, they contribute in the AUC with the probability that they would
have been comparable.
A list of class aucJM
with components:
auc |
a numeric scalar denoting the estimated prediction error. |
Tstart |
a copy of the |
Thoriz |
a copy of the |
nr |
a numeric scalar denoting the number of subjects at risk at time |
classObject |
the class of |
nameObject |
the name of |
Dimitris Rizopoulos d.rizopoulos@erasmusmc.nl
Antolini, L., Boracchi, P., and Biganzoli, E. (2005). A time-dependent discrimination index for survival data. Statistics in Medicine 24, 3927–3944.
Harrell, F., Kerry, L. and Mark, D. (1996). Multivariable prognostic models: issues in developing models, evaluating assumptions and adequacy, and measuring and reducing errors. Statistics in Medicine 15, 361–387.
Heagerty, P. and Zheng, Y. (2005). Survival model predictive accuracy and ROC curves. Biometrics 61, 92–105.
Rizopoulos, D. (2016). The R package JMbayes for fitting joint models for longitudinal and time-to-event data using MCMC. Journal of Statistical Software 72(7), 1–45. doi:10.18637/jss.v072.i07.
Rizopoulos, D. (2012) Joint Models for Longitudinal and Time-to-Event Data: with Applications in R. Boca Raton: Chapman and Hall/CRC.
Rizopoulos, D. (2011). Dynamic predictions and prospective accuracy in joint models for longitudinal and time-to-event data. Biometrics 67, 819–829.
survfitJM
, dynCJM
, jointModelBayes
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ## Not run:
# we construct the composite event indicator (transplantation or death)
pbc2$status2 <- as.numeric(pbc2$status != "alive")
pbc2.id$status2 <- as.numeric(pbc2.id$status != "alive")
# we fit the joint model using splines for the subject-specific
# longitudinal trajectories and a spline-approximated baseline
# risk function
lmeFit <- lme(log(serBilir) ~ ns(year, 3),
random = list(id = pdDiag(form = ~ ns(year, 3))), data = pbc2)
survFit <- coxph(Surv(years, status2) ~ drug, data = pbc2.id, x = TRUE)
jointFit <- jointModelBayes(lmeFit, survFit, timeVar = "year")
# AUC using data up to year 5 with horizon at year 8
aucJM(jointFit, pbc2, Tstart = 5, Thoriz = 8)
plot(rocJM(jointFit, pbc2, Tstart = 5, Thoriz = 8))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.