## White Test of Heteroscedasticity Detection (2022)

The post is about the White test of heteroscedasticity.

One important assumption of Regression is that the variance of the Error Term is constant across observations. If the error has a constant variance, then the errors are called homoscedastic, otherwise heteroscedastic. In the case of heteroscedastic errors (non-constant variance), the standard estimation methods become inefficient. Typically, to assess the assumption of homoscedasticity, residuals are plotted.

### White test of Heteroscedasticity

White test (Halbert White, 1980) proposed a test that is very similar to that by Breusch-Pagen. The White test of Heteroscedasticity is general because it does not rely on the normality assumptions and it is also easy to implement. Because of the generality of White’s test, it may identify the specification bias too. Both the White test of heteroscedasticity and the Breusch-Pagan test are based on the residuals of the fitted model.

To test the assumption of homoscedasticity, one can use auxiliary regression analysis by regressing the squared residuals from the original model on the set of original regressors, the cross-products of the regressors, and the squared regressors.

The step-by-step procedure for performing the White test of Heteroscedasticity is as follows:

Consider the following Linear Regression Model (assume there are two independent variables)
$Y_i=\beta_0+\beta_1X_{1i}+\beta_1X_{2i}+e_i \tag{1}$

For the given data, estimate the regression model, and obtain the residuals $e_i$’s.

Note that the regression of residuals can take linear or non-linear functional forms.

1. Now run the following regression model to obtain squared residuals from original regression on the original set of the independent variable, the square value of independent variables, and the cross-product(s) of the independent variable(s) such as
$Y_i=\beta_0+\beta_1X_1+\beta_2X_2+\beta_3X_1^2+\beta_4X_2^2+\beta_5X_1X_2 \tag{2}$
2. Find the $R^2$ statistics from the auxiliary regression in step 2.
You can also use the higher power regressors such as the cube. Also, note that there will be a constant term in equation (2) even though the original regression model (1)may or may not have the constant term.
3. Test the statistical significance of $n \times R^2\sim\chi^2_{df}\tag{3},$ under the null hypothesis of homoscedasticity or no heteroscedasticity, where df is the number of regressors in equation (2)
4. If the calculated chi-square value obtained in (3) is greater than the critical chi-square value at the chosen level of significance, reject the hypothesis of homoscedasticity in favor of heteroscedasticity.

For several independent variables (regressors) model, introducing all the regressors, their square or higher terms, and their cross products, consume degrees of freedom.

In cases where the White test statistics are statistically significant, heteroscedasticity may not necessarily be the cause, but specification errors. In other words, “The white test can be a test of heteroscedasticity or specification error or both”. If no cross-product terms are introduced in the White test procedure, then this is a pure test of pure heteroscedasticity.
If the cross-product is introduced in the model, then it is a test of both heteroscedasticity and specification bias.

By employing the White test of heteroscedasticity, one can gain valuable insights about the presence of heteroscedasticity and decide on appropriate corrective measures (like Weighted Least Squares (WLS)) if necessary to ensure reliable standard errors and hypothesis tests in your regression analysis.

Summary

The White test of heteroscedasticity is a flexible approach that can be used to detect various patterns of heteroscedasticity. This test indicates the presence of heteroscedasticity but it does not pinpoint the specific cause (like model misspecification). The White test is relatively easy to implement in statistical software.

### References

• H. White (1980), “A heteroscedasticity Consistent Covariance Matrix Estimator and a Direct Test of Heteroscedasticity”, Econometrica, Vol. 48, pp. 817-818.
• https://en.wikipedia.org/wiki/White_test

See the Numerical Example of the White Test of Heteroscedasticity

Visit: https://gmstat.com

## Breusch Pagan Test for Heteroscedasticity (2021)

The Breusch Pagan test (named after Trevor Breusch and Adrian Pagan) is used to check for the presence of heteroscedasticity in a linear regression model.

Assume our regression model is $Y_i = \beta_1 + \beta_2 X_{2i} + \mu_i$ i.e we have simple linear regression model, and $E(u_i^2)=\sigma_i^2$, where $\sigma_i^2=f(\alpha_1 + \alpha_2 Z_{2i})$,

That is $\sigma_i^2$ is some function of the non-stochastic variable $Z$’s. The $f()$ allows for both the linear and non-linear forms of the model. The variable $Z$ is the independent variable $X$ or it could represent a group of independent variables other than $X$.

#### Step to Perform Breusch Pagan test

1. Estimate the model by OLS and obtain the residuals $\hat{u}_1, \hat{u}_2+\cdots$
2. Estimate the variance of the residuals i.e. $\hat{\sigma}^2=\frac{\sum e_i^2}{(n-2)}$
3. Run the regression $\frac{e_i^2}{\hat{\sigma^2}}=\beta_1+\beta_2 Z_i + u_i$ and compute the explained sum of squares (ESS) from this regression
4. Test the statistical significance of $\frac{ESS}{2}$ by $\chi^2$-test with 1 df at the appropriate level of significance ($\alpha$).
5. Reject the hypothesis of homoscedasticity in favour of heteroscedasticity if $\frac{ESS}{2} > \chi^2_{(1)}$ at the appropriate level of $\alpha$.

Note that the

