Extracts the time-dependent AUC curve from randomForestRHF::auct.rhf()
into a tidy long data frame, one row per time point, with bootstrap
confidence bounds when available and the integrated AUC (iAUC) summary
attached as an attribute.
Arguments
- object
A fitted
rhfobject from randomForestRHF.- ...
Further arguments passed to
randomForestRHF::auct.rhf(), for examplebootstrap.repto request confidence bounds, orrisksetfor the incident definition. Ignored whenauct_fitis supplied.- marker
Risk marker for the AUC:
"chf"(cumulative hazard, default) or"haz"(hazard). Not used whenauct_fitis supplied, though the value is still validated.- auct_fit
Optional precomputed
randomForestRHF::auct.rhf()result (class"auct.rhf") for the sameobject.NULL(default) computes it. Supply it to reuse an expensive bootstrap run.- method
Which time-dependent AUC definition to compute, passed to
randomForestRHF::auct.rhf()."cumulative"(default) ranks accumulated risk through a horizon;"incident"ranks local failures within the risk set at each time. See the note below on choosing between them. Not used whenauct_fitis supplied, though the value is still validated.
Value
A data.frame of class c("gg_auct", "data.frame") with columns
time, auc, se, lower, upper, marker (CI columns NA when no
bootstrap), an iauc attribute (a list with uno, std, uno.se,
std.se, conf.level), a method attribute ("cumulative" or
"incident", taken from the auct.rhf fit, which is what
plot.gg_auct() names on its y axis), and a provenance attribute
derived from object (source, family, ntree, n).
Note
The two definitions answer different questions rather than better and worse versions of the same one. Cumulative/dynamic AUC ranks accumulated risk through a horizon, comparing subjects who have failed by that horizon against subjects still event-free at it. Incident/dynamic AUC ranks local failures within the risk set at each time. Pick the one that matches the question you are asking, and read the two curves as separate estimands rather than as a check on each other.
References
Ishwaran H, Hsich EM, Kogalur UB, Lee DKK (2026). Random Hazard Forests. arXiv:2608.21597. doi:10.48550/arXiv.2608.21597 .
Ishwaran H, Kogalur UB (2026). randomForestRHF: Random Hazard Forests. R package version 2.0.3. https://CRAN.R-project.org/package=randomForestRHF.
Examples
# \donttest{
if (requireNamespace("randomForestRHF", quietly = TRUE)) {
data(pbc, package = "randomForestSRC")
d <- randomForestRHF::convert.counting(
survival::Surv(days, status) ~ ., na.omit(pbc))
o <- randomForestRHF::rhf("Surv(id, start, stop, event) ~ .", d, ntree = 30)
plot(gg_auct(o, marker = "chf"))
}
# }