Comparing Some Residuals for Generalized Linear Models
A number of different kinds of residuals are used in the analysis of generalized linear models. Generalized linear models can be characterized by a variance function that is the variance of a distribution as a function of its mean up to a multiplicative constant. A fit or raw residual is the difference between the observed and predicted values. Pearson residuals scale this difference by the square root of the variance function to adjust for the expected variation in the observations. Anscombe residuals provide a transformation toward normality for the assumed variance function.
For linear regression with normal or Gaussian observations, these three types of residuals are the same. For other exponential families of distributions, Anscombe residuals should be closer to the bell-shaped distribution familiar in linear regression, particularly for larger datasets.
The example in this Demonstration is a model with two predictor variables and . It shows the residuals plotted against predictor values and displayed in histograms. Change the exponential family to choose a different dataset and model. Adjust the sample size to fit models for smaller or larger datasets.