Index plots of estimation results
indexplot7 [indexvar] [ , predict_options high(#) low(#) zero(str) points graph_options ]
Description
indexplot7 plots estimation results (by default whatever predict produces by default) from an immediately previous regress or similar command versus a numeric index or identifier variable, if that is supplied, or observation number, if that is not supplied. Values are shown, by default, as vertical spikes starting at 0.
The plot is restricted to the estimation sample.
indexplot7 is a renamed clone of indexplot 1.2.3 which is for Stata 7. Stata 8 users should use indexplot 2.0.0 or later.
Options
predict_options are options of predict used to specify results other than the default.
high(#) specifies that the highest # of the results are to be identified by their identifiers or observation numbers using xlabel().
low(#) specifies that the lowest # of the results are to be identified by their identifiers or observation numbers using xlabel().
Note that the total number of observations identified by high() and low() must not exceed 25.
zero(str) specifies an alternative to 0 as the starting point for spikes. zero(mean) specifies the mean of whatever is being shown; zero(varname) specifies the values of a numeric variable varname; and zero(#) specifies a number #.
points specifies the plotting of points rather than spikes.
graph_options are bbox(), connect(), gap(), l1title(), saving(), symbol(), title(), xlabel(), ylabel() and yline(). Note that high() and low() control xlabel(); points sets connect(ii); and, if changing symbol() or connect(), that two variables are plotted on the y axis, the result and whatever is "zero".
Examples
. use auto
. regress mpg weight . indexplot7 . indexplot7, sy([_n]i) c(..) . indexplot7, zero(mean) . indexplot7, residual hi(3) lo(3) . indexplot7, cooksd hi(6)
. glm mpg weight, link(log) . indexplot7, anscombe hi(3) lo(3)
. use census
. encode state, gen(State) . regress marriage pop . indexplot7 State, residual hi(1)
Author
Nicholas J. Cox, University of Durham, U.K. n.j.cox@durham.ac.uk
Acknowledgements
Phil Ender and Andy Sloggett provided very helpful comments.
Also see
On-line: help for graph, regdiag, regplot (if installed), anovaplot (if installed), ovfplot (if installed)