Skip to content

Feature Request: Option to return bootstrapped coefficient estimates #158

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

Open
amarbler opened this issue Mar 25, 2025 · 4 comments
Open

Comments

@amarbler
Copy link

Hi,

Thanks for setting up and maintaining this package!

I recently read Roodman et al. (2019) and noticed that the Stata version of boottest() includes an option to return the numerators of the bootstrapped test statistics using svmat(numer). These numerators represent the coefficient estimates from all bootstrap replications under the null hypothesis β = 0.

It appears that currently this isn't available in fwildclusterboot::boottest(), but would be a useful option. Would it be possible to consider including this or a similar feature in a future update?

Thanks again for your great work on this package!

@s3alfisc
Copy link
Owner

Hi, this is already possible - the bootstrapped t stats are stored in the model$t_boot =)

@amarbler
Copy link
Author

Hi,

Sorry for the confusion. I'm referring to the numerator of the bootstrapped t-statistics—not the final t_boot values. Under the null hypothesis that the coefficient is 0, the numerator corresponds to the bootstrapped coefficient estimates, which is exactly what I'm looking to retrieve.

Thanks for your help! :)

@s3alfisc
Copy link
Owner

I see!

These are computed in this function as "numer". This function is then called via fast_n_reliable implementation, which itself is called by run_bootstrap. And last, run_bootstrap is the function called by the estimation APIs boottest.lm, boottest.fixest etc.

So should be doable!

Btw, in the "fast and reliable" algo from the newer MacKinnon, Nielsen, Webb paper, the numerator is computed here: link

@amarbler
Copy link
Author

I forked your repository and implemented the changes for fast and wild and fast and reliable. Let me know if you want me to open a pull request.

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

No branches or pull requests

2 participants