10182

# 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.

### PERMANENT CITATION

 Share: Embed Interactive Demonstration New! Just copy and paste this snippet of JavaScript code into your website or blog to put the live Demonstration on your site. More details » Download Demonstration as CDF » Download Author Code »(preview ») Files require Wolfram CDF Player or Mathematica.

#### Related Topics

 RELATED RESOURCES
 The #1 tool for creating Demonstrations and anything technical. Explore anything with the first computational knowledge engine. The web's most extensive mathematics resource. An app for every course—right in the palm of your hand. Read our views on math,science, and technology. The format that makes Demonstrations (and any information) easy to share and interact with. Programs & resources for educators, schools & students. Join the initiative for modernizing math education. Walk through homework problems one step at a time, with hints to help along the way. Unlimited random practice problems and answers with built-in Step-by-step solutions. Practice online or make a printable study sheet. Knowledge-based programming for everyone.