Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
The MODEL Procedure

Heteroscedasticity

One of the key assumptions of regression is that the variance of the errors is constant across observations. If the errors have constant variance, the errors are called homoscedastic. Typically, residuals are plotted to assess this assumption. Standard estimation methods are inefficient when the errors are heteroscedastic or have non-constant variance.

Heteroscedasticity Tests

The MODEL procedure now provides two tests for heteroscedasticity of the errors: White's test and the modified Breusch-Pagan test.

Both White's test and the Breusch-Pagan are based on the residuals of the fitted model. For systems of equations, these tests are computed separately for the residuals of each equation.

The residuals of an estimation are used to investigate the heteroscedasticity of the true disturbances.

The WHITE option tests the null hypothesis

H_{0}: {\sigma}^2_{i} = 
{\sigma}^2 \hspace*{1em}\rm{for all } i

White's test is general because it makes no assumptions about the form of the heteroscedasticity (White 1980). Because of its generality, White's test may identify specification errors other than heteroscedasticity (Thursby 1982). Thus White's test may be significant when the errors are homoscedastic but the model is misspecified in other ways.

White's test is equivalent to obtaining the error sum of squares for the regression of the squared residuals on a constant and all the unique variables in {J {\otimes} J}, where the matrix J is composed of the partial derivatives of the equation residual with respect to the estimated parameters.

Note that White's test in the MODEL procedure is different than White's test in the REG procedure requested by the SPEC option. The SPEC option produces the test from Theorem 2 on page 823 of White (1980). The WHITE option, on the other hand, produces the statistic from Corollary 1 on page 825 of White (1980).

The modified Breusch-Pagan test assumes that the error variance varies with a set of regressors, which are listed in the BREUSCH= option.

Define the matrix Z to be composed of the values of the variables listed in the BREUSCH= option, such that zi,j is the value of the jth variable in the BREUSCH= option for the ith observation. The null hypothesis of the Breusch-Pagan test is

