knitr::opts_chunk$set( collapse = TRUE, fig.align = "center", comment = "#>", fig.path = "man/figures/figures-" )
sensemakr
implements a suite of sensitivity analysis tools that extends the traditional omitted variable bias framework and makes it easier to understand the impact of omitted variables in regression models, as discussed in Cinelli, C. and Hazlett, C. (2020) "Making Sense of Sensitivity: Extending Omitted Variable Bias." Journal of the Royal Statistical Society, Series B (Statistical Methodology).
Watch the useR! 2020 presentation for a quick introduction on sensemakr.
Check out the software paper preprint!
Check out the Stata version of the package!
Check out the Python version of the package!
Check out the Robustness Value Shiny App at: https://carloscinelli.shinyapps.io/robustness_value/
Check out the package website!
For theoretical details, please see the JRSS-B paper.
For a practical introduction, please see the software paper or see the package vignettes.
For a quick start, watch the 15 min tutorial on sensitivity analysis using sensemakr prepared for useR! 2020:
To install the current CRAN version run:
install.packages("sensemakr")
To install the development version on GitHub make sure you have the package devtools
installed.
# install.packages("devtools") devtools::install_github("carloscinelli/sensemakr")
Please use the following citations:
# loads package library(sensemakr) # loads dataset data("darfur") # runs regression model model <- lm(peacefactor ~ directlyharmed + age + farmer_dar + herder_dar + pastvoted + hhsize_darfur + female + village, data = darfur) # runs sensemakr for sensitivity analysis sensitivity <- sensemakr(model = model, treatment = "directlyharmed", benchmark_covariates = "female", kd = 1:3) # short description of results sensitivity # long description of results summary(sensitivity) # plot bias contour of point estimate plot(sensitivity) # plot bias contour of t-value plot(sensitivity, sensitivity.of = "t-value") # plot bias contour of lower limit of confidence interval plot(sensitivity, sensitivity.of = "lwr") # plot extreme scenario plot(sensitivity, type = "extreme") # latex code for sensitivity table ovb_minimal_reporting(sensitivity)
# html code for sensitivity table ovb_minimal_reporting(sensitivity, format = "pure_html")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.