| gce_calibration | R Documentation |
Groups subjects into equal-sized rank groups on the GCE risk score and
compares the model-predicted quantity with an observed estimate in each group.
For omega+ models (gcecox, gcefg) the predicted
\omega^{+} (or \omega) is compared with observed cause-specific
Nelson-Aalen cumulative hazards at time t:
\omega^{+}_{obs} = H_1(t)/H_2(t) and
\omega_{obs} = H_1(t)/(H_1(t)+H_2(t)). For a gcecif fit the
predicted cumulative-incidence ratio \rho (or share \pi_1) is
compared with the observed Aalen-Johansen cumulative incidence within the
group: \rho_{obs} = F_1(t)/F_2(t) and
\pi_{1,obs} = F_1(t)/(F_1(t)+F_2(t)). A calibration plot (predicted vs.
observed with the identity line) and the underlying table are returned.
gce_calibration(object, which = NULL, groups = 5, t = NULL)
## S3 method for class 'gce_calibration'
print(x, digits = max(3L, getOption("digits") - 3L), ...)
## S3 method for class 'gce_calibration'
as.data.frame(x, row.names = NULL, optional = FALSE, ...)
## S3 method for class 'gce_calibration'
plot(x, ...)
object |
a |
which |
quantity to calibrate. For omega+ models |
groups |
number of rank groups (default |
t |
time at which predicted and observed quantities are compared;
defaults to the readout time of the fit. Fixed at the landmark time for a
|
x |
a |
digits |
number of significant digits to print. |
... |
unused. |
row.names, optional |
ignored; present for compatibility with the generic. |
An object of class "gce_calibration" with print,
plot, and as.data.frame methods. Printing shows the
calibration table (group, n, predicted, observed); plot draws
predicted against observed with the identity line and returns the
ggplot object invisibly.
data(hn)
fit <- gcecox(Surv(time, status) ~ age + t_cat + p16, data = hn, t = 5)
cal <- gce_calibration(fit, which = "omegaplus", groups = 5)
cal
plot(cal)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.