I am running a linear model with multiple fixed effects. I suspect that there is spatial correlation in my data so I cluster the SEs (46 clusters). But I am worried that the standard errors generated by
reghdfe in Stata) might be too large. So I want to alternatively also compute wild cluster bootstrap (WCB) based confidence intervals for the main parameters.
This does not seem to be an easy thing to do for panel models with multiple fixed effects. Here's a summary of what I found:
- Stata: Current procedures to do WCB on stata (
cgmwildboot) do not work with procedures that implement multiple fixed effects (
reghdfeitself does not currently support WCB.
- R: The
felmpackage that seems to be the best option for linear panel models with multiple FE and clustered SE does not support WCB. In fact, it does not even support
predictafter the regression.
So, there seem to be two possible solutions:
- Workaround: WCB procedures on stata work with one level of FE (for example,
boottest). So, converting the
reghdferegression to include dummies and absorbing the one FE with largest set would probably work with
boottest. But this is likely to be crazily expensive on memory and processing capacity. If I have access to high-performance servers I could run this code on those servers.
- Code own WCB function in R: The second option is to get predictions from
felmregression (using this process from a previous answer on Stack Overflow). Then one could write a function to do the wild cluster bootstrap and get the confidence interval for estimated coefficients.
There are probably better solutions out there. What would the community suggest as best practice to get wild cluster bootstrap based CI after a panel regression with multiple fixed effects?