| plot.rfsrc {randomForestSRC} | R Documentation |
Plot out-of-bag (OOB) error rates and variable importance (VIMP) from a RF-SRC analysis. This is the default plot method for the package.
## S3 method for class 'rfsrc' plot(x, plots.one.page = TRUE, sorted = TRUE, verbose = TRUE, ...)
x |
An object of class |
plots.one.page |
Should plots be placed on one page? |
sorted |
Should variables be sorted by importance values? |
verbose |
Should VIMP be printed? |
... |
Further arguments passed to or from other methods. |
Plot cumulative OOB error rates as a function of number of trees. Plot variable importance (VIMP) if available.
Hemant Ishwaran and Udaya B. Kogalur
Breiman L. (2001). Random forests, Machine Learning, 45:5-32.
Ishwaran H. and Kogalur U.B. (2007). Random survival forests for R, Rnews, 7(2):25-31.
## ------------------------------------------------------------
## classification example
## ------------------------------------------------------------
iris.obj <- rfsrc(Species ~ ., data = iris)
plot(iris.obj)
## ------------------------------------------------------------
## competing risk example
## ------------------------------------------------------------
## use the pbc data from the survival package
## events are transplant (1) and death (2)
if (library("survival", logical.return = TRUE)) {
data(pbc, package = "survival")
pbc$id <- NULL
plot(rfsrc(Surv(time, status) ~ ., pbc, nsplit = 10))
}