Skip to contents

Flags units whose (treatment, covariate) configuration is poorly covered by the fitted joint – the proxy's mass coverage is the positivity diagnostic. For each treatment arm the squared Mahalanobis distance to the nearest regime centre is converted to an upper-tail chi-square coverage probability; the reported coverage is the minimum across arms, since the treatment effect needs both arms supported. Units below floor are flagged and excluded from proxy_policy_value() by default.

Usage

proxy_overlap(model, newdata, t1 = 1, t0 = 0, floor = 0.01)

Arguments

model

An uplift_model.

newdata

A data frame carrying the covariate columns.

t1, t0

The treated and control treatment values. Default 1 and 0.

floor

Coverage probability below which a unit is flagged. Default 0.01.

Value

A data.table::data.table with columns id, coverage, overlap_flag.

Examples

set.seed(1)
dat <- data.frame(y = stats::rnorm(200), t = stats::rbinom(200, 1L, 0.5),
                  x = stats::rnorm(200))
m <- fit_uplift(dat, "y", "t", "x", N = 1L, regime = "moment")
proxy_overlap(m, newdata = data.frame(x = c(0, 8)))
#>       id     coverage overlap_flag
#>    <int>        <num>       <lgcl>
#> 1:     1 5.887126e-01        FALSE
#> 2:     2 4.893549e-13         TRUE