Econometricians are often interested in the finite sample efficiency of different estimators when the underlying assumptions of least squares break down. This specific example compares the efficiency of ordinary least squares (OLS) with that of the YuleWalker method (often called PraisWinsten) when disturbance terms are assumed to be firstorder autocorrelated.
When firstorder autocorrelation exists in OLS residuals, the OLS estimator is unbiased but not efficient. The sampling variances are underestimated, causing inferences from t and Ftests to be invalid. One way to compensate for the autocorrelated residuals is the YuleWalker method.The YuleWalker method estimates the autoregressive form of the error term and then estimates the coefficients via generalized least squares (GLS). One particular advantage of the YuleWalker method is that it retains the information in the first observation. This is crucial in smallsample estimation. The gain in efficiency can be investigated by performing a small Monte Carlo experiment.
The data are generated by the following AR(1) model:
This generation of samples is accomplished by using the DATA step to turn the model into simulated data. For this example, the value of is set equal to 0.9. You can choose to repeat the experiment several times with other values of to investigate the relative efficiency of the estimators in different error persistence environments.
data sample; do samp = 1 to 1000; rho = 0.9; /* first error term */ eps = rho * rannor( 47392 ) + rannor( 82745 ); do x = 1 to 20; y = 2 + 5 * x + eps; eps=eps; eps = rho * eps + rannor( 32815 ); output; end; end;
proc autoreg data=sample outest=est0 noprint; by samp; model y = x ; run;
The distribution of the parameter estimates can be calculated with the UNIVARIATE procedure. The following commands rename the two variables from the SAS data set EST0 and calculate their empirical distributions.
data estbar0; set est0; rename x=xbar0; rename intercep=inter0; run; proc univariate data=estbar0; var xbar0 ; histogram xbar0 / normal(color=blue) cframe=ligr cfill=green; title 'Distribution of OLS Estimate'; run;
Below are the summary statistics for the coefficient of X. The mean is very close to 5, the true value, and the variance is 0.022508.
proc autoreg data=sample outest=est1 noprint; by samp; model y = x / nlag=1; run; data estbar1; set est1; rename x=xbar1; rename intercep=inter1; run; proc univariate data=estbar1; var xbar1 ; histogram xbar1 / normal(color=blue) cframe=ligr cfill=green; title 'Distribution of YuleWalker Estimate'; run;
Like the OLS estimator, the mean of the YuleWalker estimator is very close to 5. Notice, however, that the variance of the YuleWalker estimator is 0.019559, which is less than that of the OLS estimator. Also, an examination of the quantiles reveals less dispersion in the YuleWalker distribution as a whole.

An Ftest can be computed to see if the variances are significantly different from each other. The F statistic is the ratio of the variances for the two estimators adjusted for degrees of freedom, which is 999 for both the numerator and the denominator. The variance of the OLS estimator, s^{2}_{ols}, is 0.022508, while the variance of the YuleWalker estimator, s^{2}_{yw}, is 0.019559. Thus, the appropriate F statistic is given by
The pvalue of this statistic for a onesided test can be computed with the following DATA step
data _null_; p = 1probf( 1.1507746 , 999, 999 ); put p=; run;
which returns a value of
Thus, you would reject the null hypothesis that the efficiency of the two estimators is the same for most conventional levels of significance.
Greene, W.H. (1993), Econometric Analysis, Second Edition, New York: Macmillan Publishing Company.
Harvey, A.C. and McAvinchey, I.D. (1979), ``On the Relative Efficiency of Various Estimators of Regression Models with Moving Average Disturbances," Proceedings of the Econometric Society European Meetings, ed. E. Charatsis, Athens, 1979.
Johnston, J. (1972), Econometric Methods, Second Edition, New York: McGrawHill.
SAS Institute Inc. (1993), SAS/ETS User's Guide, Version 6, Second Edition, Cary, NC: SAS Institute Inc.