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 -

Laravel mail error `Swift_TransportException in StreamBuffer.php line 269: Connection could not be established with host smtp.gmail.com [ #0]` -

c# SetCompatibleTextRenderingDefault must be called before the first -