py-econometrics / pyfixest

Fast High-Dimensional Fixed Effects Regression in Python following fixest-syntax
https://py-econometrics.github.io/pyfixest/pyfixest.html
MIT License
117 stars 27 forks source link

Allow users to compute the Romano-Wolf Corrected p-values via randomization inference #483

Closed s3alfisc closed 1 week ago

s3alfisc commented 3 weeks ago

Context

The Romano-Wolf correction for multiple testing can compute resampled t-statistics via either the boostrap (in pyfixest, it uses a wild bootstrap) or randomization inference (see the Stata Journal paper by Clarke et al, page 6).

Task

Add support for running the Romano-Wolf correction via randomization inference by adding a function argument sampling_method that defaults to "wild-bootstrap", but that users can choose to also be "ri".

If users choose to run randomization inference, instead of running the wild bootstrap via the wildboottest method, you can simply run ritest via the "randomization-t". https://github.com/py-econometrics/pyfixest/blob/30e3a11bb91ad0985878eaf2c51e509c9d1c7d28/pyfixest/estimation/multcomp.py#L133

Jayhyung commented 1 week ago

I will take this issue. Thanks.

s3alfisc commented 1 week ago

Perfect, thank you! 🎉