------------------------------------------------------------------------------- help forqfrplot7-------------------------------------------------------------------------------

Quantile plots of fitted and residuals

qfrplot7[,superreversea(#){normal|gaussian}graph_options]

Description

qfrplot7plots quantile plots of fitted values, minus their mean, and residuals from the previous estimation command. Fitted values are whateverpredictproduces by default and residuals are whateverpredict, resproduces. Comparing the distributions gives an overview of their variability and some idea of their fine structure. By default plots are side-by-side.The plot is restricted to the estimation sample.

This is the original of

qfrplotfor Stata 7, renamedqfrplot7. Users of Stata 8 upwards should upgrade toqfrplot.

RemarksA quantile plot shows ordered values versus the so-called plotting positions, or if the

normalorgaussianoption is specified, the corresponding quantiles of a standard normal (Gaussian) distribution. For n values ordered minimum first, the plotting positions are (i - a) / (n - 2a + 1) for i = 1, ..., n, where a is by default 0.5.W.S. Cleveland in

Visualizing data(Hobart Press, Summit, NJ, 1993) gives many side-by-side quantile plots of fit and residuals, which he calls "residual-fit spread plots". See example on p.41. However, he also uses this term for side-by-side time series plots of fit and residuals. See example on p.157. The command name and description here emphasise the use of a quantile plot.

Options

superspecifies that plots are to be superimposed, not side-by-side.

reversereverses the sort order, so that ordered values are plotted against 1 - plotting position.

a(#)specifies a in the formula for plotting position. The default is a = 0.5, giving (i - 0.5) / n. Other choices include a = 0, giving i / (n + 1), and a = 1/3, giving (i - 1/3) / (n + 1/3). Rarely will choice of a make any discernible difference.

normalspecifies that standard normal quantiles should be shown instead of plotting positions.gaussianis an exact synonym except that by default the textGaussianwill appear within the axis title, rather thannormal.

graph_optionsare options ofgraph, twowayexcept forby(). Defaults includeborder gap(5). Ifsymbol()is specified, the first symbol is used to plot fitted values and the second symbol to plot residuals. Otherwise, graph options refer to either or both graphs produced, except thatsaving()andtitle()refer to the combined graph image.

Examples. use auto

. regress mpg weight

. qfrplot7

. glm mpg weight, link(log)

. qfrplot7

. qfrplot7, norm

AuthorNicholas J. Cox, University of Durham, U.K. n.j.cox@durham.ac.uk

Also seeOn-line: help for graph, quantile, qnorm, regdiag, regplot (if installed), anovaplot (if installed), ovfplot (if installed), indexplot (if installed)