Skip to content

Move to PyFixest#117

Draft
s3alfisc wants to merge 5 commits into
gabors-data-analysis:masterfrom
s3alfisc:master
Draft

Move to PyFixest#117
s3alfisc wants to merge 5 commits into
gabors-data-analysis:masterfrom
s3alfisc:master

Conversation

@s3alfisc

@s3alfisc s3alfisc commented Sep 14, 2024

Copy link
Copy Markdown

Hi @gbekes ,

Here is a very preliminary draft PR to move the regression / fixed effects notebooks from chapters 10 and 23 to pyfixest. You should really think about this as a rough draft, with the only purpose for you to be able to take a look at pyfixest syntax / how output looks. For this purpose, I have deleted multiple notebook chunks, which I will bring back going forward.

Generally, coefficients are matching LinearModels / StatsModels. SEs are slightly different - I don't know how small sample corrections are implemented in these packages. PyFixest generally mimics fixest behavior and should match exactly (I am testing this quite thoroughly ).

While updating the notebooks, I have encountered a few issues:

  • The case studies currently require Python 3.8, which pyfixest does not support. To support pyfixest, we'd have to move to a higher version of Python, which might have impacts on all other package dependencies.
  • The automatic path finder did not work for me on windows, so I hardcoded the paths to data sets. I will have to revert this later.
  • PyFixest does not yet support:
  1. Prediction Intervals. Here we have an ongoing PR: Prediction error for non-fe model py-econometrics/pyfixest#573
  2. R2 values for WLS. This is not a big feature and can be easily added. Currently on my backlog, but I can pull it further up the prio list.
  3. No functionality for lags and leads. But it might also not be possible as formulaic accepts pandas functions as arguments.

Other potential issues:

  • For chapter 10, I needed to rename a variable (from hourse to hours, hourse was not available in the data set).
  • Chapter 23 seems to refer to chapter 16 in all notebook intros?

@review-notebook-app

Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@s3alfisc s3alfisc marked this pull request as draft September 14, 2024 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant