lambda_parameters {GenericML} | R Documentation |
Estimate the two lambda parameters
Description
Estimates the lambda parameters \Lambda
and \bar{\Lambda}
whose medians are used to find the best ML method.
Usage
lambda_parameters(BLP, GATES, proxy_CATE, membership)
Arguments
BLP |
An object of class |
GATES |
An object of class |
proxy_CATE |
Proxy estimates of the CATE. |
membership |
A logical matrix that indicates the group membership of each observation in |
Value
A list containing the estimates of \Lambda
and \bar{\Lambda}
, denoted lambda
and lambda.bar
, respectively.
References
Chernozhukov V., Demirer M., Duflo E., Fernández-Val I. (2020). “Generic Machine Learning Inference on Heterogenous Treatment Effects in Randomized Experiments.” arXiv preprint arXiv:1712.04802. URL: https://arxiv.org/abs/1712.04802.
Examples
## generate data
set.seed(1)
n <- 200 # number of observations
p <- 5 # number of covariates
D <- rbinom(n, 1, 0.5) # random treatment assignment
Y <- runif(n) # outcome variable
propensity_scores <- rep(0.5, n) # propensity scores
proxy_BCA <- runif(n) # proxy BCA estimates
proxy_CATE <- runif(n) # proxy CATE estimates
membership <- quantile_group(proxy_CATE) # group membership
## perform BLP
BLP <- BLP(Y, D, propensity_scores, proxy_BCA, proxy_CATE)
## perform GATES
GATES <- GATES(Y, D, propensity_scores, proxy_BCA, proxy_CATE, membership)
## get estimates of the lambda parameters
lambda_parameters(BLP, GATES, proxy_CATE, membership)