Skip to contents

This function post-processes the results from margot_causal_forest to flip CATE estimates, RATE results, QINI RATE results, QINI curves, and (by default) recalculates the policy trees for the specified outcomes. If recalc_policy = FALSE, tree regeneration is skipped.

Usage

margot_flip_forests(
  model_results,
  flip_outcomes,
  model_prefix = "model_",
  recalc_policy = TRUE,
  verbose = TRUE
)

Arguments

model_results

A list containing the model results from margot_causal_forest().

flip_outcomes

A character vector of outcome variable names for which CATE estimates should be flipped.

model_prefix

A character string indicating the prefix used for model names in the results list. Default is "model_".

recalc_policy

Logical; if TRUE (default) recalculates policy trees for flipped outcomes.

verbose

Logical indicating whether to display detailed messages during execution. Default is TRUE.

Value

A modified copy of the model_results list with flipped CATE estimates and recalculated policy trees.