4
$\begingroup$

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.

$\endgroup$
9
  • 5
    $\begingroup$ You only have 9 data points. Very few tests could possibly return a significant result with such a small sample size. $\endgroup$
    – Alex J
    Mar 2, 2023 at 4:46
  • $\begingroup$ @AlexJ What do you mean by significant result? $\endgroup$ Mar 2, 2023 at 4:49
  • 2
    $\begingroup$ By "significant", I mean $p < 0.05$. As in, it is unlikely a test would return $p<0.05$ with only 9 data points. $\endgroup$
    – Alex J
    Mar 2, 2023 at 4:51
  • 9
    $\begingroup$ I just think you just don't have enough data to see whether homescedasticity is violated with only 9 data points. Maybe you could conclude a hint that homoscedasticity might be violated but you just don't have enough information to tell. $\endgroup$
    – Alex J
    Mar 2, 2023 at 5:39
  • 1
    $\begingroup$ As in, if you had lots of data points, the plots looked like there was an issue, but the test was non-significant? I would probably trust the plot. But I don't really know the test particularly well. $\endgroup$
    – Alex J
    Mar 2, 2023 at 6:09

2 Answers 2

7
$\begingroup$

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).

$\endgroup$
8
  • $\begingroup$ "In neither case does it look like you have a magnitude of heteroscedasticity that is likely to cause problems" I don't understand. Do you mean that the magnitude of peresent heteroscedasticity is unlikely to cause problems or the opposite? $\endgroup$ Mar 3, 2023 at 12:01
  • 1
    $\begingroup$ @MehdiCharife, it is implausible to assume that you have no heteroscedasticity, but the amount you probably have is small enough that it will not cause any problems. $\endgroup$ Mar 3, 2023 at 12:21
  • $\begingroup$ "The amount you probably have is small enough that it will not cause any problems" Can you please explain why is that the case? $\endgroup$ Mar 3, 2023 at 12:28
  • 1
    $\begingroup$ @MehdiCharife, assumptions are never perfectly met. Fortunately, regression methods are quite robust to minor violations of the assumptions. Any heteroscedasticity you have is likely to be very minor. You may want to click on the heteroscedasticty tag, sort by votes, and start reading some of our existing threads on the topic to learn more about it. $\endgroup$ Mar 3, 2023 at 12:37
  • $\begingroup$ I'm aware of the methods used to test for heteroscedasticity. I just don't understand why the amount I have is likely to be very minor? From what I see, the line in the scale vs residuals plot is very (not slightly) far from being straight. Doesn't that point at the opposite direction? $\endgroup$ Mar 9, 2023 at 22:48
7
$\begingroup$

You just don't have enough data to see whether homoscedasticity is violated with only 9 data points. Maybe you could include a hint that homoscedasticity might be violated but you just don't have enough information to tell.

$\endgroup$
2
  • $\begingroup$ How much data would be enough data? 30? $\endgroup$ Mar 3, 2023 at 14:02
  • 3
    $\begingroup$ @MehdiCharife, that's a question of statistical-power. You would need to specify the type of heteroscedasticity you care about, how much there is, & the test you would use to detect it, then you would do a power analysis. The result would tell you the $N$ required to achieve your desired level of power at your chosen alpha. In the real world, this is not something anyone ever does--it's another reason why tests aren't really good for this task. $\endgroup$ Mar 3, 2023 at 14:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.