opl_tb_c | R Documentation |
Implementing ex-ante treatment assignment using as policy class a threshold-based (or quadrant) approach at specific threshold values c1 and c2 for respectively the selection variables var1 and var2.
opl_tb_c(make_cate_result, z, w, c1 = NA, c2 = NA, verbose = TRUE)
make_cate_result |
A data frame containing the input data. It must include
a column named |
z |
A character vector of length 2 specifying the column names of the two threshold variables to be standardized. |
w |
A character string specifying the column name indicating treatment assignment (binary variable). |
c1 |
Threshold for var1 given by the user or optimized by the the function. This number must be chosen between 0 and 1. |
c2 |
Threshold for var2 given by the user or optimized by the the function. This number must be chosen between 0 and 1. |
verbose |
Set TRUE to print the output on the console. |
The function:
Standardizes the threshold variables to a 0-1 range.
Identifies the optimal thresholds based on grid search for maximizing constrained welfare.
Computes and displays key statistics, including average welfare measures and the percentage of treated units.
The function invisibly returns the input data frame augmented with the following columns:
z[1]_std
: Standardized version of the first threshold variable.
z[2]_std
: Standardized version of the second threshold variable.
units_to_be_treated
: Binary indicator for whether a unit should be treated based on the optimal policy.
Additionally, the function:
Prints the main results summary, including optimal threshold values, average constrained and unconstrained welfare, and treatment proportions.
Displays a scatter plot visualizing the policy assignment.
Athey, S., and Wager S. 2021. Policy Learning with Observational Data, Econometrica, 89, 1, 133–161.
Cerulli, G. 2021. Improving econometric prediction by machine learning, Applied Economics Letters, 28, 16, 1419-1425.
Cerulli, G. 2022. Optimal treatment assignment of a threshold-based policy: empirical protocol and related issues, Applied Economics Letters, DOI: 10.1080/13504851.2022.2032577.
Gareth, J., Witten, D., Hastie, D.T., Tibshirani, R. 2013. An Introduction to Statistical Learning : with Applications in R. New York, Springer.
Kitagawa, T., and A. Tetenov. 2018. Who Should Be Treated? Empirical Welfare Maximization Methods for Treatment Choice, Econometrica, 86, 2, 591–616.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.