rf.significance: Random Forest model significance test

Description Usage Arguments Value Author(s) References Examples

View source: R/rf.significance.R

Description

Performs significance test for classification and regression Random Forests models.

Usage

1
rf.significance(x, xdata, q = 0.99, p = 0.05, nperm = 999, ...)

Arguments

x

randomForest class object

xdata

Independent variables (x) used in model

q

Quantile threshold to test classification models

p

p-value to test for significance in regression models

nperm

Number of permutations

...

Additional Random Forests arguments

Value

A list class object with the following components:

For Regression problems:

RandRsquare Vector of random R-square values

Rsquare The R-square of the "true" model

Accept Is the model significant at specified p-value (TRUE/FALSE)

TestQuantile Quantile threshold used in significance plot

pValueThreshold Specified p-value

pValue p-values of randomizations

nPerm Number of permutations

For Classification problems:

RandOOB Vector of random out-of-bag (OOB) values

RandMaxError Maximum error of randomizations

test.OOB Error if the "true" model

Accept Is the model significant at specified p-value (TRUE/FALSE)

TestQuantile Quantile threshold used in significance plot

pValueThreshold Specified p-value

pValue p-values of randomizations

nPerm Number of permutations

Author(s)

Jeffrey S. Evans <jeffrey_evans<at>tnc.org>

References

Murphy M.A., J.S. Evans, and A.S. Storfer (2010) Quantify Bufo boreas connectivity in Yellowstone National Park with landscape genetics. Ecology 91:252-261

Evans J.S., M.A. Murphy, Z.A. Holden, S.A. Cushman (2011). Modeling species distribution and change using Random Forests CH.8 in Predictive Modeling in Landscape Ecology eds Drew, CA, Huettmann F, Wiersma Y. Springer

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Not run: 
# Regression
require(randomForest)
  set.seed(1234)	
    data(airquality)
    airquality <- na.omit(airquality)
 ( rf.mdl <- randomForest(x=airquality[,2:6], y=airquality[,1]) )
   ( rf.perm <- rf.significance(rf.mdl, airquality[,2:6], nperm=99, ntree=501) )
 
# Classification
require(randomForest)
  set.seed(1234)	
    data(iris)
      iris$Species <- as.factor(iris$Species) 
 ( rf.mdl <- randomForest(iris[,1:4], iris[,"Species"], ntree=501) )
   ( rf.perm <- rf.significance(rf.mdl, iris[,1:4], nperm=99, ntree=501) ) 

## End(Not run)

rfUtilities documentation built on Oct. 3, 2019, 9:04 a.m.