As of now in my blog, I have successfully created a predictive model by using Linear Regression Model in the analysis and found the accuracy of the model that well the model fits the data.
Today I thought to analyse my predictive model by exchanging the variables where I can assume and persist that my prediction on the model that it is correct and accurate. I have performed same linear regression model and by using the same concepts as Breusch-Pagan Test and K-fold Cross-Validations.
Firstly, I performed the regression analysis by considering %Inactivity as dependent variable and %Diabetic & %Obesity as independent variable. I got the result that there is no evidence of heteroskedasticity in the analysis and the p-value for this I got 0.134445188675204, which is greater than 0.05 (significant value) and this how it shows that the predictive model is not going to work.
Secondly, I performed the regression analysis by considering %Obesity as dependent variable and %Diabetic & %Inactivity as independent variable. Here while performing the Breusch-Pagan test, I got there is significant evidence of heteroskedasticity and the p-value is comparatively extreme less from the significant value. the p-value is 7.265658818386482e-13. By obtaining this, I further moved in the process to find the train and test errors so that I can detect the overfitting and generalise the evaluation in the model. While implementing the K-fold Cross-Validation technique in the analysis, I found that value for test error is lower than the value for training error which is quite unusual and it shows that the model is not going to evaluate the new, unseen data.
At last, the linear regression model on which I have performed the analysis by considering %Diabetic as dependent variable and %Inactivity & %Obesity as independent variable gives us the predictive model where we can assume and overfit the data, we can do the model selection and evaluate the generalisation of the correlation between the variables.
Please refer to the pdf file below:
Project-MTH522_last