Perform the assignment of a treatment rule based on the conditional average treatment effect (CATE) estimate for each individual in the observed data. The procedure uses a cost function (see cost_funs) to decide whether a given unit should be assigned to the treatment or the control condition based on the estimated CATE. The treatment decision accommodates both hard thresholding of the CATE (i.e., analytic evaluation of whether it exceeds a cutoff) and soft thresholding (i.e., assessing difference of the CATE estimate from a threshold via a one-sided hypothesis test), with the latter being the default. Uniqueness of the assigned treatment rule within segmentation strata is the default, allowing for stratum-specific inference; however, when such inference is not of interest, this may be disabled.

assign_rule(data_with_cate, segment_fun = cost_threshold, ...,
  type = c("inferential", "analytic"), unique_rule = TRUE)

Arguments

data_with_cate

A data.table containing the input data, augmented with cross-validated nuisance parameter estimates and an estimate of the CATE. This input object should b ecreated by successive calls to set_est_data and est_cate, or through a wrapper function that composes these function calls automatically.

segment_fun

A particular choice of function for the assignment of a treatment rule to a segment based on a specified threshold or constraint. For details on these, consult the documentation in cost_funs.

...

Additional arguments passed to segment_fun. For details, see the documentation for the cost functions in cost_funs.

type

A character string (of length one) specifying how the treatment decision based on the CATE is to be made. There are two options:

  • "inferential" (the default) uses a hypothesis test to evaluate whether the estimated CATE is statistically different from a threshold and assigns a treatment decision based on the resultant p-value.

  • "analytic" simply evaluates whether the estimated CATE exceeds a given threshold and assigns treatment to segments for which this holds. Note that in both cases the threshold must be either provided directly (as an input to cost_threshold) or will be discovered based on specified constraints (as in cost_budget).

unique_rule

A logical indicating whether the treatment rule to be assigned ought to be unique within segments. The default of TRUE ensures that all units belonging the the same segment receive an identical treatment decision. When this is set to FALSE, subsequent utilities (e.g., summarize_segments) cannot be used to summarize the assigned treatment rule across segments.

Value

A data.table of the full input data data_cate_est, augmented with a single additional column rule that specifies the treatment decision derived from the estimated CATE and a strategy specified by the segmentation function segment_fun.