-
Notifications
You must be signed in to change notification settings - Fork 48
#890 - Show how to replicate Stata results #897
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
.qmd file showing how to replicate common Stata results in PyFixest. Note: I ran each part in both Stata and PyFixest and got the same results everywhere except for `fit4` where I show how to get HC3 standard errors. For some reason the HC3 errors in PyFixest and Stata do not match. I haven't had a chance to try to figure out why though. If you know why, let me know and I can update the example. If not, I can try to figure it out at a later date. In the meantime we can remove that section or add a note that the HC3 standard errors do not match.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Flags with carried forward coverage won't be shown. Click here to find out more. see 6 files with indirect coverage changes 🚀 New features to boost your workflow:
|
General comment on the PR - looks very good, thanks! Do you think it would be a lot of work to add the Stata output to the code chunk as commented out text? So that readers could directly compare the Stata and R outputs? |
pre-commit.ci autofix |
@all-contributors please add @jestover for docs |
I've put up a pull request to add @jestover! 🎉 |
for more information, see https://pre-commit.ci
You were correct about the HC3 needing ssc(adj = False)! Also, I liked the idea about adding the Stata output, so I have done that as well.
You were correct on HC3 correction, so that is fixed and I have added the Stata output which should make it so people can follow along without having to replicate everything themselves. |
pre-commit.ci autofix |
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect, looks great. Thanks so much @jestover!
which includes a section on | ||
[Coming from Stata](https://aeturrell.github.io/coding-for-economists/coming-from-stata.html), | ||
or [Tidy Finance with Python](https://www.tidy-finance.org/python/) by Christopher | ||
Scheuch, Stefan Voigt, Patrick Weiss, and Christoph Frey. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we could link the stata2r project here as well and note that fixest syntax almost exaclty matches pyfixest?
Looks great, link here: https://py-econometrics.github.io/pyfixest/stata-2-pyfixest.html =) |
.qmd file showing how to replicate common Stata results in PyFixest.
Note: I ran each part in both Stata and PyFixest and got the same results everywhere except for
fit4
where I show how to get HC3 standard errors. For some reason the HC3 errors in PyFixest and Stata do not match. I haven't had a chance to try to figure out why though.If you know why, let me know and I can update the example. If not, I can try to figure it out at a later date. In the meantime we can remove that section or add a note that the HC3 standard errors do not match.