Displaying 1 result from an estimated 1 matches for "x1_it".
Did you mean:
x1_i
2013 Jan 11
0
Manual two-way demeaning of unbalanced panel data (Wansbeek/Kapteyn transformation)
...lm)
library(lmtest)
data(Grunfeld)
y_i<-Grunfeld$inv-ave(Grunfeld$inv,index=Grunfeld$firm)
y_t<-Grunfeld$inv-ave(Grunfeld$inv,index=Grunfeld$year)
y_it<-(Grunfeld$inv-ave(Grunfeld$inv,index=Grunfeld$firm)-ave(Grunfeld$inv,index=Grunfeld$year)+rep(mean(Grunfeld$inv),length(Grunfeld$inv)))
x1_it<-(Grunfeld$value-ave(Grunfeld$value,index=Grunfeld$firm)-ave(Grunfeld$value,index=Grunfeld$year)+rep(mean(Grunfeld$value),length(Grunfeld$inv)))
dem_y_i<-pmodel.response(plm(formula=inv~value,data=Grunfeld,index=c("firm","year"),model="within",effect="indiv...