Plot various survival estimates.
# S3 method for rfsrc
plot.survival(x, plots.one.page = TRUE,
show.plots = TRUE, subset, collapse = FALSE,
cens.model = c("km", "rfsrc"), ...)
An object of class (rfsrc, grow)
or
(rfsrc, predict)
.
Should plots be placed on one page?
Should plots be displayed?
Vector indicating which individuals we want estimates for. All individuals are used if not specified.
Collapse the survival and cumulative hazard function across the individuals specified by subset? Only applies when subset is specified.
Method for estimating the censoring distribution used in the inverse probability of censoring weights (IPCW) for the Brier score:
km
:Uses the Kaplan-Meier estimator.
rfscr
:Uses a censoring random survival forest estimator.
Further arguments passed to or from other methods.
Invisibly, the conditional and unconditional Brier scores, and the integrated Brier score (if they are available).
If subset is not specified, generates the following plots (going from top to bottom, left to right):
Forest estimated survival function for each individual (thick red line is overall ensemble survival, thick green line is Nelson-Aalen estimator).
Brier score (0=perfect, 1=poor, and 0.25=guessing) stratified by ensemble mortality. Based on the IPCW method described in Gerds et al. (2006). Stratification is into 4 groups corresponding to the 0-25, 25-50, 50-75 and 75-100 percentile values of mortality. Red line is the overall (non-stratified) Brier score.
Continuous rank probability score (CRPS) equal to the integrated Brier score divided by time.
Plot of mortality of each individual versus observed time. Points in blue correspond to events, black points are censored observations.
When subset is specified, then for each individual in subset, the following three plots are generated:
Forest estimated survival function.
Forest estimated cumulative hazard function (CHF) (displayed using black lines). Blue lines are the CHF from the estimated hazard function.
Note that when the object x
is of class (rfsrc, predict)
not all plots will be produced. In particular, Brier scores are not
calculated.
Only applies to survival families. In particular, fails for competing
risk analyses. Use plot.competing.risk
in such cases.
Whenever possible, out-of-bag (OOB) values are used.
Gerds T.A and Schumacher M. (2006). Consistent estimation of the expected Brier score in general survival models with right-censored event times, Biometrical J., 6:1029-1040.
Graf E., Schmoor C., Sauerbrei W. and Schumacher M. (1999). Assessment and comparison of prognostic classification schemes for survival data, Statist. in Medicine, 18:2529-2545.
Ishwaran H. and Kogalur U.B. (2007). Random survival forests for R, Rnews, 7(2):25-31.
# NOT RUN {
## veteran data
data(veteran, package = "randomForestSRC")
plot.survival(rfsrc(Surv(time, status)~ ., veteran), cens.model = "rfsrc")
## pbc data
data(pbc, package = "randomForestSRC")
pbc.obj <- rfsrc(Surv(days, status) ~ ., pbc)
## use subset to focus on specific individuals
plot.survival(pbc.obj, subset = 3)
plot.survival(pbc.obj, subset = c(3, 10))
# }
Run the code above in your browser using DataLab