Description Usage Arguments Value Examples
View source: R/Variable.Importance.ITR.R
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.
1 2 |
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. |
Returns list of total (VI), efficacy (VI.Efficacy), and risk (VI.Risk) ordered variable importance measure calculated for each splitting variable.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.