Skip to contents

This replaces the legacy internal RATE code and is the only function that actually talks to grf. It flips the CATE vector on the fly when policy is "withhold_best".

Usage

margot_rate_batch(
  model_results,
  policy = c("treat_best", "withhold_best"),
  target = c("AUTOC", "QINI"),
  level = 0.95,
  round_digits = 3,
  model_prefix = "model_",
  verbose = TRUE,
  seed = 12345
)

Arguments

model_results

List returned by margot_causal_forest(), containing results and full_models.

policy

Character; either "treat_best" (default) or "withhold_best".

target

Character; weighting scheme: "AUTOC" (default) or "QINI".

level

Numeric; Wald confidence level (default 0.95).

round_digits

Integer; decimal places to keep (default 3).

model_prefix

Character; common prefix on model names (default "model_").

verbose

Logical; print progress with cli (default TRUE).

seed

Integer; base seed for reproducible RATE computations (default 12345).