print.sensemakr | R Documentation |
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"),
...
)
x |
an object of class |
digits |
minimal number of significant digits. |
... |
arguments passed to other methods. |
object |
an object of class |
verbose |
if 'TRUE', the function prints the LaTeX code with |
format |
code format to print, either |
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
.
Cinelli, C. and Hazlett, C. (2020), "Making Sense of Sensitivity: Extending Omitted Variable Bias." Journal of the Royal Statistical Society, Series B (Statistical Methodology).
# 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, treatment = "directlyharmed",
benchmark_covariates = "female",
kd = 1:3)
# print
sensitivity
# summary
summary(sensitivity)
# prints latex code for minimal sensitivity analysis reporting
ovb_minimal_reporting(sensitivity)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.