Per-unit predicted outcome \(E[Y \mid do(T = t), X = x]\) – the first rung
of the ladder, risk / response scoring. Under "ignorability" this is the
component-gated conditional mean; under "latent_confounder" it is the
regime-gated interventional mean. For a binary outcome with
scale = "response" the prediction is the discretised predictive
probability P(Y > threshold).
Usage
proxy_predict(
model,
newdata,
t,
scale = c("link", "response"),
threshold = 0.5
)Arguments
- model
An uplift_model.
- newdata
A data frame carrying the covariate columns.
- t
The treatment value to predict the outcome under.
- scale
One of
"link"(default) or"response".- threshold
Decision threshold for the binary discretised predictive. Default
0.5.
Value
A data.table::data.table with columns id and prediction.
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_regime_segments(),
proxy_retrospective_uplift(),
proxy_uplift(),
uplift_identification(),
uplift_model()
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_predict(m, data.frame(x = c(-1, 0, 1)), t = 1)
#> id prediction
#> <int> <num>
#> 1: 1 -0.002176397
#> 2: 2 0.045330305
#> 3: 3 0.092837007