Variable.Importance.ITR: Calcuates variable importance measures for an rcRF object.

Description Usage Arguments Value Examples

View source: R/Variable.Importance.ITR.R

Description

This function accepts a forest object from the 'rcRF()' function and estimates the importance of each predictor. This is accomplished by considering each tree in the forest, obtaining the out-of-bag value for each predictor in that tree, obtaining the permuted out-of-bag value for each predictor in the tree, and comparing the values. A larger discrepancy between the original value and permuted value indicates the predictor is more important in predicting treatment. The function returns the variables in order of importance along with the importance measure, scaled to be out of 1.

Usage

1
2
Variable.Importance.ITR(rcRF.fit, n0 = 5, N0 = 20, sort = TRUE,
  details = FALSE, depth = 1, AIPWE = FALSE)

Arguments

rcRF.fit

rcRF object from rcRF(). Required input.

n0

minimum number of treatment/control observations needed in a split to call a node terminal. Defaults to 2.

N0

minimum number of observations needed in a split to call a node terminal. Defaults to 20.

sort

sort the variable importance measure? Defaults to TRUE.

details

print details of each tree as the function progresses. Defaults to FALSE.

depth

internal variable.

AIPWE

indicator for AIPWE estimation.

Value

Returns list of total (VI), efficacy (VI.Efficacy), and risk (VI.Risk) ordered variable importance measure calculated for each splitting variable.

Examples

1
2
3
4
5
6
7
8
9
set.seed(123)
dat <- generateData()
# Build a forest with 100 trees
fit <- rcRF(data = dat, 
            split.var = 1:10, 
            ntree = 200,
            risk.threshold = 2.75, 
            lambda = 1)
VI <- Variable.Importance.ITR(fit)

kdoub5ha/rcITR documentation built on Aug. 5, 2020, 9:05 p.m.