This package implements the causal KNN and treatment effect projection (TEP) heterogeneous treatment effect estimation algorithms introduced in Hitsch, Misra, and Zhang (2023).
To install this package in R, run the following commands in R:
install.packages("devtools")
devtools::install_github("walterwzhang/causalKNN", build_vignettes = TRUE)
Alternatively, if you are installing the package from source, run the following commands in R:
install.packages(path_to_file, repos = NULL, type="source")
where path_to_file
is the local file path to the repository.
For how to use this package, please see the Intro Vignette or access it from R:
To bootstrap aggregate the estimators, please follow the Bootstrap Vignette:
vignette("causalKNN-Bootstrap")
knn.index.dist
function from the KernelKnn
packageglmnet
) is offered as the treatment effect projection’s regression algorithmHitsch, Guenter J. and Misra, Sanjog and Zhang, Walter, Heterogeneous Treatment Effects and Optimal Targeting Policy Evaluation (February 28, 2023). Available at SSRN: https://ssrn.com/abstract=3111957 or http://dx.doi.org/10.2139/ssrn.3111957