rpanelfixedfixest

R: Does fixest package support panel data analysis?


I am working with fixest package. Great results so far.

My data could be set as a panel. Is there any way for fixest to run run panel data analysis.

My model looks something like this:

model <- fenegbin(incident~ treatdummy + 
poverty + 
industry + 
rural  + 
offset(log(pop))|state,
               se= "HC1",
            data=subset(df1))

Best,


Solution

  • Yes. You can use the panel.id argument in your estimation function to get access to a bunch of panel methods.

    From the documentation:

    panel.id The panel identifiers. Can either be: i) a one sided formula (e.g. panel.id = ~id+time), ii) a character vector of length 2 (e.g. panel.id=c('id', 'time'), or iii) a character scalar of two variables separated by a comma (e.g. panel.id='id,time'). Note that you can combine variables with ^ only inside formulas (see the dedicated section in feols).

    See here for more details.