Chapter Contents |
Previous |
Next |
The MODEL Procedure |
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.
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
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 , 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
where is the error variance for the ith observation, and and are regression coefficients.
The test statistic for the Breusch-Pagan test is
where u = (e12, e22, ... ,en2), i is a n ×1 vector of ones, and
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.32:
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 WEIGHT statement can be used to correct for the heteroscedasticity. Consider the following model, which has a heteroscedastic error term:
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.33 are obtained for the parameters.
|
If both sides of the model equation are multiplied by , 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
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.34.
|
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 . Here the multiplier is acting on the residual before it is squared.
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.35.
|
Chapter Contents |
Previous |
Next |
Top |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.