*! version 1.0 16april2020

help sensemakr

Title

sensemakr -- sensitivity tools for OLS

Syntax

sensemakr [depvar] covar
[if] [in]
[,
treatment(treatvar) options]

Main
benchmark(varlist) specify a list of benchmark covariates

gbenchmark(varlist) specify a list of covariates to be used to construct a grouped benchmark

gname(string) specify a custom name for the grouped benchmark

suppress suppress verbose description of sensitivity statistics

latex(filename) save minimal reporting statistics in a named latex file

Graphing
contourplot generates a contour plot for the estimate

tcontourplot generates a contour plot for t(H0)

extremeplot generates an extreme scenario plot

clines(real) sets the number of contour lines to draw on contour plots

clim(numlist) sets the upper and lower limits of the x- and y- axes on contour plots

elim(numlist) sets the upper and lower limits of the x-axis on the extreme scenario plot

Advanced
alpha(real) the significance level. Defaults to 0.05

kd(numlist) specify strength of confounder relative to benchmark in explaining the treatment. Defaults to (1 2 3)

ky(numlist) specify strength of confounder relative to benchmark in explaining the outcome. Defaults to kd. ky and kd must be the same length

noreduce assume that confounders increase the estimate, rather than reduce the estimate

q(real) specify what fraction of the effect estimate would have to be explained away to be problematic. Defaults to 1.

r2yz(numlist) modify r2yz values for the extreme bounds table and extreme scenario plot. Maximum of 4 values.

covar is a varlist that may include factor variables, see fvvarlist.

Description

sensemakr implements sensitivity analysis to omitted variables, as described in Cinelli and Hazlett (2019).

Required

depvar varname that specifies the dependent variable.

covar varlist that specifies the covariates, including the treatment variable. Unordered.

treatment(varname) designates the treatment variable (binary).

Examples

Load example data

. use darfur.dta, clear

Run

Basic syntax

. sensemakr peacefactor directlyharmed age farmer herder pastv hhsize female i.village_f, ///

. treat(directlyharmed) benchmark(female)

Run

Contour plots

. sensemakr peacefactor directlyharmed age farmer herder pastv hhsize female i.village_f, ///

. treat(directlyharmed) benchmark(female) contourplot tcontourplot

Run

Extreme scenario plot

. sensemakr peacefactor directlyharmed age farmer herder pastv hhsize female i.village_f, ///

. treat(directlyharmed) benchmark(female) extremeplot

Run

Changing extreme scenarios

. sensemakr peacefactor directlyharmed age farmer herder pastv hhsize female i.village_f, ///

. treat(directlyharmed) benchmark(female) r2yz(.5 .6 .7 .8) extremeplot

Run

Grouped benchmarks

. sensemakr peacefactor directlyharmed age far herder pastv hhsize female i.village_f, ///

. treat(directlyharmed) gbenchmark(age farmer herder pastv hhsize female) gname(all)

Run

Altering default bounds

. sensemakr peacefactor directlyharmed age farmer herder pastv hhsize female i.village_f, ///

. treat(directlyharmed) benchmark(pastv female) kd(4 5) ky(1 1)

Run

Saved results

By default, sensemakr ereturns the following results, which can be displayed by typing ereturn list after
sensemakr is finished.

Scalars

e(treat_coef) the original treatment coefficient

e(r2yd_x) partial r2 of treatment with outcome

e(rv_q) the robustness value given q

e(rv_qa) the robustness value given q and alpha

e(rv_critical) the null hypothesis (H0)

e(q) the value of q

e(dof) degrees of freedom

e(alpha) the significance level

Macros

e(bench) a list of variables used as benchmarks

e(gbench) a list of variables included in the group benchmark

e(treatment) the treatment variable

e(outcome) the dependent variable

Matrices

e(bounds) bounds table in matrix form

e(extreme) extreme bounds table in matrix form

e(contourgrid) matrix of values used to construct contour plot

e(tcontourgrid) matrix of values used to construct t-contour plot

References

Cinelli, Carlos, and Chad Hazlett. "Making sense of sensitivity: Extending omitted variable bias." Journal of the Royal Statistical Society: Series B (Statistical Methodology) 82.1 (2020): 39-67.

Authors

Carlos Cinelli
UCLA

Jeremy Ferwerda, jeremy.a.ferwerda@dartmouth.edu
Dartmouth College

Chad Hazlett
UCLA