* Pooling Time-Series and Cross-Sectional Data * Reference: Chapter 17 of * R. Carter Hill, William E. Griffiths and George G. Judge, * Undergraduate Econometrics, Second Edition, Wiley. SAMPLE 1 200 READ (POOL.shd) / NAMES STAT / ALL * Estimate a fixed effects model - Table 17.2, p. 359 POOL INV V K / NCROSS=10 OLS FIXED * Alternative estimation method. * Generate a set of cross-section dummy variables. MATRIX CSDUM=SEAS(200,-10) DO #=1,10 GENR CS#=CSDUM:# ENDO * Estimate a fixed effects model with cross-section dummy variables. POOL INV V K CS1-CS10 / NCROSS=10 OLS NOCONSTANT * Test for equality of the firm intercepts - F-test * Equation (R17.2), p. 359 TEST TEST CS1=CS2 TEST CS1=CS3 TEST CS1=CS4 TEST CS1=CS5 TEST CS1=CS6 TEST CS1=CS7 TEST CS1=CS8 TEST CS1=CS9 TEST CS1=CS10 END * Save the error variance GEN1 SIG2E=$SIG2 * Pooling with Error Components * The estimation procedure is programmed with SHAZAM commands. GEN1 T=20 GEN1 NCROSS=10 GEN1 NOBS=200 MATRIX CINV=VEC(INV,T) MATRIX CV=VEC(V,T) MATRIX CK=VEC(K,T) SET NOOUTPUT NODOECHO SAMPLE 1 T STAT CINV / MEAN=IBAR STAT CV / MEAN=VBAR STAT CK / MEAN=KBAR SAMPLE 1 NCROSS OLS IBAR VBAR KBAR 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 ISTAR NOBS VSTAR NOBS KSTAR NOBS GEN1 END=0 DO #=1,NCROSS GEN1 BEG=END+1 GEN1 END=END+T SAMPLE BEG END GENR ISTAR=INV-ALPHA*IBAR:# GENR VSTAR=V-ALPHA*VBAR:# GENR KSTAR=K-ALPHA*KBAR:# ENDO SET OUTPUT SAMPLE 1 NOBS GENR INTERCEP=1-ALPHA * Apply OLS to the transformed observations to get the GLS estimator * Equation (R17.3), p. 360 OLS ISTAR VSTAR KSTAR INTERCEP / NOCONSTANT STOP