How to run regressions on multidimensional panel data in R

后端 未结 4 873
暗喜
暗喜 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:13

    I think you can also do:

    df <-transform(df, ID = as.numeric(interaction(comp, count, drop=TRUE))) 
    

    And then estimate

    result <- plm(value.y ~ value.x, data = df, index = ("ID","year"))
    

提交回复
热议问题