*! version 1.0.0 5may2018
xtavplots -- All xtavplots added-variable plots in one image

Syntax

xtavplots [, options]

options

Plot
marker_options change look of markers (color,
size, etc.)

marker_label_options add marker labels;
change look or position

addmeans rescale the residuals, regression line
and confidence intervals to be centered on the means of x and y
instead of zero

combine_options any of the options
documented in [G-2] graph combine

Regression line
rlopts(cline_options) affect rendition of
the regression line

nocoef turns off display of coefficent below graph

Confidence interval
noci turns off confidence interval

ciunder confidence intervals underneath scatter

level(level:#) specifies the confidence level

ciopts(fitarea_options:ci_options) affect rendition of
the confidence

ciplot(graph_twoway:plottype) how to plot
CIs; default is ciplot(rline);
a common alternative is ciplot(rarea)

Add plots
"addplot(addplot_option:plot)" add other plots to the
generated graph

Y axis, X axis, Titles, Legend, Overall
twoway_options any options other than by()
documented in [G-3] twoway_options

Description for xtavplots

xtavplots combines xtavplot added-variable graphs
of all the independent variables into one image, after an
xtreg regression. It shows the linear correlations of
each x variable with the y variable conditional on all the
other x variables.

Options for xtavplot

Plot

marker_options
affect the rendition of markers drawn at the plotted points, including
their shape, size, color, and outline; see [G-3] marker_options.

marker_label_options
specify if and how the markers are to be labeled;
see [G-3] marker_label_options.

addmeans rescales the scatterplot values, the regression line and the
confidence intervals to be centered on the mean values of the x and
y variables instead of being centered on zero by default. This may make
the plot more visually intuitive, but it is important to make clear to viewers
that the graph is showing conditioned values rather than the original data.

combine_options
specify any of the options documented in
[G-2] graph combine
to control how xtavplots combines
muliple xtavplot graphs.

Regression line

rlopts(cline_options) affects the rendition of the regression
(fitted) line. See [G-3] cline_options.

nocoef turns off display of the coefficent, standard error and t
statistic from the regression line below the graph.

Confidence interval

noci turns off display of the confidence interval on the graph.

ciunder confidence interval will be graphed underneath the scatter
plot (i.e. data scatter is graphed on top of confidence interval). This is
mainly useful when graphing a solid confidence interval with option
ciplot(rarea).

level(#) specifies the confidence level, in percent,
for confidence interval of the coefficients; see help level.

ciopts(cline_options) affects how the upper and lower
confidence interval lines are rendered.
See [G-3] cline_options.
If you specify ciplot(), then rather than using
cline_options, you should specify whatever is appropriate.

ciplot(plottype)
specifies how the confidence interval is to be plotted. The
default is ciplot(rline), meaning that the prediction will be
plotted by graph twoway rline.

A common alternative is ciplot(rarea), which will
substitute lines around the prediction for shading.
See [G-2] graph twoway for a list of plottype
choices. You may choose any that expect two y variables and one
x variable.

Add plots

addplot(plot) provides a way to add other plots to the generated graph.
See [G-3] addplot_option.

Y axis, X axis, Titles, Legend, Overall

twoway_options are any of the options documented in
[G-3] twoway_options, excluding by(). These include options
for titling the graph (see [G-3] title_options) and for saving
the graph to disk (see [G-3] saving_option).

Examples

Setup

. webuse nlswork

. keep in 1/500

. xtreg ln_w ttl_exp age c.age#c.age not_smsa south, fe

Create all added-variable plots using the x variables

. xtavplots

With solid confidence interval areas

. xtavplots, ciplot(rarea) ciunder

Add title and make gap in graphs below it

. xtavplots, title(Added-Variable Plots) holes(2)

Author

John Luke Gallup, Portland State University, USA
jlgallup@pdx.edu