* Chapter 15 - Example 15.5 - Pooling with AR(1) errors, pp. 603-607.
* W.H. Greene, Econometric Analysis, Fourth Edition, 2000.
SAMPLE 1 100
READ (grunfeld.shd) / NAMES
* Cross-section Heteroskedasticity and AR(1) errors.
* The SAME option is used to force the same autocorrelation
* coefficient for all cross-sections.
POOL I F C / NCROSS=5 DN NOMULSIGSQ SAME
* FULL Cross-section Correlation and AR(1) errors
POOL I F C / NCROSS=5 FULL DN NOMULSIGSQ SAME
* The SHAZAM estimates differ from the results reported in
* Table 15.3 on p. 607.
* In SHAZAM, the cross-section autocorrelation coefficients RHO
* are estimated from a least squares regression of the
* current period residuals on the lagged residuals (dropping
* the first observation and no intercept).
* The RHO estimates reported in the middle of p. 607
* are based on Equation (15-20), p. 604.
* The denominator should contain one-period lagged residuals
* instead of current period residuals.
* The discussion in the middle of p. 607 notes that the assumption of
* identical coefficients for all cross-section units gives a
* mis-specified model for this data set.
* The SURE results that allow for different cross-section coefficients
* are reported in Chapter 15.4.
* Therefore, in view of the concern with model specification --
* the estimation results for Example 15.5 should be interpreted with
* some caution.
* The above POOL commands specified the SAME option for the
* same autocorrelation coefficient for all cross-sections.
* This was to avoid problems with non-stationarity that occur
* when different autocorrelation coefficients are estimated.
* (The Greene calculations of the autocorrelations did not find
* this problem). Alternatively, the CORCOEF option can be used
* to provide an alternative estimation method for the cross-section
* autocorrelation coefficients.
* The SHAZAM commands below show the calculations of the
* autocorrelation coefficients for the SHAZAM method and
* the Greene method.
SET NODOECHO NOOUTPUT
OLS I F C / RESID=E
GEN1 END=0
DIM RHO 5 RHO1 5 ETOP 100 E2 100 E2L 100
DO #=1,5
GEN1 BEG=END+2
GEN1 END=BEG+18
SAMPLE BEG END
GENR ETOP=E*LAG(E)
GENR E2=E*E
GENR E2L=LAG(E)*LAG(E)
STAT ETOP E2 E2L / SUMS=TOT
GEN1 RHO:#=TOT:1/TOT:2
GEN1 RHO1:#=TOT:1/TOT:3
ENDO
SAMPLE 1 5
* RHO estimates reported in Greene, middle of p. 607
PRINT RHO
* RHO estimates reported by the POOL command in SHAZAM
PRINT RHO1
STOP