HK2_decomposition: Implementation of Heiler & Knaus (2025) decomposition.

View source: R/HK2_decomposition.R

HK2_decompositionR Documentation

Implementation of Heiler & Knaus (2025) decomposition.

Description

Implementation of Heiler & Knaus (2025) decomposition.

Usage

HK2_decomposition(
  Y,
  A,
  G,
  T_mat,
  e_mat,
  m_mat,
  sampling_weights = NULL,
  cl = NULL
)

Arguments

Y

Numeric vector containing the outcome variable.

A

Aggregate treatment vector, e.g. binary. Program finds mapping to effective treatment automatically if possible.

G

Heterogeneity group vector. Provide as factor to control ordering, otherwise program orders treatments in ascending order or alphabetically.

T_mat

Logical matrix of effective treatment indicators (n x J). For example created by prep_w_mat.

e_mat

n x J matrix with propensity scores.

m_mat

n x J matrix with fitted outcome values.

sampling_weights

Optional vector of sampling weights.

cl

If not NULL, vector with cluster variables.

Value

Returns an HK2_decomposition object:

parameter

14 x # of heterogeneity groups x # of treatment aggregates x 2 array storing point estimates and standard error of target and intermediate parameters. The ordering is c("CM","ACM","d0","s1","s2","s3","d1","d2","d3","Cov(etX,mut|Xg)","d4","SRCT2","d4'","d5").

IFs

14 x # of heterogeneity groups x # of treatment aggregates x n x 6 array storing the influence fcts and its components corresponding to each parameter for further use.

mapping

Logical matrix storing the mapping of aggregate and effective treatment.

label

List of labels for further useage.

cl

Cluster variable if specified.

References

  • Heiler, P., Knaus, M.C. (2025). Heterogeneity analysis with heterogeneous treatments.


MCKnaus/causalDML documentation built on June 11, 2025, 12:30 a.m.