Estimation of the Population Average Prescription Difference in Randomized Experiments Under Cross Validation
Source:R/PAPDcv.R
PAPDcv.Rd
This function estimates the Population Average Prescription Difference with a budget constaint under cross validation. The details of the methods for this design are given in Imai and Li (2019).
Arguments
- T
A vector of the unit-level binary treatment receipt variable for each sample.
- Thatfp
A matrix where the
i
th column is the unit-level binary treatment that would have been assigned by the first individualized treatment rule generated in thei
th fold. Please ensure that the percentage of treatment units of That is lower than the budget constraint.- Thatgp
A matrix where the
i
th column is the unit-level binary treatment that would have been assigned by the second individualized treatment rule generated in thei
th fold. Please ensure that the percentage of treatment units of That is lower than the budget constraint.- Y
The outcome variable of interest.
- ind
A vector of integers (between 1 and number of folds inclusive) indicating which testing set does each sample belong to.
- budget
The maximum percentage of population that can be treated under the budget constraint. Should be a decimal between 0 and 1.
- centered
If
TRUE
, the outcome variables would be centered before processing. This minimizes the variance of the estimator. Default isTRUE
.
Value
A list that contains the following items:
- papd
The estimated Population Average Prescription Difference.
- sd
The estimated standard deviation of PAPD.
Author
Michael Lingzhi Li, Technology and Operations Management, Harvard Business School mili@hbs.edu, https://www.michaellz.com/;
Examples
T = c(1,0,1,0,1,0,1,0)
That = matrix(c(0,1,1,0,0,1,1,0,1,0,0,1,1,0,0,1), nrow = 8, ncol = 2)
That2 = matrix(c(0,0,1,1,0,0,1,1,1,1,0,0,1,1,0,0), nrow = 8, ncol = 2)
Y = c(4,5,0,2,4,1,-4,3)
ind = c(rep(1,4),rep(2,4))
papdlist <- PAPDcv(T, That, That2, Y, ind, budget = 0.5)
papdlist$papd
#> [1] -1.25
papdlist$sd
#> [1] 1.038328