Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds support for inference via a wild (cluster) bootstrap by adding a
bootstrap
argument toetwfe
(only for OLS). Ifbootstrap = TRUE
, etwfe will compute marginal effects by callingfwildclusterboot::boot_aggregate()
, which is a copy offixest::aggregate()
.It currently depends on a fork of
fwildclusterboot
, which in itself depends on a fork offixest
by @kylebutts, which introduces support or sparse model matrices. In other words, merging this PR will require another PR to be merged into fixest.At the moment, this PR simply
bootstrap
argument toemfx
. Ifbootstrap = TRUE
, it will run a wild cluster bootstrap via thefwildclusterboot
packagefwildclusterboot
is added as a (soft) dependency inSuggests
type = "simple"
and the "clustered" bootstrap are supportedThe PR still
fixest
fwildclusterboot
being updated afterwardsetwfe
(it's only white space changes, sorry about that).It is also worth discussing how to unify the output, i.e. running
marginaleffects
will return amarginaleffects
object, while running the bootstrap will simply return adata.frame
.Here is some example code:
@jtorcasso fyi