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

c# SetCompatibleTextRenderingDefault must be called before the first -

c++ - Fill runtime data at compile time with templates -

C#.NET Oracle.ManagedDataAccess ConfigSchema.xsd -