Retrospective (counterfactual-mean) uplift for observed units
Source:R/identification.R
proxy_retrospective_uplift.RdFor each observed unit (y, t, x), the counterfactual-mean uplift of moving
from t0 to t1, \(E[Y_{t_1} \mid y, t, x] - E[Y_{t_0} \mid y, t, x]\),
computed by gmm_counterfactual(). Unlike proxy_cate(), the abduction
gate uses the observed outcome y as well, sharpening the per-unit estimate.
Only the counterfactual mean is identified; the spread is not (see
gmm_cf_variance()).
Arguments
- model
An uplift_model.
- observed
A data frame carrying the outcome, treatment, and covariate columns of the observed units.
- t1, t0
The treated and control treatment values. Default
1and0.
Value
A data.table::data.table with columns id, y_obs, t_obs,
cf_mean_t1, retro_uplift.
See also
gmm_counterfactual(), proxy_cate()
Other decision:
fit_uplift(),
gmm_cf_mean(),
gmm_cf_tail_prob(),
gmm_cf_variance(),
gmm_counterfactual(),
gmm_intervene(),
proxy_cate(),
proxy_confounding_gap(),
proxy_decide(),
proxy_identification_report(),
proxy_overlap(),
proxy_policy_value(),
proxy_predict(),
proxy_regime_segments(),
proxy_uplift(),
uplift_identification(),
uplift_model()
Examples
set.seed(1)
n <- 400L
x <- stats::rnorm(n)
t <- stats::rbinom(n, 1L, 0.5)
y <- 1 + (0.5 + x) * t + 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_retrospective_uplift(m, observed = dat[1:5, ])
#> id y_obs t_obs cf_mean_t1 retro_uplift
#> <int> <num> <num> <num> <num>
#> 1: 1 0.7030127 1 0.7030127 0
#> 2: 2 1.7512123 0 1.7512123 0
#> 3: 3 0.9285252 1 0.9285252 0
#> 4: 4 3.3663765 1 3.3663765 0
#> 5: 5 0.9316633 0 0.9316633 0