## With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

No credit card required

# Examining the residuals

One of the first things I do after looking at the coefficients is to look at the residuals.

You can see all of the residuals by using the residuals() function:

```residuals(PainGLM, type="deviance") # residuals
```

For many good models, the residuals will be scattered around zero, and will have roughly the same variance at all levels. The deviance of the residuals for this model are listed within the summary section shown previously. We can see that the distribution is balanced since the absolute values of the min and max are approximately equal, as well as 1Q (25th percentile) with 3Q (75th percentile):

```Deviance Residuals:
Min       1Q   Median       3Q      Max
-2.7638  -0.5904  -0.1952   0.6151   2.3153
```

If we want to look at the mean, we can ...

## With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

No credit card required