I have like 30 observation units over 20 years. Therefore, I have to use Time-Series Cross-Sectional Data. My aim is not really to go for differences between the observation units but just to run a regression x ~ y + control variables. I have used plm, but I am not sure how to deal with random or fixed effects. First, which one is more appropriate, and secondly, can I just do it as such?
reg <- plm(x ~ y + a + b + c + d, data = df, index = c("e", "f"), model = "random")
where e refers to the observation units, f denotes the years
Aucun commentaire:
Enregistrer un commentaire