View source: R/HK2_decomposition.R
| HK2_decomposition | R Documentation | 
Implementation of Heiler & Knaus (2025) decomposition.
HK2_decomposition(
  Y,
  A,
  G,
  T_mat,
  e_mat,
  m_mat,
  sampling_weights = NULL,
  cl = NULL
)
| 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  | 
| 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. | 
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. | 
Heiler, P., Knaus, M.C. (2025). Heterogeneity analysis with heterogeneous treatments.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.