options double crt nwidth=17,signif=9; name gscore10 'Score tests for random effects and serial correlation'; ? Following A.K. Bera, W. Sosa-Escudero and M. Yoon, "Tests for ? the error components model in the presence of misspecification", ? Journal of Econometrics, 3/2001, p.1-24. ? Using the full/original version of the Grunfeld dataset. ? with all of the 10 firms (vs. the 5-firm version used in the 2001 ? paper above). ? by Clint Cummins 9/04 ? Data Source: Grunfeld (1958) ? Description: Panel Data, 10 U.S. firms over 20 years, 1935-1954. ? Variables: doc FN 'Firm Number'; doc YR 'Year 1935-1954'; doc I 'Annual real gross investment'; doc F 'Real value of the firm (shares outstanding)'; doc K 'Real value of the capital stock'; list vars FN YR I F K; const n,10 t,20 ystart,1935; set nt=n*t; smpl 1,nt; read(file='grunfeld.txt') vars; ols i c f k; set ssro = @ssr; u = @res; ulag = 0; ? zero for first obs of ulag for each firm select YR > ystart; ulag = u(-1); mat upu2T = u'u; ? denominator sum from 2 to T follows Baltagi and Li (1991) select 1; mat upul = u'ulag; set B_1 = upul/ssro; ? apparent calculation from (10) set B = upul/upu2T; ? actual calculation used for Table 1 freq(panel,n=n,t=t,id=FN,time=YR,start=ystart) a; panel(noreg,silent) u c; ? to compute mean of U by firm, for A mat sumu = @mean*T; mat A = 1 - (sumu'sumu)/ssro; ? Benchmark ? ? test statistic p-value ? RS_mu 798.161548369 .000000000 ? RS_mu* 664.948115138 .000000000 ? RS_rho 143.523364815 .000000000 ? RS_rho* 10.309931583 .00132316188 ? RS_murho 808.471479952 .000000000 ? RSO_mu 28.251753014 .000000000 ? RSO_mu* 25.786587893 .000000000 ? title 'Breusch-Pagan(1980) test for individual random effects'; set RS_mu = NT*A**2/[2*(T-1)]; set RS_muS = NT*(A+2*B)**2/[2*(T-1)*(1-(2/T))]; ? modified version cdf(chisq,df=1) RS_mu %RS_mu; cdf(chisq,df=1) RS_muS %RS_muS; print RS_mu RS_muS %RS_mu %RS_muS; title 'LM test for serial correlation'; title 'Baltagi and Li (1991, 1995)'; set RS_rho = N*T**2*B**2/[(T-1)]; set RS_rhoS = N*T**2*(B+A/T)**2/[(T-1)*(1-(2/T))]; ? modified version cdf(chisq,df=1) RS_rho %RS_rho; cdf(chisq,df=1) RS_rhoS %RS_rhoS; print RS_rho RS_rhoS %RS_rho %RS_rhoS; title 'joint test for individual random effects and serial correlation'; title 'Baltagi and Li (1991, 1995)'; set RS_murho = N*T**2*(A**2+4*A*B+2*T*B**2)/[2*(T-1)*(T-2)]; cdf(chisq,df=2) RS_murho %RS_murho; print RS_murho %RS_murho; title 'one-sided test for individual random effects'; set RSO_mu = sqrt(RS_mu); set RSO_muS = sqrt(RS_muS); ? modified version - Honda (1985) cdf(normal,uptail) RSO_mu %RSO_mu; cdf(normal,uptail) RSO_muS %RSO_muS; print RSO_mu RSO_muS %RSO_mu %RSO_muS;