正文

Heteroskedasticity as a sample

(2004-12-02 16:12:31) 下一個

Heteroskedasticity as a sample partition


The Goldfeld-Quandt test gives a test for equal variance in two subsets of observations. This test is reported with the SHAZAM commands:

OLS . . .
DIAGNOS / CHOWTEST

The DIAGNOS command uses the results from the immediately preceding OLS command to generate diagnostic tests. The CHOWTEST option computes and reports the Goldfeld-Quandt test statistic for every breakpoint in the data. This option also computes the Chow test statistic for structural change (that is, parameter stability in the 2 observation subsets).

If a specific sample partition is of interest then the following SHAZAM commands can be used:

OLS . . .
DIAGNOS / CHOWONE=
n1

where n1 is the number of observations in the first group.

The SHAZAM calculations consider that the alternative hypothesis is smaller error variance in the second subset relative to the first subset. Note that some authors present the alternative as larger variance in the second subset. Goldfeld and Quandt recommend ordering the observations by the values of one of the explanatory variables. This can be done with the SORT command in SHAZAM. The DESC option on the SORT command should be used if it is assumed that the variance is positively related to the value of the sort variable.

If the G-Q test statistic is less than 1 then the p-value reported in the final column of the SHAZAM output is for a test of the null hypothesis of equal variance against the alternative hypothesis of larger variance in the second group. Therefore, there is evidence for smaller variance in the second group if G-Q>1 and the p-value is less than 0.05 (or some selected significance level). There is evidence for larger variance in the second group if G-Q<1 and the p-value is less than 0.05.

Example

This example, from Griffiths, Hill and Judge, uses a data set on wheat supply in Australia. The variables in the file WHEAT.txt are annual time series on the quantity of wheat (Q) and price of wheat (P). The regression equation includes a time trend variable to capture the impact of changes in production technology. This time trend can be created in SHAZAM with the TIME function on the GENR command.

At observation number 13 new wheat varieties whose yields are less susceptible to weather variations were introduced. This may give a lower error variance in the final 13 years of the data set. The Goldfeld-Quandt test can be used to test for equal error variances in the 2 periods.

The SHAZAM commands (filename: GQ.SHA) for model estimation and testing are:

SAMPLE 1 26READ (WHEAT.txt) Q P* Generate a time indexGENR T=TIME(0)OLS Q P TDIAGNOS / CHOWONE=13STOP

The SHAZAM output can be inspected. The output from the DIAGNOS command reports:

 SEQUENTIAL CHOW AND GOLDFELD-QUANDT TESTS  N1   N2    SSE1        SSE2       CHOW    PVALUE    G-Q     DF1  DF2 PVALUE  13   13  6416.4      577.59      2.0737    .136    11.11    10   10  .000

The value for the Goldfeld-Quandt test statistic is 11.11. Critical values can be obtained from tables for the F-distribution with (10,10) degrees of freedom. However, it is not necessary to go to this effort because the reported p-value is 0.000 (only 3 digits are reported and so this actually means that the p-value is smaller than 0.0005). This gives strong evidence to reject the null hypothesis of equal variance in the 2 periods. The results suggest that the new varieties of wheat have reduced the variance in the supply of wheat because yield is less dependent on weather conditions.

Note that the Chow test reported on the SHAZAM output may not be valid in the presence of heteroskedasticity.


Home [SHAZAM Guide home]

SHAZAM output with the Goldfeld-Quandt test

The data set is from Griffiths, Hill and Judge [1993, Table 15.1, p. 491] The regression model and estimation results are described in Section 15.2 of this text.


 |_SAMPLE 1 26 |_READ (WHEAT.txt) Q P  UNIT 88 IS NOW ASSIGNED TO: WHEAT.txt    2 VARIABLES AND       26 OBSERVATIONS STARTING AT OBS       1  |_* Generate a time index |_GENR T=TIME(0) |_OLS Q P T   OLS ESTIMATION       26 OBSERVATIONS     DEPENDENT VARIABLE = Q ...NOTE..SAMPLE RANGE SET TO:    1,   26   R-SQUARE =    .8089     R-SQUARE ADJUSTED =    .7923 VARIANCE OF THE ESTIMATE-SIGMA**2 =   398.68 STANDARD ERROR OF THE ESTIMATE-SIGMA =   19.967 SUM OF SQUARED ERRORS-SSE=   9169.5 MEAN OF DEPENDENT VARIABLE =   233.42 LOG OF THE LIKELIHOOD FUNCTION = -113.145  VARIABLE   ESTIMATED  STANDARD   T-RATIO        PARTIAL STANDARDIZED ELASTICITY   NAME    COEFFICIENT   ERROR      23 DF   P-VALUE CORR. COEFFICIENT  AT MEANS  P          19.541      17.42       1.122      .273  .228      .2777      .1902 T          3.6391      1.418       2.567      .017  .472      .6353      .2105 CONSTANT   139.90      23.22       6.026      .000  .782      .0000      .5993 |_DIAGNOS / CHOWONE=13  DEPENDENT VARIABLE = Q               26 OBSERVATIONS REGRESSION COEFFICIENTS    19.5405012169       3.63908350277       139.900933986   SEQUENTIAL CHOW AND GOLDFELD-QUANDT TESTS  N1   N2    SSE1        SSE2       CHOW    PVALUE    G-Q     DF1  DF2 PVALUE  13   13  6416.4      577.59      2.0737    .136    11.11    10   10  .000              CHOW TEST - F DISTRIBUTION WITH DF1=   3 AND DF2=  20 |_STOP
[ 打印 ]
閱讀 ()評論 (0)
評論
目前還沒有任何評論
登錄後才可評論.