-------------------------------------------------------------------------------
help for indexplot
-------------------------------------------------------------------------------

Index plots of estimation results

indexplot [if exp] [in range] [ , show([observed|predict_options]) high(#) low(#) base(str) recast(plottype) graph_options]

Description

indexplot plots estimation results (by default whatever predict produces by default) from an immediately previous regress or similar command versus observation number (i.e. _n). Values are shown, by default, as dropped lines starting at 0. Note that the base need not be visible by default.

The plot is restricted to at most the estimation sample. A subset of that may be shown by using if and/or in.

Options

show() specifies either observed, to show observed values of the response, or options of predict. This option is used to specify results other than the default. Any abbreviation of observed or of predict_options that is acceptable to predict may be used.

high(#) specifies that the highest # of the results are to be identified by their observation numbers using xlabel().

low(#) specifies that the lowest # of the results are to be identified by their observation numbers using xlabel().

base() specifies an alternative to 0 as the starting point for dropped lines. base(mean) specifies the mean of whatever is being shown; otherwise base(#) specifies a number #.

recast() specifies the use of a twoway plottype differing from the default of twoway dropline.

graph_options are those of twoway dropline, except if recast() is specified, in which case they are those of the plottype specified.

Examples

. sysuse auto

. regress mpg weight . indexplot . indexplot, base(mean) . indexplot, show(residual) . indexplot, show(residual) hi(3) lo(3) mla(make) . indexplot, show(cooksd) hi(6) mla(make)

. glm mpg weight, link(log) . indexplot, show(anscombe) hi(3) lo(3)

. sysuse census

. regress marriage pop . indexplot, show(dfbeta(pop)) mla(state)

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 on a previous version.

Also see