*! version 1.1.0 1aug2022

Title

regsensitivity plot -- Plot results of regression sensitivity analysis

Syntax

regsensitivity plot
[,
display_options formatting_options]

display_options

nobreakdown suppress horizontal line for the breakdown point

yrange set the range of the y axis manually

ywidth set the range of the y axis symmetrically around beta(medium)

display_options control the elements of the graph to be included.

formatting_options

boundpatterns(pattern_list) specify line patterns for bound lines

boundcolors(color_list) specify line colors for bound lines

boundoptions(connect_options) additional options for bound lines

breakdownoptions(added_line_options) additional options for breakdown analysis conclusion line

legoptions(legend_options) formatting options for legend

nolegend suppress legend

twoway_options formatting options for overall plot

formatting_options control the style of the graph.

Desciption

regsensitivity plot is a post estimation command that plots results
from a call to regsensitivity. When called
after regsensitivity bounds, it plots
the upper and lower bounds of beta for a range of values of the sensitivity
parameter used in the analysis (rxbar or delta). When multiple values were
provided for the secondard sensitivity parameter (cbar or R-squared(long)),
multiple sets of bounds are plotted on the same plot.

When plotting the identified set for the Oster (2019) with the eq option
selected for delta, the lines on the graph are the exact identified set.
Otherwise, the plot shows the upper and lower bounds.

When called after regsensitivity breakdown,
it plots the breakdown point as a function of the secondary sensitivity parameter
(cbar or R-squared(long)), or as a function of the hypothesis for the breakdown
point.

The graph is produced using Stata's graph twoway command, and formatting
can be controlled by passing options to that command through the interface
provided by this command.

Options

Display options

nobreakdown if this option is not chosen, a horizontal line is drawn at the
value of the breakdown analysis hypothesis.

yrange sets the range of the y-axis manually.

ywidth sets the range of the y-axis by centering the axis at beta(medium)
and expanding the axis by ywidth * Std(X) in either direction. This is
generally appropriate for the analysis in DMP (2022) since the identified set
is symmetric around beta(medium).

Formatting options

boundpatterns(pattern_list) bounds for each of the values of the secondary sensitivity parameter are
plotted using these patterns. pattern_list is a list of up to 8 linepatternstyles
separated by spaces. If only one pattern is specified it is used for all
estimates.

boundcolors(color_list) bounds for each of the values of the secondary sensitivity parameterare
plotted using these colors. color_list is a list of up to 8 colorstyles
separated by spaces. If only one pattern is specified it is used for all
estimates.

boundoptions(connect_options) bound lines for all the values of the secondary sensitivity parameter
are plotted with these options. Any options in connect_options
may be included except for lpattern and lcolor.

breakdownoptions(added_line_options) a horizontal line at the
breakdown analysis conclusion is plotted with these display options. Any suboptions to
added_line_options may be included.

legoptions(legend_options) by default, a legend is added to the
plot if the secondary sensitivity parameter has multiple values.
Any legend_options can be included except order or label.

nolegend suppresses the legend.

twoway_options any additional twoway_options to
Stata's twoway command may be included except for legend_options

Remarks

See here for links to the articles
this package is based on, more detailed documentation on the implementation in
this package, and examples of its use.

Examples

. sysuse bfg2020, clear

Loads Bazzi, Fiszbein, and Gebresilasse (2020) dataset included with regsensitivity package.

. local y avgrep2000to2016

. local x tye_tfe890_500kNI_100_l6

. local w1 log_area_2010 lat lon temp_mean rain_mean elev_mean d_coa d_riv d_lak ave_gyi

. local w0 i.statea

Set the variables to use in the analysis

. regsensitivity bounds `y' `x' `w1' `w0', compare(`w1') oster delta(-2 2)

Calculates the identified set for Beta across a range of values of rxbar,
holding cbar fixed at 1. Displays a table with the results and stores the
results in e(), and plots the results.

. regsensitivity plot, xline(1)

Plots the results, showing a vertical line at x = 1 where there is an asymptote.

For more examples see this vignette.