* R. Carter Hill, William E. Griffiths and Guay C. Lim, * Principles of Econometrics, Fourth Edition, Wiley, 2011. * Chapter 15 Panel data models * Use the PAR command to allocate increased working space for SHAZAM. PAR 8000 SAMPLE 1 3580 READ (nls_panel.dat) / names * Pooled least squares estimates of a wage equation - Table 15.2, page 543. OLS lwage educ exper exper2 tenure tenure2 black south union * Cluster-robust standard errors - Table 15.2, page 543. POOL lwage educ exper exper2 tenure tenure2 black south union / & NCROSS=716 OLS HETCOV COEF=BETA STDERR=SE * Note: For robust standard errors the calculation method used by * SHAZAM differs from the textbook method. * Fixed effects estimation * The textbook presentation uses the first 10 individuals. GEN1 NC=10 GEN1 NOBS=NC*5 SAMPLE 1 NOBS * Dummy variable estimation - Table 15.3, page 545. * Generate cross-section dummy variables DO #=1,10 IF (ID.EQ.#) D#=1 ENDO OLS lwage exper exper2 tenure tenure2 union D1-D10 / NOCONSTANT * F-test statistic for the presence of individual differences * (bottom of page 546). TEST TEST D2=D1 TEST D3=D1 TEST D4=D1 TEST D5=D1 TEST D6=D1 TEST D7=D1 TEST D8=D1 TEST D9=D1 TEST D10=D1 END GEN1 SSEU=$SSE GEN1 DFU=$DF * An alternative calculation method for the F-test. * Pooled least squares - Table 15.4, page 546. OLS lwage exper exper2 tenure tenure2 union GEN1 SSER=$SSE GEN1 DFR=$DF * F-test statistic for the presence of individual differences * (bottom of page 546). * The number of restriction is J GEN1 J=DFR-DFU GEN1 F=(DFU/J)*(SSER-SSEU)/SSEU * p-value calculation DISTRIB F / TYPE=F DF1=J DF2=DFU GEN1 pvalue=1-$CDF PRINT F pvalue * An alternative estimation method for the fixed effects estimation * reported in Table 15.3, page 545. POOL lwage exper exper2 tenure tenure2 union / NCROSS=NC OLS FIXED * Fixed Effects Estimates from the Complete Panel - Table 15.7, page 550. SAMPLE 1 3580 POOL lwage exper exper2 tenure tenure2 south union / NCROSS=716 OLS FIXED STOP