Closed kennchua closed 1 year ago
Hi @kennchua, for fast CRV3 inference (cluster robust and HC3), check either sandwich::vcovJK(), which is identical to the CRV3 robust estimator if you choose center = 'estimate'
, or summclust::vcov_CR3J() / , which also implements the CRV3 estimator as a jackknife. One implementation may be faster than the other in different contexts, I have not yet systematically benchmarked the two against each other. I am not aware of a fast implementation of the HC2/CRV3, even though Niccodemi & Wansbeek have had some ideas. I hope this helps!
Edit:
Note that sandwich::vcovJK()
is only still available through the dev version, which you can install via install.packages("sandwich", repos = "https://R-Forge.R-project.org")
.
Thank you @s3alfisc. I will look into these solutions. Appreciate the help and the great work on summclust::vcov_CR3J!
I understand that
sandwich
does not officially supportfixest
for HC2/HC3 vcov types. Though one workaround is specifying fixed effects as factor variables withinfeols
formula.For example, the following works:
However, I noticed that for larger datasets
sandwich
/fixest
struggles to compute / does not run at all.Is there a solution to computing small-sample cluster-robust standard errors (HC2, HC3 etc.) for bigger datasets?
I've tried looking into other packages like
dfadjust
(HC2) andsummclust
(CRV3), and they seem to compute faster than sandwich. I just place the vcov matrix generated by these inside feols as a workaround.Thank you!