Summarise Policy-Tree Value and Oracle Regret
Source:R/margot_policy_regret_summary.R
margot_policy_regret_summary.RdComputes policy-tree value contrasts from stored doubly robust action scores. The summary compares a learned policy tree with universal control, universal treatment, and an oracle that chooses the better action score for each observation. The oracle is an optimistic benchmark for describing remaining model-implied heterogeneity; it is not a deployable policy.
Usage
margot_policy_regret_summary(
object,
model_names = NULL,
depths = c(1L, 2L),
weights = NULL,
R = 499L,
seed = 42L,
ci_level = 0.95,
label_mapping = NULL
)
policy_regret_summary(
object,
model_names = NULL,
depths = c(1L, 2L),
weights = NULL,
R = 499L,
seed = 42L,
ci_level = 0.95,
label_mapping = NULL
)Arguments
- object
A list returned by
margot_causal_forest,margot_policy_tree, or a compatible policy-tree object withresultsand either top-levelcovariatesor per-modelplot_data.- model_names
Optional character vector of model names to include, with or without the
model_prefix. Defaults to all available models.- depths
Integer vector of tree depths to evaluate. Defaults to
c(1, 2).- weights
Optional numeric vector of evaluation weights. If
NULL, the function usesobject$weightswhen available.- R
Integer. Bootstrap replicates for uncertainty intervals. Defaults to 499.
- seed
Integer or
NULL. Seed for bootstrap reproducibility.- ci_level
Numeric confidence level for bootstrap percentile intervals. Defaults to 0.95.
- label_mapping
Optional named character vector for display labels.