varImpPlot.icrf {icrf}R Documentation

'Variable Importance Plot'

Description

'Dotchart of variable importance as measured by' icrf. (Quoted statements are from randomForest by Liaw and Wiener unless otherwise mentioned.)

Usage

varImpPlot(x, ...)

## S3 method for class 'icrf'
varImpPlot(
  x,
  sort = TRUE,
  n.var = min(30, nrow(x$importance)),
  type = NULL,
  forest = NULL,
  main = deparse(substitute(x)),
  ...
)

Arguments

x

'an object of class' icrf

...

'Other graphical parameters to be passed on to dotchart.'

sort

'Should the variables be sorted in decreasing order of importance?'

n.var

'How many variables to show? (Ignored if sort=FALSE.)'

type

'arguments to be passed on to importance'

forest

The forest for which the importance is plotted. If NULL, the best forest is plotted.

main

'plot title'

Value

'Invisibly, the importance of the variables that were plotted.'

Author(s)

Hunyong Cho, Nicholas P. Jewell, and Michael R. Kosorok.

References

Cho H., Jewell N. J., and Kosorok M. R. (2020+). "Interval censored recursive forests"

Examples

# rats data example.
# Note that this is a toy example. Use a larger ntree and nfold in practice.
data(rat2)

 set.seed(1)
 rats.icrf <-
   icrf(~ dose.lvl + weight + male + cage.no, data = rat2,
        data.type = "currentstatus", currentstatus.label = c("survtime", "tumor"),
        returnBest = TRUE, ntree=10, nfold=3)
 varImpPlot(rats.icrf)




[Package icrf version 2.0.2 Index]