Omitted-variable bias on a fitted model (sensemakr extender)
Source:R/sensitivity.R
morie_sensitivity_omitted_var_bias.RdThin interface to sensemakr::sensemakr: returns the full
Cinelli-Hazlett robustness-value object including benchmark
bounds, adjusted t-statistics, and the data needed to draw
contour plots. Pairs with omitted_variable_bias,
which is the closed-form version that takes estimate +
se + degrees of freedom directly (useful when you don't
have an lm object handy).
Usage
morie_sensitivity_omitted_var_bias(
model,
treatment,
benchmark_covariates = NULL,
kd = c(1, 2, 3),
ky = NULL,
q = 1,
alpha = 0.05,
...
)Arguments
- model
A fitted regression model (
lmor compatible).- treatment
Name of the treatment variable (coefficient).
- benchmark_covariates
Optional character vector of covariate names whose strengths bound the unmeasured-confounder strength.
- kd
Multipliers on the benchmark covariate strength. Default
c(1, 2, 3).- ky
Multipliers on the benchmark covariate's outcome strength. Default equal to
kd.- q
Fraction of the estimate to be explained away. Default 1.
- alpha
Significance level. Default 0.05.
- ...
Additional arguments forwarded to
sensemakr::sensemakr.