plm: using fixef() to manually calculate fitted values for a fixed effects twoways model

后端 未结 4 980
北恋
北恋 2021-02-19 21:44

Please note: I am trying to get the code to work with both time & individual fixed effects, and an unbalanced dataset. The sample code below works

4条回答
  •  无人共我
    2021-02-19 22:17

    This works for an unbalanced data with effect="individual" and time dummies y ~ x +factor(year):

    fitted <- pmodel.response(plm.model)-residuals(plm.model)
    

提交回复
热议问题