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

Ritest: Implement class agnostic function with numpy API #493

Open
s3alfisc opened this issue Jun 8, 2024 · 0 comments
Open

Ritest: Implement class agnostic function with numpy API #493

s3alfisc opened this issue Jun 8, 2024 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@s3alfisc
Copy link
Member

s3alfisc commented Jun 8, 2024

Context

Currently, all code for randomization inference lives in pyfixest/estimation/ritest.py. There is no user facing ritest function - instead, users have to call the .ritest() method to run randomization inference.

It would be cool to design a user facing API to run randomization inference that does not depend on information encoded in PyFixest objects, i.e. that works without passing a Feols or Fepois object to it.

Down the road, this will allow for a ritest method for a numpy API to Feols, see #464 for details.

Additionally, this will potentially allow to "outsource" the ritest functionality to a standalone package for randomization inference not only for objects from PyFixest, but potentially also from statsmodels or other packages. wildboottest is an example for such a package.

To do

Define and implement a user facing function ritest() with a numpy API

def ritest(X: np.ndarray, Y:np.ndarray, D:np.ndarray, rng: np.random.Generator, reps: int, choose_algorithm: str, ...):
      ...

that does not depend on information encoded in a Feols object. Refactor the ritest methods of Feols and associated functions in ritest.py to be compatible & to call the newly implemented ritest function.

@s3alfisc s3alfisc added enhancement New feature or request good first issue Good for newcomers labels Jun 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
Development

No branches or pull requests

1 participant