Open dazhwu opened 1 month ago
I just tried to manually do the 2sls using plm and got the same coefficients as from fixest. It seems that there's some issue with plm.
stage1 <- plm(wage ~ lag(wage,1), data = ds, effect = "individual", method="within")
summary(stage1)
f_wage <- fitted(stage1)
stage2 = plm(emp ~ capital + f_wage , data = ds, effect = "individual", method="within")
summary(stage2)
Coefficients:
Estimate Std. Error t-value Pr(>|t|)
capital 0.801495 0.064088 12.5062 < 2.2e-16 ***
f_wage -0.143626 0.032790 -4.3802 1.327e-05 ***
I compared plm, fixest, and FixedEffectModels (julia) with my own data, and found that the latter two produced the same results, different from plm. Is fixest based on a different calculation method compared with plm? Below is an illustration: