Multicollinearity
If the predictor variables are correlated then we need to detect multicollinearity and treat it. Recognition of multicollinearity is crucial because two or more variables are correlated, which shows a strong dependence structure between those variables, and we are using correlated variables as independent variables, which end up having a double effect of these variables on the prediction because of the relation between them. If we treat the multicollinearity and consider only variables which are not correlated then we can avoid the problem of double impact.
We can find multicollinearity by executing the following code:
> vif(MultipleR.lm)
This gives the multicollinearity table for the predictor variables:
Figure 3.8: VIF table for multiple regression model
Depending upon the values of VIF, we can drop the irrelevant variable.