Skip to Content
Practical Predictive Analytics
book

Practical Predictive Analytics

by Ralph Winters
June 2017
Beginner to intermediate
576 pages
15h 22m
English
Packt Publishing
Content preview from Practical Predictive Analytics

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

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Data Superstream: Analytics Engineering

Data Superstream: Analytics Engineering

Alistair Croll, Anna Filippova, Emilie Schario, Lewis Davies, Jacob Frackson, Benn Stancil, Nick Acosta, Elizabeth Caley
R: Predictive Analysis

R: Predictive Analysis

Tony Fischetti, Eric Mayor, Rui Miguel Forte
Python: Advanced Predictive Analytics

Python: Advanced Predictive Analytics

Ashish Kumar, Joseph Babcock

Publisher Resources

ISBN: 9781785886188Supplemental Content