The fitted regimes as an interpretable segment table
Source:R/identification.R
proxy_regime_segments.RdExposes the K mixture components as decision segments: each regime's
prevalence (weight), its within-segment treatment effect (the within-class
treatment slope), its residual standard deviation, and its covariate centre.
This is the interpretable by-product the closed-form reading gives for free.
Arguments
- model
An uplift_model.
- t1, t0
The treated and control treatment values used to scale the within-segment effect. Default the treatment levels observed at fit time (
model@treatment_levels).
Value
A data.table::data.table with columns regime, weight,
effect, sigma, and one column per covariate centre.
Details
When each regime holds a single treatment arm, as often happens with a
binary treatment, every within-segment effect is zero and a warning of
class proxymix_constant_treatment is raised.
See also
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_retrospective_uplift(),
proxy_uplift(),
uplift_identification(),
uplift_model()
Examples
set.seed(1)
n <- 600L
u <- stats::rbinom(n, 1L, 0.5) # unobserved group
x <- stats::rnorm(n)
t <- stats::rbinom(n, 1L, 0.3 + 0.4 * u)
y <- 1 + 5 * u + 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_regime_segments(m)
#> regime weight effect sigma x
#> <int> <num> <num> <num> <num>
#> 1: 1 0.5233333 0.5686059 0.5184822 0.01701770
#> 2: 2 0.4766667 0.4458729 0.5168552 -0.09606112