H_{0}: {\sigma}^2_{i} = 
{\sigma}^2( {\alpha}_{0} + {{{\alpha}}^{'}z_{i}})

where { {\sigma}^2_{i}} is the error variance for the ith observation, and {{\alpha}_{0}} and {{{\alpha}}} are regression coefficients.

The test statistic for the Breusch-Pagan test is

bp = \frac{1}v(u - \bar{u}i)^{'}Z(Z^{'}Z)^{-1} Z^{'}(u - \bar{u}i)

where u = (e12, e22, ... ,en2), i is a n ×1 vector of ones, and

v = \frac{1}n\sum_{i=1}^n{(e_{i}^2 - 
\frac{e^{'}e}n)^2}

This is a modified version of the Breusch-Pagan test, which is less sensitive to the assumption of normality than the original test (Greene 1993, p. 395).

The statements in the following example produce the output in Figure 14.33:


   proc model data=schools;
      parms const inc inc2;
   
      exp = const + inc * income + inc2 * income * income;
      incsq = income * income;
   
      fit exp / white breusch=(1 income incsq);
   run;

The MODEL Procedure

Heteroscedasticity Test
Equation Test Statistic DF Pr > ChiSq Variables
exp White's Test 21.16 4 0.0003 Cross of all vars
  Breusch-Pagan 15.83 2 0.0004 1, income, incsq

Figure 14.33: Output for Heteroscedasticity Tests

Correcting for Heteroscedasticity

There are two methods for improving the efficiency of the parameter estimation in the presence of heteroscedastic errors. If the error variance relationships are known, weighted regression can be used or an error model can be estimated. For details on error model estimation see section "Error Covariance Stucture Specification". If the error variance relationship is unknown, GMM estimation can be used.

Weighted Regression

The WEIGHT statement can be used to correct for the heteroscedasticity. Consider the following model, which has a heteroscedastic error term:

y_{t} = 250 (e^{-0.2t}-e^{-0.8t}) + \sqrt{(9/t)} {\epsilon}_{t}
The data for this model is generated with the following SAS statements:

   data test;
      do t=1 to 25;
         y = 250 * (exp( -0.2 * t ) - exp( -0.8 * t )) + 
             sqrt( 9 / t ) * rannor(1);
         output;
      end;
   run;
If this model is estimated with OLS,

   proc model data=test;
      parms b1 0.1 b2 0.9;
      y = 250 * ( exp( -b1 * t ) - exp( -b2 * t ) );
      fit y;
   run;
the estimates shown in Figure 14.34 are obtained for the parameters.

The MODEL Procedure

Nonlinear OLS Parameter Estimates
Parameter Estimate Approx Std Err t Value Approx
Pr > |t|
b1 0.200977 0.00101 198.60 <.0001
b2 0.826236 0.00853 96.82 <.0001

Figure 14.34: Unweighted OLS Estimates

If both sides of the model equation are multiplied by {\sqrt{t}}, the model will have a homoscedastic error term. This multiplication or weighting is done through the WEIGHT statement. The WEIGHT statement variable operates on the squared residuals as

{\epsilon}^{'}_{t} {\epsilon}_{t} = weight x q^{'}_{t}q_{t}
so that the WEIGHT statement variable represents the square of the model multiplier. The following PROC MODEL statements corrects the heteroscedasticity with a WEIGHT statement

   proc model data=test;
      parms b1 0.1 b2 0.9;
      y = 250 * ( exp( -b1 * t ) - exp( -b2 * t ) );
      fit y;
      weight t;
   run;
Note that the WEIGHT statement follows the FIT statement. The weighted estimates are shown in Figure 14.35.

The MODEL Procedure

Nonlinear OLS Parameter Estimates
Parameter Estimate Approx Std Err t Value Approx
Pr > |t|
b1 0.200503 0.000844 237.53 <.0001
b2 0.816701 0.0139 58.71 <.0001

Figure 14.35: Weighted OLS Estimates

The weighted OLS estimates are identical to the output produced by the following PROC MODEL example:


   proc model data=test;
      parms b1 0.1 b2 0.9;
      y = 250 * ( exp( -b1 * t ) - exp( -b2 * t ) );
      _weight_ = t;
      fit y;
   run;
If the WEIGHT statement is used in conjunction with the _WEIGHT_ variable, the two values are multiplied together to obtain the weight used.

The WEIGHT statement and the _WEIGHT_ variable operate on all the residuals in a system of equations. If a subset of the equations needs to be weighted, the residuals for each equation can be modified through the RESID. variable for each equation. The following example demonstrates the use of the RESID. variable to make a homoscedastic error term:


   proc model data=test;
      parms b1 0.1 b2 0.9;
      y = 250 * ( exp( -b1 * t ) - exp( -b2 * t ) );
      resid.y = resid.y * sqrt(t);
      fit y;
   run;
These statements produce estimates of the parameters and standard errors that are identical to the weighted OLS estimates. The reassignment of the RESID.Y variable must be done after Y is assigned, otherwise it would have no effect. Also, note that the residual (RESID.Y) is multiplied by {\sqrt{t}}. Here the multiplier is acting on the residual before it is squared.

GMM Estimation

If the form of the heteroscedasticity is unknown, generalized method of moments estimation (GMM) can be used. The following PROC MODEL statements use GMM to estimate the example model used in the preceding section:


   proc model data=test;
      parms b1 0.1 b2 0.9;
      y = 250 * ( exp( -b1 * t ) - exp( -b2 * t ) );
      fit y / gmm;
      instruments b1 b2;
   run;
GMM is an instrumental method, so instrument variables must be provided.

GMM estimation generates estimates for the parameters shown in Figure 14.36.

The MODEL Procedure

Nonlinear GMM Parameter Estimates
Parameter Estimate Approx Std Err t Value Approx
Pr > |t|
b1 0.200487 0.000807 248.38 <.0001
b2 0.822148 0.0142 57.95 <.0001

Figure 14.36: GMM Estimation for Heteroscedasticity

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.