prune.causalTree: Cost-complexity Pruning of an Rpart Object

Description Usage Arguments Value See Also Examples

Description

Determines a nested sequence of subtrees of the supplied causalTree object by recursively snipping off the least important splits, based on the complexity parameter (cp).

Usage

1
2
3
4
prune(tree, ...)

## S3 method for class 'causalTree'
prune(tree, cp, ...)

Arguments

tree

fitted model object of class "causalTree". This is assumed to be the result of some function that produces an object with the same named components as that returned by the causalTree function.

cp

Complexity parameter to which the causalTree object will be trimmed.

...

further arguments passed to or from other methods.

Value

A new causalTree object that is trimmed to the value cp.

See Also

causalTree

Examples

1
2
3
z.auto <- causalTree(Mileage ~ Weight, car.test.frame)
zp <- prune(z.auto, cp = 0.1)
plot(zp) #plot smaller causalTree object

swager/causalForest documentation built on May 30, 2019, 9:32 p.m.