Heteroscedasticity – Resolving Disagreements Between Studentized Breusch-Pagan Test and Residuals vs Fitted Plots in R

assumptionsheteroscedasticityp-valuerregression

Given the model:

> Durée <- c(6, 5, 3.5, 3, 5, 3, 2, 8, 2.5) 
> Note  <- c(18, 16, 14, 10, 15, 13, 8, 19, 12) 
> model <- lm(Note ~ Durée)

I was tasked, among other things, to verify whether homoscedasticity is true.

After running plot(model) I was able to visualise the following graphs:

Residuals vs Fitted

scale-location plot

normal qq-plot

From the Residuals vs Fitted and Scale-Location plots, we can see that the line is very far from being straight, which indicates the presence of heteroscedasticity.

However, when I run the studentized Breusch-Pagan test using the command bptest(model), I got the following output:

    studentized Breusch-Pagan test

data:  model
BP = 1.8622, df = 1, p-value = 0.1724

The test gives a p-value of 0.1724, which is greater than 0.05. This means that we can't reject the hypothesis of homoscedasticity, which contradicts, at least in my understanding, the output of the plots previously mentioned.

Best Answer

I believe that tests of assumptions are very often "essentially useless" (see: Why use normality tests if we have goodness-of-fit tests?, e.g.). Box said, "All models are wrong, but some are useful." In that spirit, homoscedasticity is a model, and the idea that it is perfectly met is implausible. A test of a false null can return either a correct decision or a type II error (because you don't have enough data). It is much better to assess the apparent magnitude and type of deviations from perfectly met assumptions than to conduct formal tests. The best way to do this is generally to look at appropriate plots.

For assessing possible heteroscedasticity, the scale-location plot is better than the plot of residuals vs fitted values. In neither case does it look like you have a magnitude of heteroscedasticity that is likely to cause problems. On the other hand, it looks like you have a curvilinear relationship between Note and Duree (but don't have enough data to establish that with a conventional degree of confidence).