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.


  • [Snapshot]
  • [Snapshot]
  • [Snapshot]
    • 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 »

Files require Wolfram CDF Player or Mathematica.

Mathematica »
The #1 tool for creating Demonstrations
and anything technical.
Wolfram|Alpha »
Explore anything with the first
computational knowledge engine.
MathWorld »
The web's most extensive
mathematics resource.
Course Assistant Apps »
An app for every course—
right in the palm of your hand.
Wolfram Blog »
Read our views on math,
science, and technology.
Computable Document Format »
The format that makes Demonstrations
(and any information) easy to share and
interact with.
STEM Initiative »
Programs & resources for
educators, schools & students. »
Join the initiative for modernizing
math education.
Step-by-Step Solutions »
Walk through homework problems one step at a time, with hints to help along the way.
Wolfram Problem Generator »
Unlimited random practice problems and answers with built-in step-by-step solutions. Practice online or make a printable study sheet.
Wolfram Language »
Knowledge-based programming for everyone.
Powered by Wolfram Mathematica © 2018 Wolfram Demonstrations Project & Contributors  |  Terms of Use  |  Privacy Policy  |  RSS Give us your feedback
Note: To run this Demonstration you need Mathematica 7+ or the free Mathematica Player 7EX
Download or upgrade to Mathematica Player 7EX
I already have Mathematica Player or Mathematica 7+