Skip to Content
Practical Predictive Analytics
book

Practical Predictive Analytics

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

Outliers in the regression

Note that preceding each plot also identifies extreme data points in the dataset which may have an influence upon the regression line (line drawn through the data). The extreme values are represented in bold within the plot itself.

For example,in all of the preceding plots, you can see that observation 26 is considered an outlier with respect to the other covariates.

Print this observation to the console along with some of its neighbors. You can see how this could be considered an outlier just by inspection, since two variables (Duration and Treatment) immediately pop out as being different from the surrounding observations:

df[c(26,27,28,25),]

This is the output which is sent to the console:

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