### Going Deeper into Regression Analysis with Assumptions, Plots & Solutions

Originally posted on Data Science Central

This article on going deeper into regression analysis with assumptions, plots & solutions, was posted by Manish Saraswat. Manish who works in marketing and Data Science at Analytics Vidhya believes that education can change this world. R, Data Science and Machine Learning keep him busy.

Regression analysis marks the first step in predictive modeling. No doubt, it’s fairly easy to implement. Neither it’s syntax nor its parameters create any kind of confusion. But, merely running just one line of code, doesn’t solve the purpose. Neither just looking at R² or MSE values. Regression tells much more than that!

In R, regression analysis return 4 plots using `plot(model_name)` function. Each of the plot provides significant information or rather an interesting story about the data. Sadly, many of the beginners either fail to decipher the information or don’t care about what these plots say. Once you understand these plots, you’d be able to bring significant improvement in your regression model.

For model improvement, you also need to understand regression assumptions and ways to fix them when they get violated.

In this article, I’ve explained the important regression assumptions and plots (with fixes and solutions) to help you understand the regression concept in further detail. As said above, with this knowledge you can bring drastic improvements in your models.

Assumptions in Regression

What if these assumptions get violated ?

2. Autocorrelation
3. Multicollinearity
4. Heteroskedasticity
5. Normal Distribution of error terms

Interpretation of Regression Plots

1. Residual vs Fitted Values
2. Normal Q-Q Plot
3. Scale Location Plot
4. Residuals vs Leverage Plot

Note from the Editor: For a robust regression that will work even if all these model assumptions are violated, click here. It is simple (it can be implemented in Excel and it is model-free), efficient and very comparable to the standard regression (when the model assumptions are not violated).  And if you need confidence intervals for the predicted values, you can use the simple model-free confidence intervals (CI) described here. These CIs are equivalent to those being taught in statistical courses, but you don't need to know stats to understand how they work, and to use them. Finally, to measure goodness-of-fit, instead of R-Squared or MSE, you can use this metric, which is more robust against outliers.

DSC Resources

### Building Better Maps with Data and Data Viz

Our world is rich with geographic data. From point coordinates to country names, maps are key to understanding and… Continue

### Human-in-the-Loop Deep Learning

AI systems need to continually learn from new data to perform well in real-world scenarios. However, it is… Continue

### Embedded AI, Machine Learning, and Analytics

New forms of systems of intelligence are emerging through embedded artificial intelligence, machine learning, and… Continue

### Deep Learning on Apache® Spark™- Best Practices

The combination of Deep Learning with Apache Spark has the potential for tremendous impact in many… Continue

### Principal Data Scientist - Mercedes-Benz

Mercedes-Benz Research & Development North America, Inc. - Mercedes-Benz Research &amp; Development is a place for exceptional people with outstanding ideas and the absolute willingness to bring them to lif...

### Software Engineer, Verily Life Sciences - Google

Google - Verily, an Alphabet company, lives at the intersection of technology, data science and healthcare. Our mission is to make the world’s health data u...

### Sr. Computer Scientist - Adobe

Adobe - The challenge Be part of the foundational team that will be responsible on developing generation Platform which will power Adobe’s Experience Cloud...

### Data Scientist - Consumer Connectivity Services - Volvo

Volvo Car Group - Principal Responsibilities: Plan and execute quantitative analysis work streams Define relevant analytics procedures for product and service testi...