Next: resvsyhat() Up: Regression Macros Help File Previous: resvsindex()   Contents


resvsrankits([varNo,] [usehii:T or F] [,standres:F]\
  [,graphics keyword phrases]), 1 <= varNo <= ncols(RESIDUALS)

Keywords: plotting, glm, residuals, anova, regression
resvsrankits([graphics keyword phrases]) plots standardized residuals
against normal scores as computed by function rankits().

resvsrankits(usehii:T [,graphics keyword phrases]) does the same using
leverages HII in standardizing.  This is the default after a GLM

resvsrankits(usehii:F [,graphics keyword phrases]) does the same without
using leverages HII.  This is the default after arima().

resvsrankits(standres:F [,graphics keyword phrases]) does the same
without any standardization.

The residuals are from variable RESIDUALS or WTDRESIDUALS produced by
the most recent GLM (generalized linear or linear model) command such as
regress(), anova(), or poisson(), or from an ARIMA fit computed by macro

If the most recent command was manova(), only column 1 of the residual
matrix is plotted.

resvsrankits(varNo [, usehii:T or F] [, standres:F] [,graphics keyword
phrases]), where varNo is an integer between 1 and ncols(RESIDUALS),
plots residuals associated with variable varNo against case numbers.
varNo > 1 is legal only when RESIDUALS was computed by manova().

The default plotting symbol is the same as for plot(), a drawn asterisk
or star ("\6").  You can change it by including 'symbols:c' as an
argument, where c is a CHARACTER or integer scalar or vector.  c = 0 is
special: it is equivalent to c = "###" and results in points being
labeled with case number.  See chplot(), subtopic 'symbols_used'.

You can use all the usual graphics keywords to modify the default plot
characteristics.  These include 'title', 'xlab', 'ylab', 'symbols'
'impulse' and 'lines'.  See topics 'graphs', 'graph_keys',
'graph_border' and 'graph_ticks'.

When you have set option 'dumbplot' to False (see 'options'), the plot
will be a low resolution plot unless 'dumb:F' is an argument.

Without standres:T, the quantities plotted are r[i]/sd[i] where r[i] is
RESIDUALS[i] or WTDRESIDUALS[i] and sd[i] is the estimated standard
deviation.  WTDRESIDUALS[i] is used after regress(), anova(), or
manova() with 'weights:wts' or after nonlinear GLM commands such as
logistic() and poisson().

When usehii is True (the default after GLM commands), sd[ii] =
sqrt(mse*(1-HII[i])), where mse is the residual mean square after
regress(), anova() or manova(), the mean error deviance after non-linear
GLM commands or the estimated innovation variance after arima().

When usehii is False (the default after arima()), sd[i] = sqrt(mse).

With standres:F, the quantities plotted are r[i].

The values on the X-axis are normal scores computed by rankits(r).  See
rankits() for more information.

resvsrankits() is implemented as macro.

See also topics resvsindex(), resvsyhat(), resid().

Gary Oehlert 2003-01-15