The first question you might ask is "Why is this important?" Well, regression is one of the many ways in which you can predict new observations. Want to know what your sales will be next month for a particular product line? Regression can help. Want to know how many new customers you will acquire in the next 3 months? Regression can help. The list goes on and on. Now, all we need is a good foundation. Then, addressing many of your business problems would be within our grasp.
The first step of any regression model is determining which variables are going to be your predictors and which variables are going to be your responses. In a simple linear regression model, we can only have one predictor and one response. We also assume that they are related in a "linear" fashion, which is easiest understand via a picture.
|Linear vs. Nonlinear|
|Consumer, Foreign, and Predicted Foreign by Year|
|Consumer vs. Foreign (Highlight Table)|
|Foreign (Predicted Lower)|
|Foreign (Predicted Upper)|
|Consumer vs. Foreign (Banded Scatterplot)|
The really cool part about this new R integration is definitely in the prediction and forecasting scenarios. As we just saw, it's really easy to get some cool predictions and display them. There's WAY more to do here. We could have gotten more technical by looking at residual plots or QQ plots. Don't think that linear regression was the right model? No problem! We could have used a time series, artificial neural network, or even a Bayesian model. You're only limited by your imagination. We hope you found this informative. Thanks for reading.
Data Analytics Consultant