I worked on my project today, focusing on the analysis of CDC data. I utilized inactivity percentage and obesity percentage as predictors, with diabetes percentage as the dependent variable. I experimented with multiple linear regression and polynomial regression, varying the degrees trying to achieve the optimal R-squared value. Subsequently, I applied the Breusch-Pagan test to examine the hypothesis that the residuals (variance in errors) in my model are constant across all levels of the independent variables.
I constructed a new regression model with the squared residuals as the dependent variable and the independent variables from my original model. The goal was to determine if the squared residuals could be predicted by the independent variables. After calculating a test statistic, I obtained a critical value from the chi-squared distribution with 1 degree of freedom (df=1). Since the test statistic was greater than the critical value, I concluded that heteroskedasticity was present