I'm using the Fligner-Killen test to analyze the residuals of a linear regression. I subdivide those residuals in three groups and then I do the FK test to check the homogeneity of variances.

The result is:

fligner.test(pair.res, pair.groups)

    Fligner-Killeen test of homogeneity of variances

data:  pair.res and pair.groups 
Fligner-Killeen:med chi-squared = 2.6937, df = 2, p-value = 0.2601

In the image below I have plotted the residuals and the groups. Could someone explain me WHY those three groups have the same variance? It does not seem correct doing a simple visual check.

Time series plot of residuals, divided into three panels


1 Answer 1


They look about equal to me.

A good visual test to estimate or compare standard deviations (after checking for obvious outliers) is to look at the range of a dataset. For a given sample size, the range will typically be near a fixed multiple of the SD. With around 250 independent samples of a normal distribution, for instance, the range will be around 7 times the SD. So here we have ranges of around 1.3 (left panel), 1.0 (middle panel), and 1.1 (right panel), and each panel comprises about the same amount of data. Thus the ratios of variances, which will equal the squares of the ratios of the ranges, range from around $(1.3 : 1.1)^2$ = about $1.4$ down to $(1.0 : 1.1)^2$ = about $0.8$. You could use an F-test as a very rough estimate of significance, but I would reduce the degrees of freedom to account for the evidently strong serial correlation. Regardless, it wouldn't be unusual to get a pair of F-statistics (with 250 and 250 degrees of freedom) in the range $(0.8, 1.4)$ and reducing the df only increases that chance. In light of that, a p-value of $0.26$ looks fine.

Actually, you don't need a formal test here: it's pointless, because obviously these residuals aren't anywhere near independent and they exhibit strong trends within the series. There might not be much the regression can do to eliminate all the serial correlation, but a richer model is needed to capture the variation that is evident here. Until that happens, there's little sense in checking for homogeneity of the residuals.

  • $\begingroup$ Nicely and convincingly argued. $\endgroup$
    – rolando2
    Sep 30, 2011 at 1:15
  • $\begingroup$ @whuber, one question. How did you understand that the series is normally distributed? $\endgroup$
    – Dail
    Sep 30, 2011 at 7:35
  • $\begingroup$ @Dail I don't think these residuals are normal: in the left panel they appear to have some negative skew and in the right panel, positive skew. I mentioned normality only as an example. This approach still works well for visual evaluation except when the groups have strongly different distributions (for then the proportion between the expected range and the expected SD in a random sample will be different). For that reason, an essential part of evaluating residuals includes assessing the shape of their univariate distribution (using probability plots, for instance). $\endgroup$
    – whuber
    Sep 30, 2011 at 13:56

Your Answer

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

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