py-econometrics / pyfixest

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

The .get_ functions do not appear to return anything #616

Closed rlustermans closed 2 weeks ago

rlustermans commented 1 month ago

While working with the model object, I noticed that none of the get_ functions are returning any values. For example, model.get_nobs() and model.get_fit(). Is anyone else experiencing this issue, or is it just me?

s3alfisc commented 1 month ago

Hi @rlustermans, I admit that the .get_ methods are poorly named - they are only meant for internal use and in consequence, all of them only assign attributes but don't return anything. I should rename them at some point. See here for the get_nobs() method. You can obtain the number of observations by calling fit.nobs(), coefficients by calling fit.coef(), a tidy data frame by calling fit.tidy() etc.