13th September, 2023

Writing this post in a continuation to the previous tests that I was running.

While before I was only looking visually at the graph of residuals vs fitted values to determine if the variances are generally equal over the spread, but now instead I have tried the breusch pagan test.

It will plot the data of the residuals against the fitted data and look for any sort of relation between the two, this will essentially compute a p value for the data of residual vs fitted. This is useful for us in determining if there is really no pattern in the data and we accept a high p value from the null hypotheses point of view, which is the assumption that the data is homoskedastic. This does not turn out to be the case in the following.

Diabetes vs Inactivity data
Obesity vs Inactivity data
Modelling Diabetes as a factor of both Inactivity and Obesity

Diabetes vs Inactivity BPTest
Diabetes vs Inactivity BPTest
obesity
Obesity vs Inactivity BPTEST
BPtest for multiple regression model
BPtest for multiple regression model

But however the model for the Diabetes vs Obesity data clearly shows that the P value is high enough for it’s model to be considered to have equal variances for the most part, or the null hypotheses is accepted, which is that the data is homoskedastic.

Obesity vs Diabetes BPTest
Obesity vs Diabetes BPTest
Diabetes modeled for obesity
Diabetes modeled for obesity graphs

 

The scaled graph provides a better estimate in this case to visually verify the nature of homoskedasticity and the extent of it.

Leave a Reply

Your email address will not be published. Required fields are marked *