Main function and methods (sensemakr)

Here you will find the main functions of the sensemakr package. These functions will likely suffice for most users, for most of the time. The main workflow consists of fitting a linear model with lm() and running the sensitivity analysis with sensemakr(). This function returns an object of class sensemakr with all main sensitivity results, which one can then explore the results with the print, plot and summary methods.

sensemakr-package

Sensemakr: extending omitted variable bias

sensemakr()

Sensitivity analysis to unobserved confounders

plot(<sensemakr>)

Sensitivity analysis plots for sensemakr

print(<sensemakr>) summary(<sensemakr>) ovb_minimal_reporting()

Sensitivity analysis print and summary methods for sensemakr

Sensitivity statistics

These functions compute sensitivity statistics suited for routine reporting in regression table. For example, the robustness_value() computes the minimial strength of association that unobserved variables would need to have, both with the treatment, and with the outcome, to explain away the observed effect. The partial_r2() of the treatment with the outcome computes the minimal strength of association unobserved variables would need to have with the treatment to explain away the effect, even if they explained all residual variation of the outcome.

robustness_value()

Computes the robustness value

partial_r2() partial_f2() partial_f()

Computes the partial R2 and partial (Cohen's) f2

group_partial_r2()

Partial R2 of groups of covariates in a linear regression model

sensitivity_stats()

Sensitivity statistics for regression coefficients

Sensitivity plots

These functions provide direct access to sensitivity contour plots and extreme sensitivity plots for customization.

ovb_contour_plot()

Contour plots of omitted variable bias

ovb_extreme_plot()

Extreme scenarios plots of omitted variable bias

add_bound_to_contour()

Add bounds to contour plot of omitted variable bias

Bias, adjusted estimates and standard errors

Given a pair of partial R2 values that describes unobsverd confounders, these functions compute the bias, adjusted estimate, adjusted standard errors, and other statistics that one would have obtained in the regression that includes a confounder with such stregth.

adjusted_estimate() adjusted_se() adjusted_t() adjusted_partial_r2() bias() relative_bias() rel_bias()

Bias-adjusted estimates, standard-errors and t-values

Bounds on confounding

Functions for computing bounds on the maximum strength of unobserved confounding by means of comparison with the explanatory power of observed covariates.

ovb_bounds() ovb_partial_r2_bound()

Bounds on the strength of unobserved confounders using observed covariates

Datasets

Datasets with applied examples.

colombia

Data from the 2016 referendum for peace with the FARC in Colombia.

darfur

Data from survey of Darfurian refugees in eastern Chad.