regsen_tidy: Tidy a sensitivity analysis

View source: R/broom.R

regsen_tidyR Documentation

Tidy a sensitivity analysis

Description

A broom-style tidier. tidy() returns one row per point of the sensitivity sweep; glance() returns a one-row summary of the analysis as a whole.

Usage

regsen_tidy(x, conf.int = TRUE, ...)

regsen_glance(x, ...)

Arguments

x

A regsensitivity object.

conf.int

Ignored; present for signature compatibility with other tidiers. Sensitivity bounds are not confidence intervals – see regsen_boot() for sampling uncertainty in the breakdown point.

...

Ignored.

Details

Implementing these makes regsensitivity objects usable by anything that speaks the broom vocabulary – most usefully modelsummary, which is how many economists assemble their tables.

The methods are registered on generics' tidy() and glance() only when that package is installed, so it stays an optional dependency. Without it, call regsen_tidy() and regsen_glance() directly.

Value

regsen_tidy() returns a data.frame with the sensitivity parameters plus conf.low/conf.high holding the identified set, using broom's column names so downstream packages recognise them. regsen_glance() returns a one-row data.frame.

Examples

data(bfg2020)
res <- regsen_bounds(
    avgrep2000to2016 ~ tye_tfe890_500kNI_100_l6 + log_area_2010 + lat + lon,
    data = bfg2020, compare = c("log_area_2010", "lat", "lon"),
    cbar = c(0.1, 0.5)
)
head(regsen_tidy(res))
regsen_glance(res)

regsensitivity documentation built on Nov. 23, 2026, 9:08 a.m.