* * PANEL.RPF * RATS Version 8, User's Guide, Example 12.4 * cal(panelobs=20) 1935 all 10//1954:1 open data grunfeld.dat data(format=prn,org=cols) * * Do fixed and random effect. The intercept is dropped from the fixed * effects regression since it will be wiped out as a time-invariant * variable * preg(method=fixed) invest # firmvalue cstock preg(method=random) invest # constant firmvalue cstock preg(method=fd) invest # firmvalue cstock preg(method=sur) invest # constant firmvalue cstock * * Do fixed effects as least squares with dummy variables * dec vect[series] idummies(10) do i=1,10 set idummies(i) = %indiv(t)==i end do i linreg invest # firmvalue cstock idummies * * Do random effects by using panel data transformations. %VRANDOM and * %VINDIV are the estimates of the component variances from the PREGRESS * instructions. The coefficient estimates are identical to those from * PREGRESS, but the standard errors are slightly different because the * LINREG on the transformed variables estimates a new SIGMA^2, while * PREGRESS uses the %VRANDOM value. * compute theta=1-sqrt(%vrandom/(%vrandom+20*%vindiv)) panel(entry=1.0,indiv=-theta) invest / ifix panel(entry=1.0,indiv=-theta) firmvalue / ffix panel(entry=1.0,indiv=-theta) cstock / cfix set constfix = 1-theta linreg ifix # constfix ffix cfix