Build.RF.ITR: Builds the random forest of interaction trees

Description Usage Arguments Value Examples

View source: R/Build.RF.ITR.R

Description

Builds the random forest of interaction trees

Usage

1
2
3
Build.RF.ITR(dat, col.y, col.trt, col.prtx, split.var, ctg = NA, N0 = 20,
  n0 = 5, max.depth = 10, ntree = 500,
  mtry = max(floor(length(split.var)/3), 1), avoid.nul.tree = F)

Arguments

dat

the data set being used to grow the random forest. Required input.

col.y

the response variable. Required input.

col.trt

the treatment indicator. Must be binary. Required input.

col.prtx

the probability of being assigned to treatment group. Required input.

split.var

vector of columns containing the desired splitting variables. Required input.

ctg

identifies the categorical input columns. Defaults to NA. Not available yet.

N0

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

n0

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

max.depth

controls the maximum depth of the tree. Defaults to 10.

ntree

sets the number of trees to be generated. Defaults to 500.

mtry

sets the number of randomly selected splitting variables to be included. Defaults to max of length(split.var)/3 rounded down and 1.

avoid.nul.tree

controls if trees with no splits (null trees) are allowed. Defaults to FALSE.

Value

summary of randomly generated trees (summary done by tree)

Examples

1
2
3
4
5
forest<-Build.RF.ITR(dat=data, col.y="y", col.trt="trt", col.prtx="prtx", 
                     split.var=3:7)
This builds a forest of 500 trees using the dataset called 'data' with columns
'y', 'trt', and 'prtx' for the outcome, treatement indicator, and probability of being
in treatment group, respectively.  The splitting variables are found in columns 3-7.

jinjinzhou/ITR.Tree documentation built on May 19, 2019, 10:36 a.m.