How to run regressions on multidimensional panel data in R

后端 未结 4 871
暗喜
暗喜 2021-02-04 22:11

I need to run a regression on a panel data . It has 3 dimensions (Year * Company * Country). For example:

============================================
 year | co         


        
4条回答
  •  离开以前
    2021-02-04 22:32

    I think you want to use lm() instead of plm(). This blog post here discusses what you're after:

    https://www.r-bloggers.com/r-tutorial-series-multiple-linear-regression/

    for your example I'd imagine it would look something like the following:

    lm(formula = comp ~ count + year, data = dataname)
    

提交回复
热议问题