estimate.causalTree: Estimate the causal effects using honest tree model.

Description Usage Arguments Value Examples

Description

Estimate the causal effects using honest tree model.

Usage

1

Arguments

object

A tree-structured fit object.

formula

A regression formula.

data

New data frame in which to interact the variables named in the formula.

weights

The treatment status of new observations

Value

The estimated causal effects of data. Notice here when the leaf contains only treated or control cases, the function will trace back to the leaf's parent mnode recursively until the parent can be used to compute causal effect.

Examples

1
2
3
4
5
6
7
8
9
fit <- causalTree(y ~ x1 + x2 + x3 + x4 + x5 + x6 + x7 + x8 + x9 + x10, 
data = simulation.1, treatment = simulation.1$treatment, split.option = "CT", 
cv.option = "matching", cp = 0, minsize = 5, minbucket = 5)

opcp <- fit$cptable[,1][which.min(fit$cptable[,4])]

opfit <- prune(fit, opcp)

estimation <- estimate.causalTree(opfit, data = simulation.2, treatment = simulation.2$treatment)

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