Skip to contents

this function takes the output of group_tab() (with rd or rr estimates and e‑values) and returns a markdown bulleted list of outcomes that exhibited causal evidence. it notes that outcomes are presented in the same order as they appear in the plot.

Usage

margot_interpret_marginal(
  df,
  type = c("RD", "RR"),
  order = c("alphabetical", "magnitude_desc", "magnitude_asc", "evaluebound_desc",
    "evaluebound_asc", "custom", "default"),
  original_df = NULL,
  interpret_all_E_gt1 = FALSE
)

Arguments

df

a data frame from group_tab(), including outcome, an effect column, 2.5 %, 97.5 %, E_Value, E_Val_bound, and optionally unit.

type

one of "RD" or "RR". default: "RD".

order

one of "alphabetical", "magnitude_desc", "magnitude_asc", "evaluebound_desc", "evaluebound_asc", "custom", or "default". ("default""magnitude_desc"; deprecated.)

original_df

optional raw data frame for back‑transforming to original scale.

interpret_all_E_gt1

logical; if TRUE, include all estimates with E_Value > 1 & E_Val_bound > 1. default: FALSE.

Value

a list with one element:

interpretation

a markdown string with a bulleted list of outcomes.