Skip to content

Ritest: Implement class agnostic function with numpy API #493

Open
@s3alfisc

Description

@s3alfisc

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions