| regsen_bounds | R Documentation |
Computes the identified set for the coefficient on the primary independent variable in the infeasible long regression, across a grid of sensitivity parameters. Implements the analyses of Diegert, Masten & Poirier (2026) (the default) and of Oster (2019) extended by Masten & Poirier (2026).
regsen_bounds(
formula,
data,
analysis = c("dmp", "oster"),
compare = NULL,
nocompare = NULL,
rxbar = NULL,
rybar = Inf,
cbar = 1,
clow = 0,
rybar_expr = NULL,
delta = NULL,
r2long = 1,
maxovb = NA,
delta_type = c("eq", "bound"),
r2long_type = c("eq", "relative"),
maxovb_type = c("bound", "relative"),
beta = "sign",
product = TRUE,
subset = NULL,
ncores = NULL
)
formula |
Two-sided formula: |
data |
A data.frame. |
analysis |
Which sensitivity analysis to run: |
compare |
Optional character vector of variables to use as the
comparison set. Defaults to all controls if neither |
nocompare |
Optional character vector of controls to exclude from the comparison set. |
rxbar, rybar, cbar |
(DMP) Numeric vectors of sensitivity-parameter
values to sweep over. |
clow |
(DMP) Lower bound on control endogeneity, the |
rybar_expr |
(DMP) A function |
delta, r2long, maxovb |
(Oster) Numeric vectors of sensitivity values. |
delta_type |
One of |
r2long_type |
One of |
maxovb_type |
One of |
beta |
Hypothesis spec for the breakdown point. See |
product |
Logical. If |
subset |
Optional logical or integer vector indicating which rows
of |
ncores |
Number of cores to spread the grid over. |
A regsensitivity object. The results field holds a data.frame
with one row per sensitivity-parameter point.
For a breakdown analysis, results$breakdown is signed: its sign
carries the direction of selection, and for Oster it is the delta
that solves Proposition 3 for the hypothesised value. Feeding that
value back into regsen_bounds() recovers the hypothesised beta, but
feeding abs() of it lands on a different branch of the cubic. The
scalar $breakdown field and the print method report the magnitude,
since that is what is quoted as "the breakdown point". Note that the
scalar exists on regsen_bounds() output only; a regsen_breakdown()
result carries the value in results$breakdown alone.
data(bfg2020)
bnds <- regsen_bounds(
avgrep2000to2016 ~ tye_tfe890_500kNI_100_l6 +
log_area_2010 + lat + lon + temp_mean + rain_mean + elev_mean +
d_coa + d_riv + d_lak + ave_gyi,
data = bfg2020,
cbar = 0.1
)
print(bnds)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.