Confounding gap: the sensitivity of the effect to the latent regime
Source:R/identification.R
proxy_confounding_gap.RdPer-unit difference between the ignorability-mode and do-mode effects,
\(\Delta(x) = \tau_{\mathrm{obs}}(x) - \tau_{\mathrm{do}}(x)\). Under
ignorability the two coincide and \(\Delta \equiv 0\); a non-zero gap is a
sensitivity signal – how much the estimated effect would move if a
fitted regime confounded treatment and outcome beyond X – not a
correction the data licenses.
Arguments
- model
An uplift_model.
- newdata
A data frame carrying the covariate columns.
- t1, t0
The treated and control treatment values. Default
1and0.
Value
A data.table::data.table with columns id, tau_obs, tau_do,
gap, overlap_flag.
See also
proxy_cate(), proxy_identification_report()
Other decision:
fit_uplift(),
gmm_cf_mean(),
gmm_cf_tail_prob(),
gmm_cf_variance(),
gmm_counterfactual(),
gmm_intervene(),
proxy_cate(),
proxy_decide(),
proxy_identification_report(),
proxy_overlap(),
proxy_policy_value(),
proxy_predict(),
proxy_regime_segments(),
proxy_retrospective_uplift(),
proxy_uplift(),
uplift_identification(),
uplift_model()
Examples
set.seed(1)
n <- 600L
x <- stats::rnorm(n)
t <- stats::rbinom(n, 1L, 0.5)
y <- 0.5 * t + x + stats::rnorm(n, sd = 0.5)
dat <- data.frame(y = y, t = t, x = x)
m <- fit_uplift(dat, "y", "t", "x", N = 2L, regime = "sample",
max_iter = 80L, seed = 1L)
proxy_confounding_gap(m, data.frame(x = c(-1, 0, 1)))
#> id tau_obs tau_do gap overlap_flag
#> <int> <num> <num> <num> <lgcl>
#> 1: 1 0.4438819 0 0.4438819 FALSE
#> 2: 2 0.4850305 0 0.4850305 FALSE
#> 3: 3 0.5261790 0 0.5261790 FALSE