py-econometrics / pyfixest

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

numpy-api: Set flag in `feols` and `fepois` to pass information if the numpy API is called directly #465

Open s3alfisc opened 1 month ago

s3alfisc commented 1 month ago

Context

To refactor multiple methods for Feols to work for both a direct numpy API and the feols and fepois interfaces, the model needs to know if it can assume information stored when calling feols / fepois - as e.g. model formulas - or not. See #464 for more context.

To do

Therefore, create a model attribute _fml_api_call and set it to True if feols / fepois are called, False otherwise.

Pass this flag to Feols() so that it is available in all methods for Feols.