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 prediction: $$PE(u | t) = \{R(t)\}^{-1} \sum_{i: T_i \geq s} I(T_i \geq u)
L\{1 - Pr(T_i > u | T_i > t, \tilde{y}_i(t), x_i)\}$$
$$+ \delta_i I(T_i < u) L\{0 - Pr(T_i > u | T_i > t, \tilde{y}_i(t), x_i)\}$$
$$+ (1 - \delta_i) I(T_i < u) [S_i(u \mid T_i, \tilde{y}_i(t)) L\{1 - Pr(T_i > u | T_i > t, \tilde{y}_i(t), x_i)\}$$
$$+ \{1 - S_i(u \mid T_i, \tilde{y}_i(t))\} L\{0 - Pr(T_i > u | T_i > t, \tilde{y}_i(t), x_i)\}],$$
where \(R(t)\) denotes the number of subjects at risk at time \(t = \) Tstart
, \(\tilde{y}_i(t) = \{y_i(s), 0 \leq s \leq t\}\) denotes the available
longitudinal measurements up to time \(t\), \(T_i\) denotes the observed event time for subject \(i\), \(\delta_i\) is the event indicator,
\(s\) is the starting time point Tstart
up to which the longitudinal information is used, and \(u > s\) is the horizon time point Thoriz
.
Function \(L(.)\) is the loss function that can be the absolute value (i.e., \(L(x) = |x|\)), the squared value (i.e., \(L(x) = x^2\)),
or a user-specified function. The probabilities \(Pr(T_i > u | T_i > t, \tilde{y}_i(t), x_i)\) are calculated by survfitJM
.
When interval
is set to TRUE
, then function prederrJM
computes the integrated prediction error in the interval
\((u,t) =\) (Tstart, Thoriz)
defined as $$IPE(u | t) = \sum_{i: t \leq T_i \leq u} w_i(T_i) PE(T_i | t),$$ where
$$w_i(T_i) = \frac{\delta_i G(T_i) / G(t)}{\sum_{i: t \leq T_i \leq u} \delta_i G(T_i) / G(t)},$$ with \(G(.)\) denoting
the Kaplan-Meier estimator of the censoring time distribution.