Detection of  heteroscedasticity using White's test.

We are going to analyze whether a family’s income, R, influences their travel expenses, GV. In this case we have the data previously stored in a .txt, file so the first step is to import it. The results of the adjustment made are:

GV = 1'96 + 0'026 R,  R-squared = 0'435,

being the non-significant constant (not rejecting the null hypothesis that may be zero), while the rent is as is (rejecting the null hypothesis that may be zero). In addition, there is a positive influence, i.e. greater income, greater travel expenses. Finally, we also reject the ANOVA test’s null hypothesis, so the model is valid.

We will apply White’s test to study the presence of heteroscedasticity in the model considered. Since this is an asymptotic test, i.e., a test focused on large samples, and the current sample is very small, the results obtained from this test must be interpreted with caution.

After estimating the original model using OLS and obtaining its residuals, we propose the regression of the squares of the residuals from all of the original model’s variables, their squares and cross-products (omitting repeated items). In this case, the estimate of this auxiliary regression is:

u(t)^2 = -21'3268 + 0'0810927 * R - 0'00000669 * R^2.


In this case, from the auxiliary regression, we are interested in its coefficient of determination, i.e., its R-squared (R ^ 2). Since for the null hypothesis of the presence of heteroscedasticity we use n*R^2 is distributed according to a chi-square with q degrees of freedom, where q is the number of regressors excluding the auxiliary regression constant and n is the number of observations from the model. Then, if n*R^2 is greater than the value of the tables at a given significance level, we reject the null hypothesis. In this case, since

n * Ra^2 = 10 * 0'375971 = 3'75971 < 5'99146 = chi(2, 0'05),

Finally, note that the Breusch-Pagan test is a test very similar to this one, the only difference being in its auxiliary regression that does not include the cross-terms or the original squared variables. For everything else, the steps are the same. It is also an ideal test for large samples.


The Camtasia Studio video content presented here requires JavaScript to be enabled and the latest version of the Macromedia Flash Player. If you are you using a browser with JavaScript disabled please enable it now. Otherwise, please update your version of the free Flash Player by downloading here.