1. 用图表检验Analyze -> regression -> Linear-> Plots
Scatter plot of the standardised residuals on the standardised predicted values (ZRESID as the Y variable, and ZPRED as the X variable):如果图表显示有可能存在异方差,需要用统计检验来进一步检测异方差是否确实存在。
2. 用统计检验
Heteroscedasticity——Testing and Correcting in SPSS.pdf
Heteroscedasticity_ Testing and Correcting in SPSS.pdf (532.01 KB)
Levene’s Test
Goldfeld-Quandt Test
Breusch-Pagan Test
White‘s Test (比较常用来检验异方差)
Assume you want to run a regression of wage on age, work experience,education, gender, and a dummy for sectorofemployment (whether employed in the public sector).
wage = function(age, workexperience, education, gender, sector)
or, as your textbook will have it,
wage = b1 + b2*age + b3*work experience+ b4*education + b5*gender + b6*sector
The White’s test is usually used as a test for heteroskedasticity. In this test, a regression of the squares ofthe residuals is run on the variables suspected of causing theheteroskedasticity, their squares, and cross products.
(residuals)2 = b0 + b1 educ + b2 work_ex+ b3 (educ)2 + b4 (work_ex)2 + b5(educ*work_ex)
White’s Test
· Calculate n*R2 à R2 = 0.037, n=2016 à Thus, n*R2 = .037*2016 = 74.6.
· Compare this value with c2 (n), i.e.with c2 (2016)
(c2 is the symbol for theChi-Square distribution)
c2 (2016) = 124obtained from c2 table. (For 955 confidence) As n*R2 < c2 ,heteroskedasticity can not be confirmed.
请参考:regression_explained_SPSS regression_explained_SPSS.doc (368 KB)
分割点:原点哦坛友的解答
首先必须根据回归结果保存残差,并计算残差的平方,然后画残差平方与X 的散点图。步骤如下:
(1)回归计算时,在回归主对话框中单击[Save]按钮,选择[Residuals]中的[Unstandardized]选项,单击[Continue]返回主对话框。输出结果的同时,将把残差保存为一新变量res_1。
(2)计算残差的平方。选择 [Transform] => [Compute],在显示的对话框中输入残差平方的变量名(如e2)和计算残差平方的表达式(如res_1 **2 )。单击[OK]后将产生一个新变量。
(3)采用加权最小二乘法(WLS),可设置权数为1/|e|。做一个加权最小二乘法的回归喽
Weighted Least Squares)。