The GENMOD procedure computes three kinds of residuals. Residuals are available for all generalized linear models except multinomial models for ordinal response data, for which residuals are not available. Raw residuals and Pearson residuals are available for models fit with generalized estimating equations (GEEs).
The raw residual is defined as

where is the ith response and is the corresponding predicted mean. You can request raw residuals in an output data set with the keyword RESRAW in the OUTPUT statement.
The Pearson residual is the square root of the ith contribution to the Pearson’s chisquare:

You can request Pearson residuals in an output data set with the keyword RESCHI in the OUTPUT statement.
Finally, the deviance residual is defined as the square root of the contribution of the ith observation to the deviance, with the sign of the raw residual:

You can request deviance residuals in an output data set with the keyword RESDEV in the OUTPUT statement.
The adjusted Pearson, deviance, and likelihood residuals are defined by Agresti (2002); Williams (1987); Davison and Snell (1991). These residuals are useful for outlier detection and for assessing the influence of single observations on the fitted model.
For the generalized linear model, the variance of the ith individual observation is given by

where is the dispersion parameter, is a userspecified prior weight (if not specified, ), is the mean, and is the variance function. Let

for the ith observation, where is the derivative of the link function, evaluated at . Let be the diagonal matrix with denoting the ith diagonal element. The weight matrix is used in computing the expected information matrix.
Define as the ith diagonal element of the matrix

The Pearson residuals, standardized to have unit asymptotic variance, are given by

You can request standardized Pearson residuals in an output data set with the keyword STDRESCHI in the OUTPUT statement. The deviance residuals, standardized to have unit asymptotic variance, are given by

where is the contribution to the total deviance from observation i, and is 1 if is positive and –1 if is negative. You can request standardized deviance residuals in an output data set with the keyword STDRESDEV in the OUTPUT statement. The likelihood residuals are defined by

You can request likelihood residuals in an output data set with the keyword RESLIK in the OUTPUT statement.