options double crt; name grun12 'Grunfeld data - 1-way, 2-way ML estimates'; ? 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; set n=10; set t=20; set nt=n*t; smpl 1,nt; read(file='grunfeld.txt') vars; freq(panel,id=FN,time=YR); dummy(exclude) YR timedums; title 'One-way ML, Two-way ML: Baltagi(2001) p.23,43'; list yx I F K; panel(rei,reit,tol=1e-7) yx; title 'theta for One-way'; frml eqt theta = 1 - sqrt((1-rho_i)/(1+(T-1)*rho_i)); analyz(coef=@coefrei,vcov=@vcovrei,names=@rnmsrei) eqt; title 'thetas for Two-way'; frml eqt1 theta1 = 1 - 1/sqrt(T*(rho_i/(1-rho_i-rho_t)) + 1); frml eqt2 theta2 = 1 - 1/sqrt(N*(rho_t/(1-rho_i-rho_t)) + 1); frml eqt3 theta3 = 1 - 1/sqrt(T*(rho_i/(1-rho_i-rho_t)) + 1) - 1/sqrt(N*(rho_t/(1-rho_i-rho_t)) + 1) + 1/sqrt(T*(rho_i/(1-rho_i-rho_t)) + N*(rho_t/(1-rho_i-rho_t)) + 1); analyz(coef=@coefreit,vcov=@vcovreit,names=@rnmsreit) eqt1-eqt3; title 'two-way within: p.43'; panel(notot,nobet,novarc) yx timedums;