R plm time fixed effect model
问题 I found these sample codes online on fixed effect model: Code 1 fixed.time <- plm(y ~ x1 + factor(year), data=Panel, index=c("country", "year"), model="within") Code 2 fixed.time <- plm(y ~ x1, data=Panel, index=c("country", "year"), model="within") What is the difference? Doesn't index with country,year mean the fixed effect model actually create a dummy variable for year? The documentation does not explain this very clearly. 回答1: In plm , specifying the index arguments just formats the data