R: Does fixest package support panel data analysis?

320 views Asked by At

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,

2

There are 2 answers

0
sdg On BEST ANSWER

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.

0
Bin Yi Zhang On

Yes Fixest was designed to run fixed effect estimations. You can follow the video here to have a quick idea about how to use Fixest to your panel analysis.