cost_funs.Rd
Cost functions for the assignment of a dynamic treatment rule to individual
segments identified by realizations of segmentation covariate strata. These
functions are used in conjunction with assign_rule
for the
assignment of a treatment rule. There are three types of cost functions:
cost_threshold
, which enforces a fixed boundary for learning the
dynamic treatment rule. This cost_fun
requires a given cutoff
against which to threshold the estimated CATE. Those segments with a CATE
exceeding the threshold are assigned the treatment, while the treatment
is withheld from those segments whose estimated CATE falls below.
cost_budget
, which data adaptively learns a cost boundary for
assignment of a treatment rule. This cost_fun
requires as input a
maximum proportion of units to receive treatment (and, optionally, any
observationlevel weights), used to derive a cutoff for thresholding of
the estimated CATE. Those segments with estimated CATEs exceeding this
learned threshold are assigned treatment and others not. Note that this
procedure fails to solve the socalled knapsack problem, instead choosing
to treat those segments with the highest estimated CATEs while possibly
failing to exhaust the given budget.
cost_knapsack
, which, similar to cost_budget
, searches for
a cost boundary for the assigment of a treatment rule data adaptively. In
assigning segments to treatment, this routine solves the binary knapsack
problem, using the approximate combinatorial optimization routine through
knapsack
. The result of this routine often mirrors
that of cost_budget
, except that solving the knapsack problem
ensures that the budget is approximately exhausted.
cost_threshold(data_with_cate, threshold = 0, type = c("inferential", "analytic")) cost_budget(data_with_cate, budget, cost_weights = rep(1, nrow(data_with_cate)), type = c("inferential", "analytic")) cost_knapsack(data_with_cate, budget, use_segment_treatment_cost = FALSE, type = c("inferential", "analytic"))
data_with_cate  A 

threshold  A 
type  A

budget  A 
cost_weights  A 
use_segment_treatment_cost  A 