# causalTree **Repository Path**: 423230557/causalTree ## Basic Information - **Project Name**: causalTree - **Description**: niniiinininninniin - **Primary Language**: Unknown - **License**: GPL-3.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-01-28 - **Last Updated**: 2024-01-29 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## 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]