* POOLING TIME-SERIES CROSS-SECTION DATA * * Data from Judge, Hill, Griffiths, Lutkepohl and Lee, * INTRODUCTION TO THE THEORY AND PRACTICE OF ECONOMETRICS, * Second Edition, Wiley, 1988, Table 11.5, page 477. * The data set contains 10 years of cost and production data * for 4 industries. SAMPLE 1 10 READ C1 C2 C3 C4 Q1 Q2 Q3 Q4 43.72 51.03 43.90 64.29 38.46 32.52 32.86 41.86 45.86 27.75 23.77 42.16 35.32 18.71 18.52 28.33 4.74 35.72 28.60 61.99 3.78 27.01 22.93 34.21 40.58 35.85 27.71 34.26 35.34 18.66 25.02 15.69 25.86 43.28 40.38 47.67 20.83 25.58 35.13 29.70 36.05 48.52 36.43 45.14 36.72 39.19 27.29 23.03 50.94 64.18 19.31 35.31 41.67 47.70 16.99 14.80 42.48 38.34 16.55 35.43 30.71 27.01 12.56 21.53 25.60 45.39 30.97 54.33 23.70 33.57 26.76 32.86 49.81 43.69 46.60 59.23 39.53 27.32 41.42 42.25 * Stack the columns into a long vector MATRIX C=(C1'|C2'|C3'|C4')' MATRIX Q=(Q1'|Q2'|Q3'|Q4')' * Create cross-section dummy variables. * Set the number of cross-sections GEN1 NC=4 MATRIX CSDUM=SEAS(40,-NC) * Pooling with Error Components * Use results from OLS with dummy variables to estimate variance components SAMPLE 1 40 ?OLS C Q CSDUM / NOCONSTANT ?GEN1 SIG2E=$SIG2 SAMPLE 1 10 ?STAT C1-C4 / MEAN=CBAR ?STAT Q1-Q4 / MEAN=QBAR GEN1 T=10 SAMPLE 1 4 ?OLS CBAR QBAR ?GEN1 SIG21=$SIG2*T GEN1 SIG2U=(SIG21-SIG2E)/T * Check that SIG2U is positive PRINT SIG2U GEN1 ALPHA=1-SQRT(SIG2E)/SQRT(SIG21) PRINT ALPHA * Now transform the observations DIM CSTAR 40 QSTAR 40 SAMPLE 1 10 GENR CSTAR=C-ALPHA*CBAR:1 GENR QSTAR=Q-ALPHA*QBAR:1 SAMPLE 11 20 GENR CSTAR=C-ALPHA*CBAR:2 GENR QSTAR=Q-ALPHA*QBAR:2 SAMPLE 21 30 GENR CSTAR=C-ALPHA*CBAR:3 GENR QSTAR=Q-ALPHA*QBAR:3 SAMPLE 31 40 GENR CSTAR=C-ALPHA*CBAR:4 GENR QSTAR=Q-ALPHA*QBAR:4 SAMPLE 1 40 GENR INTERCEP=1-ALPHA * Apply OLS to the transformed observations to get the GLS estimator OLS CSTAR QSTAR INTERCEP / NOCONSTANT STOP