Description Usage Arguments Details Value Author(s) References See Also Examples
Calculates the conditional timetoevent distribution for a
new subject from the last observation time given their longitudinal
history data and a fitted mjoint
object.
1 2 3 4 5 6 7 8 9 10 11 12 
object 
an object inheriting from class 
newdata 
a list of 
newSurvData 
a 
u 
an optional time that must be greater than the last observed
measurement time. If omitted (default is 
horizon 
an optional horizon time. Instead of specifying a specific
time 
type 
a character string for whether a firstorder
( 
M 
for 
scale 
a numeric scalar that scales the variance parameter of the proposal distribution for the MetropolisHastings algorithm, which therefore controls the acceptance rate of the sampling algorithm. 
ci 
a numeric value with value in the interval (0, 1) specifying
the confidence interval level for predictions of 
progress 
logical: should a progress bar be shown on the console to
indicate the percentage of simulations completed? Default is

Dynamic predictions for the timetoevent data submodel based on an observed measurement history for the longitudinal outcomes of a new subject are based on either a firstorder approximation or Monte Carlo simulation approach, both of which are described in Rizopoulos (2011). Namely, given that the subject was last observed at time t, we calculate the conditional survival probability at time u > t as
P[T ≥ u  T ≥ t; y, θ] \approx \frac{S(u  \hat{b}; θ)}{S(t  \hat{b}; θ)},
where T is the failure time for the new subject, y is the stackedvector of longitudinal measurements up to time t and S(u  \hat{b}; θ) is the survival function.
First order predictions
For type="firstorder"
, \hat{b} is the mode
of the posterior distribution of the random effects given by
\hat{b} = {\arg \max}_b f(b  y, T ≥ t; θ).
The predictions are based on plugging in θ = \hat{θ}, which
is extracted from the mjoint
object.
Monte Carlo simulation predictions
For type="simulated"
, θ is drawn from a multivariate
normal distribution with means \hat{θ} and variancecovariance
matrix both extracted from the fitted mjoint
object via the
coef()
and vcov()
functions. \hat{b} is drawn from the
the posterior distribution of the random effects
f(b  y, T ≥ t; θ)
by means of a MetropolisHasting algorithm with independent multivariate
noncentral tdistribution proposal distributions with
noncentrality parameter \hat{b} from the firstorder prediction and
variancecovariance matrix equal to scale
\times the inverse
of the negative Hessian of the posterior distribution. The choice os
scale
can be used to tune the acceptance rate of the
MetropolisHastings sampler. This simulation algorithm is iterated M
times, at each time calculating the conditional survival probability.
A list object inheriting from class dynSurv
. The list returns
the arguments of the function and a data.frame
with first column
(named u
) denoting times and the subsequent columns returning
summary statistics for the conditional failure probabilities For
type="firstorder"
, a single column named surv
is appended.
For type="simulated"
, four columns named mean
, median
,
lower
and upper
are appended, denoting the mean, median and
lower and upper confidence intervals from the Monte Carlo draws. Additional
objects are returned that are used in the intermediate calculations.
Graeme L. Hickey (graemeleehickey@gmail.com)
Rizopoulos D. Dynamic predictions and prospective accuracy in joint models for longitudinal and timetoevent data. Biometrics. 2011; 67: 819–829.
Taylor JMG, Park Y, Ankerst DP, ProustLima C, Williams S, Kestin L, et al. Realtime individual predictions of prostate cancer recurrence using joint models. Biometrics. 2013; 69: 206–13.
mjoint
, dynLong
, and
plot.dynSurv
.
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  ## Not run:
# Fit a joint model with bivariate longitudinal outcomes
data(heart.valve)
hvd < heart.valve[!is.na(heart.valve$log.grad) & !is.na(heart.valve$log.lvmi), ]
fit2 < mjoint(
formLongFixed = list("grad" = log.grad ~ time + sex + hs,
"lvmi" = log.lvmi ~ time + sex),
formLongRandom = list("grad" = ~ 1  num,
"lvmi" = ~ time  num),
formSurv = Surv(fuyrs, status) ~ age,
data = list(hvd, hvd),
inits = list("gamma" = c(0.11, 1.51, 0.80)),
timeVar = "time",
verbose = TRUE)
hvd2 < droplevels(hvd[hvd$num == 1, ])
dynSurv(fit2, hvd2)
dynSurv(fit2, hvd2, u = 7) # survival at 7years only
out < dynSurv(fit2, hvd2, type = "simulated")
out
## End(Not run)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.