End-to-end Policy Workflow (depth selection → report → interpretation)
Source:R/margot_policy_workflow.R
margot_policy_workflow.Rd
Runs depth comparison, produces a mixed-depth policy summary report, and (optionally) generates per-model interpretations. Designed as a one-call wrapper for policymaker-facing reporting, with safe defaults that prefer simple trees unless depth-2 gains are material.
Usage
margot_policy_workflow(
stability,
original_df = NULL,
label_mapping = NULL,
se_method = c("plugin", "bootstrap"),
R = 499L,
dominance_threshold = 0.8,
strict_branch = TRUE,
min_gain_for_depth_switch = 0.005,
include_interpretation = TRUE,
audience = c("policy", "research"),
use_coherent_in_interpret = TRUE,
brief_include_group = FALSE,
...
)
Arguments
- stability
A `margot_stability_policy_tree` object produced by [margot_policy_tree_stability()].
- original_df
Optional original-scale data (for scale annotations).
- label_mapping
Optional named list mapping outcome and variable names.
- se_method
Character; "plugin" (default) or "bootstrap".
- R
Integer; bootstrap reps when `se_method = "bootstrap"` (default 499).
- dominance_threshold
Numeric in (0,1); required dominance share for a restricted policy recommendation (default 0.8 for policy mode).
- strict_branch
Logical; require positive uplift CI for dominant branch before recommending restricted deployment (default TRUE).
- min_gain_for_depth_switch
Numeric; minimum PV gain required to switch from depth-1 to depth-2 (default 0.005 on standardized outcomes).
- include_interpretation
Logical; also run [margot_interpret_policy_batch()] with the selected depths (default TRUE).
- audience
Character; one of "policy" or "research" (default "policy").
- use_coherent_in_interpret
Logical; if TRUE, reuse PV rows from the coherent summary in interpretations instead of recomputing (default TRUE).
- brief_include_group
Logical; if TRUE, `policy_brief_df` includes the Group column (Wins/Neutral/Caution). If FALSE, returns a simplified brief without Group. Default FALSE for policy audiences.
- ...
Additional pass-through args to [margot_policy_summary_report()], e.g., `split_compact`, `split_top_only`, etc.