Learn R Programming

Aggregation Trees

R package to implement aggregation trees, a nonparametric approach to discovering heterogeneous subgroups in a selection-on-observables framework.

aggTrees allows researchers to assess whether there exists relevant heterogeneity in treatment effects by generating a sequence of optimal groupings, one for each level of granularity. For each grouping, we obtain point estimation and inference about the group average treatment effects. Please reference the use as Di Francesco (2022).

To get started, please check the online short tutorial.

Installation

The package can be downloaded from CRAN:

install.packages("aggTrees")

Alternatively, the current development version of the package can be installed using the devtools package:

devtools::install_github("riccardo-df/aggTrees") # run install.packages("devtools") if needed.

References

  • Athey, S., & Imbens, G. W. (2016).

Recursive Partitioning for Heterogeneous Causal Effects. Proceedings of the National Academy of Sciences, 113(27). [paper]

  • Athey, S., Tibshirani, J., & Wager, S. (2019).

Generalized Random Forests. Annals of Statistics, 47(2). [paper]

  • Chernozhukov, V., Demirer, M., Duflo, E., & Fernandez-Val, I. (2017).

Generic Machine Learning Inference on Heterogeneous Treatment Effects in Randomized Experiments. arXiv preprint. [paper]

  • Cotterman, R., & Peracchi, F. (1992).

Classification and aggregation: An application to industrial classification in cps data. Journal of Applied Econometrics, 7(1). [paper]

  • Di Francesco, R. (2022).

Aggregation Trees. CEIS Research Paper, 546. [paper]

  • Holm, S. (1979).

A Simple Sequentially Rejective Multiple Test Procedure. Scandinavian Journal of Statistics, 6(2).

  • Semenova, V., & Chernozhukov, V. (2021).

Debiased Machine Learning of Conditional Average Treatment Effects and Other Causal Functions. The Econometrics Journal, 24(2). [paper]

Copy Link

Version

Install

install.packages('aggTrees')

Monthly Downloads

391

Version

2.1.0

License

MIT + file LICENSE

Maintainer

Riccardo Di Francesco

Last Published

September 9th, 2024

Functions in aggTrees (2.1.0)

node_membership

Node Membership
causal_ols_rpart

Estimation and Inference about the GATEs with rpart Objects
balance_measures

Balance Measures
leaf_membership

Leaf Membership
avg_characteristics_rpart

Leaves Average Characteristics
estimate_rpart

GATE Estimation with rpart Objects
get_leaves

Number of Leaves
descriptive_arm

Descriptive Statistics by Treatment Arm
build_aggtree

Aggregation Trees
dr_scores

Doubly-Robust Scores
expand_df

Covariate Matrix Expansion
summary.aggTrees

Summary Method for aggTrees Objects
print.aggTrees

Print Method for aggTrees Objects
sample_split

Sample Splitting
print.aggTrees.inference

Print Method for aggTrees.inference Objects
subtree

Subtree
log_ratio_sd

Log Ratio of Standard Deviations
rename_latex

Renaming Variables for LATEX Usage
normalized_diff

Normalized Differences
plot.aggTrees

Plot Method for aggTrees Objects