• The Breusch Pagan test is valid only if $u_i$’s are normally distributed.
• For k independent variables, $\frac{ESS}{2}$ has ($\chi^2$) Chi-square distribution with k degree of freedom.
• If the $u_i$’s (error term) are not normally distributed, the White test is used.

If heteroscedasticity is detected, remedies may include using robust standard errors, transforming the data, or employing weighted least squares estimation to adjust for heteroscedasticity.

The Breusch Pagan test is considered a useful tool for detecting the presence of heteroscedasticity in the regression models. The Breusch Pagan Test helps to ensure the validity of statistical inference and estimation.

A sample of Stata output related to the Breusch-Pagan Test for the detection of heteroscedasticity.

By analyzing the p-value of the chi-squared test statistic from the second regression, one can decide whether to reject the null hypothesis of homoscedasticity. If the p-value is lower than the chosen level of significance (say, 0.05), one has the evidence of heteroscedasticity.

The following are important points that need to be considered while using Breusch Pagan test of Heteroscedasticity.

• The Breusch-Pagan test can be sensitive to the normality of the error terms. Therefore, It is advisable to check if the residuals are normally distributed before running the Breusch-Pagan test.
• There are other tests for heteroscedasticity, but the Breusch-Pagan test is a widely used and relatively straightforward option.

References:

• Breusch, T.S.; Pagan, A.R. (1979). “Simple test for heteroscedasticity and random coefficient variation”. Econometrica (The Econometric Society) 47 (5): 1287–1294.

See the Numerical Example of the Breusch-Pagan Test for the Detection of Heteroscedasticity

## The Breusch-Pagan Test (Numerical Example)

To perform the Breusch-Pagan test for the detection of heteroscedasticity, use the data from the following file Table_11.3.

Step 1:

The estimated regression is $\hat{Y}_i = 9.2903 + 0.6378X_i$

Step 2:

The residuals obtained from this regression are:

The estimated $\tilde{\sigma}^2$ is $\frac{\sum u_i^2}{n} = \frac{2361.15325}{30} = 78.7051$.

Compute a new variable $p_i = \frac{\hat{u}_i^2}{\hat{\sigma^2}}$

Step 3:

Assuming $p_i$ is linearly related to $X_i(=Z_i)$ and run the regression of $p_i=\alpha_1+\alpha_2Z_{2i}+v_i$.

The regression Results are: $\hat{p}_i=-0.74261 + 0.010063X_i$

Step 4:

Obtain the Explained Sum of Squares (ESS) = 10.42802.

Step 5:

Compute: $\Theta = \frac{1}{2} ESS = \frac{10.42802}{2}= 5.2140$.

The Breusch-Pagan test follows Chi-Square Distribution. The $\chi^2_{tab}$ value at a 5% level of significance and with ($k-1$) one degree of freedom is 3.8414. The $\chi_{cal}^2$ is greater than $\chi_{tab}^2$, therefore, results are statistically significant. There is evidence of heteroscedasticity at a 5% level of significance.

## White General Heteroscedasticity Test (Numerical) 2021

One important assumption of Regression is that the variance of the Error Term is constant across observations. If the error has a constant variance, then the errors are called homoscedastic, otherwise heteroscedastic. In the case of heteroscedastic errors (non-constant variance), the standard estimation methods become inefficient. Typically, to assess the assumption of homoscedasticity, residuals are plotted.

We will consider the following data, to test the presence of heteroscedasticity using White General Heteroscedasticity test.

#### White General Heteroscedasticity Test

To perform the White General Heteroscedasticity test, the general procedure is

Step 1: Run a regression and obtain $\hat{u}_i$ of this regression equation.

The regression model is: $income = \beta_1+\beta_2\, educ + \beta_3\, jobexp + u_i$

The Regression results are: $Income_i=-7.09686 + 1.93339 educ_{i} + 0.649365 jobexp_{i}$

Step 2: Run the following auxiliary regression

$$\hat{u}_i^2=\alpha_1+\alpha_2X_{2i}+\alpha_3 X_{3i}+\alpha_4 X_{2i}^2+\alpha_5X_{3i}^2+\alpha_6X_{2i}X_{3i}+vi$$

that is, regress the squared residuals on a constant, all the explanatory variables, the squared explanatory variables, and their respective cross-product.

Here in auxiliary regression education, $Y$ is income, $X_2$ is educ, and $X_3$ is jobexp.

The results from auxiliary regression are:

$$Y=42.6145 -0.10872\,X_{2i} – 5.8402\, X_{3i} -0.15273\, X_{2i}^2 + 0.200715\, X_{3i}^2 + 0.226517\,X_{2i}X_{3i}$$

Step 3: Formulate the null and alternative hypotheses

$H_0: \alpha_1=\alpha_2=\cdots=\alpha_p=0$

$H_1$: at least one of the $\alpha$s is different from zero

Step 4: Reject the null and conclude that there is significant evidence of heteroscedasticity when the statistic is bigger than the critical value.

The statistic with computed value is:

$$n \cdot R^2 \, \Rightarrow = 20\times 0.4488 = 8.977$$

The statistics follow asymptotically $\chi^2_{df}$, where $df=k-1$. The Critical value is $\chi^2_5$ at a 5% level of significance is  11.07.

Since the calculated value is smaller than the tabulated value, therefore, the null hypothesis is accepted. Therefore, based on the White general heteroscedasticity test, there is no heteroscedasticity.