Using diagnostic tools and statistical tests like residual plots, the Breusch-Pagan test, the White test for heteroscedasticity is an important part of regression analysis to assess the validity of your model assumptions:
- Residual Plot:
-
- Within the residual plot depicted above, it becomes apparent that the residuals tend to cluster towards the right side of the graph. This pattern signifies that as the predicted values increase, the residuals also exhibit an upward trend. In other words, we can conclude that the spread of residuals widens as the predicted values grow larger.
- This violates one of the key assumptions of linear regression, which is that the variance of the residuals is constant across the plot (i.e., the spread is constant).
- Heteroscedasticity indicates that our model is not learning the true relationship between diabetes and obesity.
-
- Breusch-Pagan Test:
-
- It is a formal statistical test for heteroscedasticity.
- Null Hypothesis (H0): There is no heteroscedasticity.
- Alternative Hypothesis (H1): There is heteroscedasticity.
- Both the LM p-value (0.6415) and the F p-value (0.6426) are greater than the common significance level of 0.05.
- This means we do not have enough evidence to reject the null hypothesis.
- Therefore, based on this test, you conclude that there is “No evidence of heteroscedasticity“.
-
- White Test:
-
- Both the LM p-value (0.2417) and the F p-value (0.2432) are greater than the common significance level of 0.05.
- This means that we do not have enough evidence to reject the null hypothesis.
- Therefore, based on this test, you conclude that there is “No evidence of heteroscedasticity“.
-