## ----setup, include = FALSE---------------------------------------------------
knitr::opts_chunk$set(collapse = TRUE, comment = "#>")

## ----crosswalk----------------------------------------------------------------
library(causalfrag)
fit <- lm(mpg ~ am + wt + hp, data = mtcars)
crosswalk(fit, treatment = "am")

## ----crosswalk-t--------------------------------------------------------------
crosswalk(4.2228, df = 5668)

## ----band---------------------------------------------------------------------
crosswalk(1.972, df = 244)

## ----basic, eval = FALSE------------------------------------------------------
# result <- fragility_report(model = fit, treatment = "am", data = mtcars)
# print(result)        # includes the crosswalk for lm fits
# cat(result$narrative)

## ----stepwise, eval = FALSE---------------------------------------------------
# res <- run_sensitivity(fit, treatment = "am", data = mtcars)
# res <- flag_fragility(res)          # per-framework classification
# res <- interpret_sensitivity(res)   # template narrative (or LLM if configured)
# cat(generate_report(res))

