lambda_parameters: Estimate the two lambda parameters

View source: R/misc.R

lambda_parametersR Documentation

Estimate the two lambda parameters

Description

Estimates the lambda parameters Λ and \bar{Λ} whose medians are used to find the best ML method.

Usage

lambda_parameters(BLP, GATES, proxy_CATE, membership)

Arguments

BLP

An object of class "BLP".

GATES

An object of class "GATES".

proxy_CATE

Proxy estimates of the CATE.

membership

A logical matrix that indicates the group membership of each observation in Z_CLAN. Needs to be of type "quantile_group". Typically, the grouping is based on CATE estimates, which are for instance returned by proxy_CATE().

Value

A list containing the estimates of Λ and \bar{Λ}, 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)


GenericML documentation built on June 18, 2022, 9:09 a.m.