CLAN: Performs CLAN

View source: R/clan.R

CLANR Documentation

Performs CLAN

Description

Performs Classification Analysis (CLAN) on all variables in a design matrix.

Usage

CLAN(
  Z_CLAN,
  membership,
  equal_variances = FALSE,
  diff = setup_diff(),
  significance_level = 0.05
)

Arguments

Z_CLAN

A numeric matrix holding variables on which classification analysis (CLAN) shall be performed. CLAN will be performed on each column of the matrix.

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.

equal_variances

If TRUE, then all within-group variances of the CLAN groups are assumed to be equal. Default is FALSE. This specification is required for heteroskedasticity-robust variance estimation on the difference of two CLAN generic targets (i.e. variance of the difference of two means). If TRUE (corresponds to homoskedasticity assumption), the pooled variance is used. If FALSE (heteroskedasticity), the variance of Welch's t-test is used.

diff

Specifies the generic targets of CLAN. Must be an object of class "setup_diff". See the documentation of setup_diff() for details.

significance_level

Significance level. Default is 0.05.

Value

An object of the class "CLAN", consisting of the following components:

generic_targets

A list of result matrices for each variable in Z_CLAN. Each matrix contains inferential results on the CLAN generic targets.

coefficients

A matrix of point estimates of each CLAN generic target parameter.

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.

See Also

quantile_group(), setup_diff()

Examples

## generate data
set.seed(1)
n  <- 150                              # number of observations
p  <- 5                                # number of covariates
Z_CLAN <- matrix(runif(n*p), n, p)     # design matrix to perform CLAN on
membership <- quantile_group(rnorm(n)) # group membership

## perform CLAN
CLAN(Z_CLAN, membership)


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

Related to CLAN in GenericML...