Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/susanathey/causalTree
Working repository for Causal Tree and extensions
https://github.com/susanathey/causalTree
Last synced: 3 days ago
JSON representation
Working repository for Causal Tree and extensions
- Host: GitHub
- URL: https://github.com/susanathey/causalTree
- Owner: susanathey
- License: gpl-3.0
- Created: 2016-04-22T00:11:35.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-04-22T16:19:10.000Z (over 4 years ago)
- Last Synced: 2024-08-02T06:02:11.678Z (3 months ago)
- Language: C
- Size: 3.5 MB
- Stars: 429
- Watchers: 41
- Forks: 149
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# causalTree Introduction
The _causalTree_ function builds a regression model and returns an _rpart_ object, which is the object derived from _rpart_ package, implementing many ideas in the CART (Classification and Regression Trees), written by Breiman, Friedman, Olshen and Stone. Like _rpart_, _causalTree_ builds a binary regression tree model in two stages, but focuses on estimating heterogeneous causal effect.
To install this package in R, run the following commands:
```R
install.packages("devtools")
library(devtools)
install_github("susanathey/causalTree")
```Example usage:
```R
library(causalTree)
tree <- causalTree(y~ x1 + x2 + x3 + x4, data = simulation.1, treatment = simulation.1$treatment,
split.Rule = "CT", cv.option = "CT", split.Honest = T, cv.Honest = T, split.Bucket = F,
xval = 5, cp = 0, minsize = 20, propensity = 0.5)
opcp <- tree$cptable[,1][which.min(tree$cptable[,4])]opfit <- prune(tree, opcp)
rpart.plot(opfit)
```
For More details, please check out briefintro.pdf.
#### References
Susan Athey, Guido Imbens. Recursive Partitioning for Heterogeneous Causal Effects. [link]