options crt limwarn=0 ; name usbalpi "Chamberlain's PI Matrix - US Balanced Panel" ; ? ? This run illustrates the use of Chamberlain's PI Matrix ? methodology to estimate a panel data model with a single ? independent variable. Fixed (correlated) firm effects whose ? coefficient may change over time are allowed for. There ? are 3 basic models, each estimated with no lags on x, and ? two lags on x (3 betas). ? 1) No fixed effects, just y(t) = b*x(t) + u(t) ? 2) Fixed effects, the projection of alpha(i) on the ? x's from all 6 years (1983-1988). ? 3) Fixed effects with time-varying coefficients ? lambda(t). ? ? Chi-squared tests for the presence of lag coefficients ? are computed after estimating each pair of models. ? ? The references for this methodology are Chamberlain, ? Journal of Econometrics, 1982, and the chapter on panel ? data in the Handbook of Econometrics (North-Holland). ? input fitest ; ? Fetch fitest PROC. ? input rdusbal ; ? Read in data and transform variables. ? ? Define equation for each year; only use the last 3 years, ? as a simple example. ? dot 86-88 ; frml pieq. sl.= pi.83*cl83+pi.84*cl84+pi.85*cl85 + pi.86*cl86+pi.87*cl87+pi.88*cl88 ; param pi.83-pi.88 .1 ; enddot ; list sl sl86-sl88 ; list cl cl83-cl88 ; list ulist u86-u88 ; list pieqs pieq86-pieq88 ; ? ? Calculate the PI matrix estimates using SUR. The robust ? estimate of the covariance of these estimates is an estimate ? of OMEGA in Chamberlain's notation. PI and OMEGA will be ? used in the rest of the program to estimate constrained PI ? matrix models using SUR. ? sur(noprint,hcov=r) pieqs ; list pilist pi8683-pi8688 pi8783-pi8788 pi8883-pi8888 ; list pieqlist pieq8683-pieq8688 pieq8783-pieq8788 pieq8883-pieq8888 ; mmake pi pilist ; mform(nrow=k,ncol=m) pi ; mat pi = pi' ; print pi ; ? Print PI as matrix for convenience. copy @vcov omega ; ? ? Make the PIs into series of one observation each so we can ? use the SUR estimator on them. They are sufficient statistics ? for the data for a wide class of linear-in-the-variables models. ? smpl 1 1 ; dot pilist ; genr s. = . ; enddot ; ? ? The model below is the one discussed by Chamberlain under ? strict exogeneity. ? dot 83-88 ; frml pieq86. spi86. = lam86*gam. ; frml pieq87. spi87. = lam87*gam. ; frml pieq88. spi88. = lam88*gam. ; enddot ; frml pieq8684 spi8684 = beta3 + lam86*gam84 ; frml pieq8685 spi8685 = beta2 + lam86*gam85 ; frml pieq8686 spi8686 = beta1 + lam86*gam86 ; frml pieq8785 spi8785 = beta3 + lam87*gam85 ; frml pieq8786 spi8786 = beta2 + lam87*gam86 ; frml pieq8787 spi8787 = beta1 + lam87*gam87 ; frml pieq8886 spi8886 = beta3 + lam88*gam86 ; frml pieq8887 spi8887 = beta2 + lam88*gam87 ; frml pieq8888 spi8888 = beta1 + lam88*gam88 ; ? title "No Correlated Effects - No Lags" ; ? const lam86 0 lam87 0 lam88 0 beta2 0 beta3 0 ; const gam83-gam88 ; param beta1 .1 ; sur(silent,wname=omega) pieqlist ; fitest tracec dfc ; ? title "No Effects - Lags" ; ? const lam86 0 lam87 0 lam88 0 ; param beta1 beta2 beta3 ; const gam83-gam88 ; sur (silent,wname=omega) pieqlist ; fitest traceu dfu ; ? title "Test for Presence of Lags" ; ? set lagtest = tracec-traceu ; set ndf = dfc-dfu ; cdf (chisq,df=ndf) lagtest ; ? ? Impose random (correlated) effects assumptions. The trace ? reported by TSP is distributed chi-squared with degrees of ? freedom = #constraints = M*K-#params under the null (constrained) ? hypothesis. In the FE case, that means DF = 3*6-1-6 = 11. ? title "Fixed Effects - No Lags" ; ? const lam86 1 lam87 1 lam88 1 beta2 0 beta3 0 ; param beta1 ; param gam83-gam88 ; sur(silent,wname=omega) pieqlist ; fitest tracec dfc ; ? title "Fixed Effects - Lags" ; ? const lam86 1 lam87 1 lam88 1 ; param beta1 beta2 beta3 ; param gam83-gam88 ; sur (silent,wname=omega) pieqlist ; fitest traceu dfu ; ? title "Test for Presence of Lags" ; ? set lagtest = tracec-traceu ; set ndf = dfc-dfu ; cdf (chisq,df=ndf) lagtest ; ? title "Fixed Effects - No Lags - Lambda Free" ; ? const lam86 1 ; param lam87 lam88 ; param beta1 ; const beta2 0 beta3 0 ; param gam83-gam88 ; sur (silent,wname=omega) pieqlist ; fitest tracec dfc ; ? title "Fixed Effects - Lags - Lambda Free" ; ? const lam86 1 ; param lam87 lam88 ; param beta1 beta2 beta3 ; param gam83-gam88 ; sur (silent,wname=omega) pieqlist ; fitest traceu dfu ; ? title "Test for Presence of Lags" ; ? set lagtest = tracec-traceu ; set ndf = dfc-dfu ; cdf (chisq,df=ndf) lagtest ; stop ; end ;