Visualizing Categorical Data: halfnorm
$Version: 1.1 (9 Nov 2000)
Half normal plot for generalized linear models
The HALFNORM macro plots the ordered absolute values of residuals from a
generalized linear model against expected values of normal order
statistics. A simulated envelope, correponding to an approximate 95%
confidence interval, is added to the plot to aid assessment of whether the
distribution of residuals corresponds to a good-fitting model.
The HALFNORM macro is called with keyword parameters. The RESP=
and MODEL= parameters are required. The arguments may be listed within parentheses in
any order, separated by commas. For example:
%halfnorm(resp=count, class=sex response, model=sex|year|response@2);
Specifies the name of the input data set to be analyzed. The default is the
last data set created.
Specifies the name of the response variable to be analyzed
The name of a trials variable, for
DIST=BIN, with the data in events/trials form.
Specifies the model formula, the right-had-side of the MODEL statement. You
can use the | and @ shorthands.
Names of any class variables in the model
Error distribution. The default is
Link function. The default is
name(s) of any offset variables in the model.
The name of a frequency variable, when the data are in grouped form.
The name of a character variable used as an observation identifier in the
Specifies the name of the output data set. The output data set contains the
input variables, absolute residuals (_ARES_), half-normal expected value
(_Z_), Default: _RES_.
Specifies whether and how to label observations in the plot.
LABEL=ALL means that all observations are labelled with the
ID= variable value;
LABEL=NONE means that no observations are labelled;
LABEL=ABOVE means that observations above the mean of the simulations are labelled;
LABEL=TOP n means that the highest n observations are labelled.
Specifies the seed for the random number generators.
(the default) uses the time-of-day as the seeed, so a different set of
simulated observations is drawn each time the program is run.
The type of residual to plot. Possible values are: STRESCHI (adjusted
Pearson residual), STRESDEV (adjusted deviance residual),
%include vcd(halfnorm); *-- or include in an autocall library;