Fixed effects in R for a Stata user -


i've looked similar question haven't yet found i'm looking for.

in stata, can run model below panel data (school , time fixed effects):

xi: areg total i.year*group_dummy, absorb(school) cluster (school) 

how run similar regression in r using plm package?

this tried:

model1 <- plm(total ~ group_dummy,            na.action = na.omit,           data   = pdlong,            method = "within",           index = c("school", "year"),           effect = "twoway") 

but error message (and unsure how should interpreted):

error in x[, ii] : subscript out of bounds


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - jQuery UI Splitter/Resizable for unlimited amount of columns -

javascript - IE9 error '$'is not defined -