plotNull: Plot Random Forest Importance Null Distributions

Description Usage Arguments Details Value Author(s) Examples

Description

Plot the Random Forest null distributions importance metrics, observed values, and p-values for each predictor variable from the object produced by a call to rfPermute.

Usage

1
2
plotNull(x, preds = NULL, imp.type = NULL, scale = TRUE,
  plot.type = c("density", "hist"), plot = TRUE)

Arguments

x

An object produced by a call to rfPermute.

preds

a character vector of predictors to plot. If NULL, then all predictors are plotted.

imp.type

Either a numeric or character vector giving the importance metric(s) to plot.

scale

Plot importance measures scaled (divided by) standard errors?

plot.type

type of plot to produce: "density" for smoothed density plot, or "hist" for histogram.

plot

display the plot?

Details

The function will generate an plot for each predictor, with facetted importance metrics. The vertical red line shows the observed importance score and the p-value is given in the facet label.

Value

A named list of the ggplot figures produced is invisbly returned.

Author(s)

Eric Archer [email protected]

Examples

1
2
3
4
5
6
7
8
9
# A regression model using the ozone example
data(airquality)
ozone.rfP <- rfPermute(
  Ozone ~ ., data = airquality, ntree = 100, 
  na.action = na.omit, nrep = 50, num.cores = 1
)
  
# Plot the null distributions and observed values.
plotNull(ozone.rfP) 

rfPermute documentation built on May 2, 2019, 12:13 p.m.