Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support fixest::feglm and fixest::fepois? #46

Open
etiennebacher opened this issue Jun 20, 2022 · 2 comments
Open

Support fixest::feglm and fixest::fepois? #46

etiennebacher opened this issue Jun 20, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@etiennebacher
Copy link

Hello, thanks for this package! I never used it so far but I found it while searching for ways to use cluster bootstrapping with a control function approach. Basically, in case you're not familiar with it, a control function is a two-step IV method:

  • step 1: estimate the endogenous variable with the instrument(s) and the other controls. Extract the first stage residuals
  • step 2: estimate the dependent variable with the controls, the endogenous variable and the first step residuals. Ideally, the first step residuals should control for the endogeneity, which leaves only the "true" effect of the endogenous variable.

This method is particularly useful for non-linear models, where 2SLS can't be applied. Also, the standard errors need to be bootstrapped, which is why I was looking for a package like yours. It turns out that fwildclusterboot doesn't support yet fixest::feglm and I was wondering if it was something you are planning to cover.

@s3alfisc
Copy link
Owner

Hi @etiennebacher ,

I think you raise two distinct points (at least from my perspective):

  1. So far, I have no immediate plans to implement score-bootstrap methods in R to support the wild bootstrap for GLM's, though these are provided by WildBootTests.jl, which is callable through fwildclusterboot. I have admittedly never run a score bootstrap via WildBootTests.jl, but I could / should provide the option for calling a score bootstrap via WildBootTests.jl for objects produced by fixest::feglm . Note that Roodman, MacKinnon, Nielsen and Webb (at the very end of section 6) suggest to be very cautious when using the score (wild) bootstrap.

  2. I am far from an expert on using the wild bootstrap with 2-Step estimators, but wanted to mention that it is less trivial than one would at first expect. For example, for 2SLS, should only the first stage error terms be multiplied with the bootstrap weights? Or should both first stage and second stage error terms be multiplied with bootstrap error weights? And if yes, should the same draw of weights be used? The "fast and wild" paper discusses this a bit, and the paper on the WRE by Davidsion and MacKinnon is probably the main reference on this topic (the answer is that both residuals need to be multiplied with the same weights v_b^*). Also, note that Stata's boottest supports GMM estimation, so if you can formulate your 2-step estimator in a GMM framework, you might be able to use boottest off the shelf. I am not sure if WildBootTests.jl supports GMM's - maybe @droodman can help us here? :)

@s3alfisc s3alfisc added the enhancement New feature or request label Jun 25, 2022
@droodman
Copy link
Collaborator

I think for non-linear models the wild bootstrap is mostly not helpful. The "score bootstrap" of Kline & Santos is the closest attempt and as @s3alfisc says, Roodman et al. is cautious about it actually helping, precisely because it may not fully capture the range of a nonlinear estimator's behavior the way a traditional nonparametric/"pairs" bootstrap can. WildBootTests.jl does support the score bootstrap, but it requires that the caller do a lot of the work, mainly rerunning the estimate with the null hypothesis imposed. The boottest program in Stata does this work, and so supports the score bootstrap, but I understand why @s3alfisc has not made it a priority for fwildclusterboot..

For reasons given in Roodman et al. 2019 discussion of the score bootstrap, I'd recommend a more traditional bootstrap for nonlinear estimators. That's how I found bimodality in an estimator of the impacts of microcredit in Bangladesh.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants