lrberge / fixest

Fixed-effects estimations
https://lrberge.github.io/fixest/
378 stars 61 forks source link

How to use bias-reduced linearization (BRL) / CR2 - adjusted standard errors with feols? #370

Open GustavFlorinAagren opened 2 years ago

GustavFlorinAagren commented 2 years ago

Hi! Thanks for a great package. I'm working on a project where I have an issue with too few clusters. I know there are some built-in restrictions and solutions using ssc but I'm interested in conducting the SEs according to Pustejovsky and Tipton (2016) using CR2 or bias-reduced linearization adjustment. Is there any way CR2-standard errors can be obtained using fixest?

s3alfisc commented 1 year ago

Hi @GustavFlorinAagren,

CR2-robust inference with bias-reduced linearization is implemented in @jepusto's clubSandwich package. To the best of my knowledge, it does not support fixest, and I know of no other R package that implements this. Note though that clubSandwich supports lm() - so you could estimate your model via lm(), get the covariance matrix via clubSandwich, and pass it back to fixest in case you still wanted to use e.g. etable().

Alternatively, the sandwich package offers support for CRV2 and CRV3 variance covariance matrix estimation without BRL, but supports fixest. It also offers support for the CRV3 'cluster jackknife', which, as MacKinnon, Nielsen & Webb show, is equivalent to the CRV3 estimator and fast to compute. I have collected some notes on this here. MNW further provide evidence that the CRV3 estimator performs really, really well:

image

The figure above is from MNW's linked paper (figure 4 on page 20).

I hope this helps!

GustavFlorinAagren commented 1 year ago

Hi @s3alfisc!

Thanks for your reply. As you mention, the clubSandwich package does not support fixest with is unfortunate for me. I think I'll try the sandwich package solution.

But what do you think, wouldn't be of interest if fixest allowed to use more conservative ways to compute the clustered SEs?