Sensitivity analysis print and summary methods for sensemakr
Sensitivity analysis print and summary methods for sensemakr
The print and summary methods provide verbal descriptions of the sensitivity analysis results obtained with the function sensemakr. The function ovb_minimal_reporting provides latex or html code for a minimal sensitivity analysis reporting, as suggested in Cinelli and Hazlett (2020).
## S3 method for class 'sensemakr'print(x, digits = max(3L, getOption("digits")-2L),...)## S3 method for class 'sensemakr'summary(object, digits = max(3L, getOption("digits")-3L),...)ovb_minimal_reporting( x, digits =3, verbose =TRUE, format = c("latex","html","pure_html"),...)
Arguments
x: an object of class sensemakr.
digits: minimal number of significant digits.
...: arguments passed to other methods.
object: an object of class sensemakr.
verbose: if TRUE, the function prints the LaTeX code with cat
format: code format to print, either latex or html. The default html version has some mathematical content that requires mathjax or equivalent library to parse. If you need only html, use the option "pure_html".
Returns
The function ovb_minimal_reporting returns the LaTeX/HTML code invisibly in character form and also prints with cat the LaTeX code. To suppress automatic printing, set verbose = FALSE.
Examples
# runs regression modelmodel <- lm(peacefactor ~ directlyharmed + age + farmer_dar + herder_dar + pastvoted + hhsize_darfur + female + village, data = darfur)# runs sensemakr for sensitivity analysissensitivity <- sensemakr(model, treatment ="directlyharmed", benchmark_covariates ="female", kd =1:3)# printsensitivity
# summarysummary(sensitivity)# prints latex code for minimal sensitivity analysis reportingovb_minimal_reporting(sensitivity)
References
Cinelli, C. and Hazlett, C. (2020), "Making Sense of Sensitivity: Extending Omitted Variable Bias." Journal of the Royal Statistical Society, Series B (Statistical Methodology).