prune: Optimal sequence of subtrees of rcDT model

Description Usage Arguments Value

View source: R/prune.R

Description

Determines the sequence of optimally pruned subtrees for an rcDT model.

Usage

1
2
prune(tre, risk.control = TRUE, risk.threshold = NA, lambda = lambda,
  a = 0, test = NULL, AIPWE = FALSE, n0 = 5, ctgs = NULL)

Arguments

tre

sets the tree to be pruned

risk.control

logical indicating if risk controlled model is under consideration

risk.threshold

numeric indicating the value of the risk control. Defaults to NA.

a

numeric value of the splitting penalty. Defaults to zero.

test

data.frame of testing data. Defaults to NULL.

AIPWE

indicator for AIPWE estimation.

n0

minimum number of observations allowed in a treatment group. Defaults to 5.

ctgs

columns of categorical variables.

Value

summary of sequence of subtrees

result

contains columns: 'node.rm' which is the weakest link at each iteration of the pruning algorithm; 'size.tree' and 'n.tmnl' give number of total nodes and terminal nodes in each subtree; 'alpha' is the weakest link scoring criteria; 'V' and 'V.test' are the overall value of the tree for the training and tesing samples; 'V.a' and 'Va.test' give the penalized value for the training and testing samples. 'Benefit' and 'Risk' scores are also reported.

subtrees

list of optimally pruned subtrees of 'tre'


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