py-econometrics / pyfixest

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

feols.vcov() returns covariance matrix #527

Open greenguy33 opened 2 days ago

greenguy33 commented 2 days ago

@s3alfisc I made the small change we discussed. I'm also interested in continuing to contribute to this project if I can be helpful in any way!

s3alfisc commented 1 day ago

Another simple option to make the vcov matrix accessible would be to simply make it a "public" attribute, in which case we'd have to rename all references to _vcov to vcov. Maybe that is even the best solution @greenguy33?

s3alfisc commented 1 day ago

I'm also interested in continuing to contribute to this project if I can be helpful in any way!

Super cool, there's plenty of things to do! I'll reach out about this later today =)

greenguy33 commented 1 day ago

@s3alfisc This makes sense and I feel like either of the solutions that you proposed would be fine. Maybe just exposing the .vcov attribute of feols is the most intuitive option for now.

Either way, is there a way that a user can find out about how this works, other than looking at this issue or reviewing source code? I feel like documentatupn would be helpful here - unless it already exists and I've missed it, that's something I'd be happy to help work on.

s3alfisc commented 1 day ago

Maybe just exposing the .vcov attribute of feols is the most intuitive option for now.

Then let's go with that solution! The only thing you would have to do is to go to your text editor and replace all of the references to _vcov with vcov 😄

Either way, is there a way that a user can find out about how this works, other than looking at this issue or reviewing source code? I feel like documentatupn would be helpful here - unless it already exists and I've missed it, that's something I'd be happy to help work on.

Maybe we could add this to the inference section of the quickstart notebook?

greenguy33 commented 1 day ago

Yes sure! I can get to this soon and make another PR. Sorry for so many questions - but should I be running the tests before sending in new code?

s3alfisc commented 1 day ago

You mean the ci/unit tests? You don't have to run them locally, I can run them via GitHub actions. Just haven't yet done so for the current PR as I think they would fail. Btw, you can also simply update this PR, no need to open a new one =)