IBM Support

White's Test for Heteroscedasticity

Troubleshooting


Problem

Can SPSS perform White's test for heteroscedasticity?

Resolving The Problem

There are actually multiple tests that have been called White's test. SPSS does not currently explicitly produce any of these tests. However, one version, discussed in McClendon's Multiple Regression and Causal Analysis (Peacock 1994), can be produced relatively easily using the following steps (assuming that you are working with complete data):

1) Run the desired linear regression model, saving the (unstandardized) residuals.

2) Square the saved residuals.

3) Compute squared values of all predictors and products of all pairs of predictors.

4) Regress the squared residuals on the predictor variables, squared predictors and cross-product variables, making sure to include a constant term in the model, even if one was not included in the original regression.

5) Compute the test statistic as N*R^2, the product of the number of cases and the R^2 value from the regression of the squared residuals on the predictors.

6) Refer the test statistic to a chi^2 distribution with degrees of freedom equal to the number of predictors in the regression in step 4, not including the intercept.. If the original number of predictors is p, the number in this regression should be 2p+p(p-1)/2, or (p**2+3p)/2.

A significant chi^2 is a reason to reject the null hypothesis of homoscedasticity, i.e., indicates heteroscedasticity.

Here is an example set of commands that performs White's test using the Employee Data.sav file that is included with SPSS Statistics, by default installed into the directory C:\Program Files\IBM\SPSS\Statistics\22\Samples\English for English language installations. We predict the salary variable using salbegin and jobtime. Since there are two predictors, the degrees of freedom to use for White's test is (2**2+3*2)/2=5. The sample size is 474. (Note that EXECUTE commands have not been included following several of the COMPUTEs. If you run only some of these commands you may leave pending transforms and not see the computed variables yet. The REGRESSION command causes the first four COMPUTEs to be executed and the EXECUTE at the end causes the last two to be executed.)


*1) Regress the dependent on the predictors and save the unstandardized residuals
*(which by default would be named RES_1).
REGRESSION
/DEPENDENT salary
/METHOD=ENTER salbegin jobtime
/SAVE RESID.

*2) Compute the squared residual variable.
COMPUTE newy=RES_1**2.

*3) Compute squares of predictors and crossproduct of predictors.
COMPUTE salbegin2=salbegin**2.
COMPUTE jobtime2=jobtime**2.
COMPUTE xproduct=salbegin*jobtime.

*4) Regress the squared residuals on the predictors, squared predictors and
*crossproduct variable. The DATASET DECLARE, OMS, OMSEND and
*DATASET ACTIVATE commands allow us to capture the R**2 value from
*this regression as data in a dataset for further processing.
DATASET DECLARE temp.
OMS
/SELECT TABLES
/IF COMMANDS=['Regression'] SUBTYPES=['Model Summary']
/DESTINATION FORMAT=SAV NUMBERED=TableNumber_
OUTFILE='temp'.
REGRESSION
/DEPENDENT newy
/METHOD=ENTER salbegin jobtime salbegin2 jobtime2 xproduct.
OMSEND.
DATASET ACTIVATE temp WINDOW=FRONT.

*Compute chi-square value for White's test.
COMPUTE White=474*RSquare.

*Compute P value.
COMPUTE P=SIG.CHISQ(White,5).
EXECUTE.

[{"Product":{"code":"SSLVMB","label":"IBM SPSS Statistics"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Not Applicable","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"Not Applicable","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Historical Number

20450

Document Information

Modified date:
16 April 2020

UID

swg21476748