Description Usage Arguments Details Value References See Also Examples
Estimate heterogeneous treatment effects (HTEs) using the S-Learner strategy.
1 |
data |
a dataframe object containing the variables and values. |
x |
a list of character vectors specifying variables to be included in the model (columns in the data). If unspecified, then it is assumed to be all columns in the data besides y and w. |
y |
a character vector specifying the response variable. |
w |
a character vector specifying the treatment status. |
base_learner |
a character vector specifying the base learner. One of "regression forest" or "OLS". Default is "regression forest". |
plot |
logical; if TRUE, then plots a histogram of treatment effects. |
... |
additional arguments to the base learner. |
Implements the S-learner algorithm described in Künzel et al. (2019) for estimating conditional average treatment effects (CATE). In the S-learner algorithm, the treatment W is included as a feature similar to all of the other covariates without the indicator being given any special role. The combined response function
μ(x, w) = E ≤ft[ Y^{obs} | X = x, W = w \right]
can then be estimated using any base learner (supervised machine learning or regression algorithm) on the entire dataset. Here we implement the S-learner with the option forA linear regression or a regression forest (see Athey, Tibshirani, and Wager (2016)) as the base learner.
The CATE estimator is then given by
\hat{τ}(x) = \hat{μ}(x, 1) - \hat{μ}(x, 0).
a list of two. The first element is a vector of conditional average treatment effect for each observation. The second element is the estimated average treatment effect.
Künzel, Sören R., Jasjeet S. Sekhon, Peter J. Bickel, and Bin Yu. 2019. “Metalearners for estimating heterogeneous treatment effects using machine learning." Proceedings of the National Academy of Sciences of the United States of America. Mar. 116(10): 4156–4165. https://doi.org/10.1073/pnas.1804597116
Athey, Susan, Julie Tibshirani, and Stefan Wager. 2016. “Generalized Random Forests." Working paper; Forthcoming in the Annals of Statistics. https://arxiv.org/abs/1610.01271
1 2 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.