py-econometrics / pyfixest

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

supporting offset in poisson #695

Open apoorvalal opened 2 weeks ago

apoorvalal commented 2 weeks ago

this gives the gist; having an offset argument would involve constraining the coefficient to 1 and being able to model rates (in contrast to the regular use to model counts). Statsmodels supports it under an exposure arg.

more bg

s3alfisc commented 2 weeks ago

Yes, nice one. Have never used an offset before in my life, so hadn't bothered with this yet 😀 looks like it might not be too hard to add! fixest::feglm() has an "offset" argument, so we should maybe stick with that instead of statsmodels kwarg solution?