Recent Releases of pyfixest
pyfixest - v0.30.2a Release to re-trigger PyPi upload
Dummy release to trigger PyPi upload.
- Python
Published by s3alfisc 8 months ago
pyfixest - v0.30.2 - Fix Type Error on Windows
Windows user may experience a type error when using the Rust backend with 0.30.1. Here we try to address this error.
- Python
Published by s3alfisc 8 months ago
pyfixest - Hotfix Release for JAX import error
The previous release lead to a JAX import error. This release fixes the error.
- Python
Published by s3alfisc 8 months ago
pyfixest - v0.30.0
What's Changed
New Features
We have created a Rust backend for all performance critical algorithms, with pretty great performance improvements! You can use the Rust backend by setting demeaner_options = "rust".
We find pretty great performance improvements and want to make the Rust backend the default in PyFixest 0.31.0.
We now support quantile regression, including a Frisch-Newton Interior Point Solver with and without preprocessing, iid, heteroskedastic and cluster robust standard errors, fast algorithms for the entire quantile regression process, and some visualisations. In particular the algorithms for the quantile regression process show excellent performance. You can learn more about all features and take a look at more systematic benchmarks in the quantreg vignette.
```python Nqr = 10000 rng = np.random.default_rng(929)
dfqr = pd.DataFrame({ "X1": rng.normal(0, 1, Nqr), "X2": rng.normal(0, 1, Nqr) }) dfqr["Y"] = -0.5 + -2 * dfqr["X1"] + 1.9 * dfqr["X1"] ** 3 + dfqr["X2"] - 0.4 * dfqr["X2"] **4 + rng.normal(0, 1, N_qr)
tic = time.time() fitqr = pf.quantreg( fml = "Y ~ X1 + X2", data = dfqr, quantile = [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9], method = "pfn", multimethod = "cfm2" ) toc = time.time() print(f"Fit the entire quantile regression process with {Nqr} obs and k = 3 in {np.round(toc-tic)} seconds.")
pf.qplot(fit_qr, figsize = [7,3]) ```
We have switched the default solver to
scipy.linalg.solve(): linkYou can now set the maximum number of iterations for the demeaning algo via a
fixef_maxiterargument: link
Bug Fixes
- We fixed a bug in internal renaming of categoricals: link
- We fixed a bug in etable arguments link
- We stopped casting dependent variable to integer to void Information Loss in Poisson Regression: link
Documentation
- We have added a guide on how to replicate Stata results with pyfixest: link
- We improved the documentation on how to relabel variable names in the plotting and etable functions: link
Infrastructure
- We have reorganized our tests and rely more on conda environments for making R package test dependencies available: link
Community
- We have added a Code of Conduct.
- We have opened our discord community. Please join us there to discuss pyfixest and other py-econometrics projects! Link here.
Full Changelog
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in https://github.com/py-econometrics/pyfixest/pull/876
- add gd link to readme by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/881
- Update README.md by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/882
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in https://github.com/py-econometrics/pyfixest/pull/883
- Code of Conduct by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/879
- renaming categories without T. notation by @FuZhiyu in https://github.com/py-econometrics/pyfixest/pull/886
- docs: add FuZhiyu as a contributor for bug, and code by @allcontributors in https://github.com/py-econometrics/pyfixest/pull/888
- Bug fix in etable arguments by @dsliwka in https://github.com/py-econometrics/pyfixest/pull/889
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in https://github.com/py-econometrics/pyfixest/pull/893
- update in labels: adding comment on the role of _coefname by @mortizm1988 in https://github.com/py-econometrics/pyfixest/pull/895
- docs: add mortizm1988 as a contributor for doc by @allcontributors in https://github.com/py-econometrics/pyfixest/pull/896
- #890 - Show how to replicate Stata results by @jestover in https://github.com/py-econometrics/pyfixest/pull/897
- docs: add jestover as a contributor for doc by @allcontributors in https://github.com/py-econometrics/pyfixest/pull/898
- small updates to docs by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/899
- Prevent Casting Dependent Variable to Integer to Avoid Information Loss in Poisson Regression by @JaapCTJ in https://github.com/py-econometrics/pyfixest/pull/900
- docs: add JaapCTJ as a contributor for code by @allcontributors in https://github.com/py-econometrics/pyfixest/pull/903
- Switch default solver to scipy.linalg.solve() [#846 issue] by @AronNemeth in https://github.com/py-econometrics/pyfixest/pull/904
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in https://github.com/py-econometrics/pyfixest/pull/902
- Reorganize Tests against R by @shapiromh in https://github.com/py-econometrics/pyfixest/pull/906
- docs: add shapiromh as a contributor for code by @allcontributors in https://github.com/py-econometrics/pyfixest/pull/907
- add an example for etable by @mortizm1988 in https://github.com/py-econometrics/pyfixest/pull/909
- Rust by @schroedk in https://github.com/py-econometrics/pyfixest/pull/905
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in https://github.com/py-econometrics/pyfixest/pull/918
- Implement Rust Backend by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/878
- docs: add schroedk as a contributor for code by @allcontributors in https://github.com/py-econometrics/pyfixest/pull/926
- discord to readme by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/931
- small update to readme by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/932
- thanks to the aaii team! by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/934
- chore(license): add MIT SPDX headers and permission record for fixest-derived code by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/935
- fix logo by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/936
- Quantile Regression by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/908
- qreg in readme by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/939
- remove i_ref1 by @WiktorTheScriptor in https://github.com/py-econometrics/pyfixest/pull/938
- docs: add WiktorTheScriptor as a contributor for code by @allcontributors in https://github.com/py-econometrics/pyfixest/pull/940
- Issue933 - added the ability to customize the maximum iterations for the demeaning algorithm by @damandhaliwal in https://github.com/py-econometrics/pyfixest/pull/944
- docs: add damandhaliwal as a contributor for code by @allcontributors in https://github.com/py-econometrics/pyfixest/pull/946
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in https://github.com/py-econometrics/pyfixest/pull/925
- add citation to readme by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/947
- Implements "preprocessing frisch newton" algorithm by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/941
- prepare changelog for v0.30 release by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/949
- PyFixest version 0.30.0 by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/950
- Move to pyo3 0.24.1 by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/951
New Contributors
- @FuZhiyu made their first contribution in https://github.com/py-econometrics/pyfixest/pull/886
- @mortizm1988 made their first contribution in https://github.com/py-econometrics/pyfixest/pull/895
- @jestover made their first contribution in https://github.com/py-econometrics/pyfixest/pull/897
- @JaapCTJ made their first contribution in https://github.com/py-econometrics/pyfixest/pull/900
- @shapiromh made their first contribution in https://github.com/py-econometrics/pyfixest/pull/906
- @schroedk made their first contribution in https://github.com/py-econometrics/pyfixest/pull/905
- @WiktorTheScriptor made their first contribution in https://github.com/py-econometrics/pyfixest/pull/938
- @damandhaliwal made their first contribution in https://github.com/py-econometrics/pyfixest/pull/944
Full Changelog: https://github.com/py-econometrics/pyfixest/compare/v0.29.0...v0.30.0
- Python
Published by s3alfisc 8 months ago
pyfixest - v0.29.0
PyFixest 0.29
Highlights
- The most important news is that we have overhauled PyFixest's small sample corrections, which now 100% match r-fixest! By default, r-fixest and py-fixest standard errors should now match all of the time. If they don't, please reach out to us, chances are that you've found a bug =) Because it took me a significant amount of time to figure out how fixest handles small sample corrections, we have added a note in which I summarize my understanding here: link.
- We have added support for fully saturated difference-in-differences modeling (the Sun-Abraham approach to event studies), including functions for aggregating treatment effects to the cohort level. You can find examples in the DiD-vignette: link
- This in turn allows us to support @apoorvalal's event-study specification test, which may help you decide if you can get away with a simple two-way fixed effects specification for your event study. If you haven't yet seen Apoorva's paper, you can find it on arxiv.
- After I've failed to run a Gelbach decomposition for a work problem on industry scale data, we've overhauled its internals - the entire decomposition is now computed on sparse matrices, with drastic performance improvements.
All Changes
- Jax benchmarks by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/784
- Add a jax module by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/792
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in https://github.com/py-econometrics/pyfixest/pull/793
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in https://github.com/py-econometrics/pyfixest/pull/800
- update readme by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/801
- Update feiv_.py by @escherpf in https://github.com/py-econometrics/pyfixest/pull/802
- docs: add escherpf as a contributor for code by @allcontributors in https://github.com/py-econometrics/pyfixest/pull/803
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in https://github.com/py-econometrics/pyfixest/pull/804
- Add feature to automatically rename categorical variables in etable by @dsliwka in https://github.com/py-econometrics/pyfixest/pull/798
- update cat_template docs by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/809
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in https://github.com/py-econometrics/pyfixest/pull/810
- Docstring improvements for etable; improve display of qmd docs & small extension for rename_categoricals by @dsliwka in https://github.com/py-econometrics/pyfixest/pull/811
- Add a
rename_modelsarg to plotting methods by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/813 - [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in https://github.com/py-econometrics/pyfixest/pull/816
- Modified code to make lets-plot an optional dependency. by @elchorro in https://github.com/py-econometrics/pyfixest/pull/818
- docs: add elchorro as a contributor for code by @allcontributors in https://github.com/py-econometrics/pyfixest/pull/819
- Feols: Implement R2 for WLS by @AronNemeth in https://github.com/py-econometrics/pyfixest/pull/815
- docs: add AronNemeth as a contributor for code by @allcontributors in https://github.com/py-econometrics/pyfixest/pull/820
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in https://github.com/py-econometrics/pyfixest/pull/824
- Prediction error for non-fe model by @greenguy33 in https://github.com/py-econometrics/pyfixest/pull/573
- Model summary if intercept-only by @leostimpfle in https://github.com/py-econometrics/pyfixest/pull/707
- disable numba jit for code run on jit for full coverage by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/827
- run extended tests on merge to master by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/831
- Speed up ci by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/832
- Multcomp tests by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/833
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in https://github.com/py-econometrics/pyfixest/pull/834
- Fix decomposition bug by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/836
- Fix formula parsing bug by @DTchebotarev in https://github.com/py-econometrics/pyfixest/pull/839
- docs: add DTchebotarev as a contributor for code by @allcontributors in https://github.com/py-econometrics/pyfixest/pull/841
- Decompose performance by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/837
- Gelbach optimization by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/843
- Add R2 within to etable #821 by @AronNemeth in https://github.com/py-econometrics/pyfixest/pull/842
- Dense mm for wild boottest by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/845
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in https://github.com/py-econometrics/pyfixest/pull/847
- Add context capture to prediction with new data by @adamvig96 in https://github.com/py-econometrics/pyfixest/pull/848
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in https://github.com/py-econometrics/pyfixest/pull/849
- Add options
fixef_k = "full"andfixef_k = "nested"by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/850 - [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in https://github.com/py-econometrics/pyfixest/pull/874
- saturated event study + joint tests for cohort-level heterogeneity by @apoorvalal in https://github.com/py-econometrics/pyfixest/pull/762
- documentation update by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/877
New Contributors
- @escherpf made their first contribution in https://github.com/py-econometrics/pyfixest/pull/802
- @elchorro made their first contribution in https://github.com/py-econometrics/pyfixest/pull/818
- @AronNemeth made their first contribution in https://github.com/py-econometrics/pyfixest/pull/815
- @DTchebotarev made their first contribution in https://github.com/py-econometrics/pyfixest/pull/839
Full Changelog: https://github.com/py-econometrics/pyfixest/compare/v0.27.1...v0.29.0
- Python
Published by s3alfisc 11 months ago
pyfixest - v0.28.0
Changes
New features and bug fixes
- Adds a function argument
context, that allows to pass information / context to theformulaic.Formulaic.get_model_matrix()call that creates the model matrix. - Fix a bug that caused reindexing of
LPDID._coeftablewhen callingLPDID.iplot(). As a result, a second call ofLPDID.iplot()would fail. - Bumps the required
formulaicversion to1.1.0and fixes errors that arose when a) therefargument was used fori()syntax, which led to a silent failure underformulaic >= 1.1.0, andfixef()/predict()with fixed effects, which led to a loud error.
New experimental Features
Note: both features should be fully released in the upcoming pyfixest release.
- Adds a
pf.feglm()function that supports GLMs with normal and binomial families (gaussian, logit, probit) without fixed effects. Fixed effects support is work in progress. - Adds an options to run the demean function via
JAX. This might speed up the model fit if GPU is available.
All Changes
- Release PyFixest
0.28@s3alfisc (#787) - [pre-commit.ci] pre-commit autoupdate @pre-commit-ci (#789)
- Fix errors arising under
formulaic>=1.1.0@s3alfisc (#786) - add jax demeaning integration tests @s3alfisc (#783)
- [pre-commit.ci] pre-commit autoupdate @pre-commit-ci (#781)
- Glm docs @s3alfisc (#779)
- update glm docs @s3alfisc (#778)
- Add GLM Support @s3alfisc (#763)
- docs: add adamvig96 as a contributor for code @allcontributors (#776)
- Add context capture to formula materialisation @adamvig96 (#770)
- Add more tests @juanitorduz (#775)
- Allow JAX demeaning upstream @juanitorduz (#773)
- Add JAX OLS Solver @juanitorduz (#772)
- JAX demean implementation via Claude 3.5 @juanitorduz (#767)
- docs: add ivanhigueram as a contributor for code @allcontributors (#764)
- Add warning when predict has a type mismatch @s3alfisc (#771)
- Fix multiple mypy errors @s3alfisc (#768)
- [pre-commit.ci] pre-commit autoupdate @pre-commit-ci (#760)
- Fix iplot error lpdid @s3alfisc (#754)
- [pre-commit.ci] pre-commit autoupdate @pre-commit-ci (#751)
- docs: add escherpf as a contributor for bug @allcontributors (#749)
- Rename Regression Plot in Case of Duplicate Names @s3alfisc (#748)
- tweak docs @s3alfisc (#747)
- Python
Published by github-actions[bot] about 1 year ago
pyfixest - v0.27.0
PyFixest 0.27.0
Highlights
New Features
- Adds support for Gelbach's (JoLe 2016) Regression Decomposition method by introducing a decompose() method for
Feols. - Adds support for the multiple hypothesis correction by Westfall & Young via the
pf.wyoung()function. - Input data frames to
pf.feols()andpf.fepois()are now converted topandasvia narwhals. As a result, users can now provideduckdboribistables as inputs, as well aspandasandpolarsdata frames.polarsandpyarroware dropped as a dependencies.
Documentation
- Adds a vignette on multiple testing corrections: link
- Adds a vignette on Gelbach's regression decomposition: link
Bug Fixes
- Fixes a bug in the
wildboottestmethod, which incorrectly used to run a regression on the demeaned dependend variable in case it was applied after a fixed effects regression. My apologies for that! - Fixes a bug in the
ritestmethod, which would use randomization inference coefficients instead of t-statistics whenever the "randomization-t" option would be selected, leading to incorrect results. This had consequences for the rwolf() function, which, in case of running ri-inference, would default to run the "randomization-t". My apolgies!
Full Changelog
- Release v0.27.0 @s3alfisc (#743)
- Tweak to decomposition notebook: add aggregation example @s3alfisc (#746)
- Update Decomposition Notebook @s3alfisc (#744)
- Improve Panelview Function @rafimikail (#736)
- Gelbach notebook @s3alfisc (#742)
- Multcomp Notebook @s3alfisc (#740)
- [pre-commit.ci] pre-commit autoupdate @pre-commit-ci (#739)
- Adding westfall-young p-value adjustment for multiple tests @marcandre259 (#725)
- fix bug in ritest with randomization-t @s3alfisc (#730)
- [pre-commit.ci] pre-commit autoupdate @pre-commit-ci (#729)
- Gelbach Decomposition @s3alfisc (#669)
- [pre-commit.ci] pre-commit autoupdate @pre-commit-ci (#727)
- Update Examples in Docs @s3alfisc (#724)
- polars -> narwhals @s3alfisc (#714)
- [pre-commit.ci] pre-commit autoupdate @pre-commit-ci (#722)
- docs: add RoyalTS as a contributor for doc @allcontributors (#723)
- fix docstring typos @RoyalTS (#721)
- Multiple Functions require lists of Feols/Feiv/Fepois object; reject FixestMulti #693 @IshwaraHegde97 (#715)
- docs: add IshwaraHegde97 as a contributor for code @allcontributors (#719)
_narwhals_to_pandas@vincentarelbundock (#700)- docs: add MarcoGorelli as a contributor for review @allcontributors (#712)
- docs: add vincentarelbundock as a contributor for code @allcontributors (#711)
- Adjust CI: do not run extended tests for push to main @s3alfisc (#710)
- [pre-commit.ci] pre-commit autoupdate @pre-commit-ci (#708)
- Drop test runtime dependency on did2s and IVDiag @s3alfisc (#705)
- remove duplicate error classes @leostimpfle (#706)
- Add RUFF rules @juanitorduz (#697)
- Add bugbear to pre-commit and some code improvements @juanitorduz (#694)
- [pre-commit.ci] pre-commit autoupdate @pre-commit-ci (#696)
- Add the option to use analytical weights in 2-step diff-in-diff estimator @marcandre259 (#692)
- Adding literals to feols and fepois api's @marcandre259 (#680)
- Run all ci tests from ci-wfl @s3alfisc (#689)
- Python
Published by github-actions[bot] about 1 year ago
pyfixest - v0.25.4
Highlights
- Bugfix in fixef() method for WLS @s3alfisc (#682) that would lead to incorrect predictions with WLS when the
newdataargument was employed. Thanks to @marcandre259 for the π report! feols()andfepois()obtain "split" and "fsplit" arguments, just as you might know them fromfixest::feols().- @leostimpfle has added the "iterated rectifier" check for detecting separation in Poisson models.
- We have added timing benchmarks against
linearmodels(@marcandre259 ).
Changes
- Release V0254 @s3alfisc (#686)
- More predict tests @s3alfisc (#683)
- Bugfix in fixef() method for WLS @s3alfisc (#682)
- [pre-commit.ci] pre-commit autoupdate @pre-commit-ci (#681)
- docs: add marcandre259 as a contributor for bug @allcontributors (#679)
- Discourse @s3alfisc (#677)
- docs: add kylebutts as a contributor for data @allcontributors (#673)
- Predict @leostimpfle (#670)
- Reopen iterative rectifier PR @leostimpfle (#660)
- Bug fix to display default table note in etable @dsliwka (#665)
- [pre-commit.ci] pre-commit autoupdate @pre-commit-ci (#664)
- docs: add marcandre259 as a contributor for code @allcontributors (#662)
- Add and adjust benchmark notebook with linearmodels (absorbingls) + adding solver argument and integration tests to fepois and feols @marcandre259 (#661)
- Revert "Iterative rectifier" @s3alfisc (#659)
- Iterative rectifier @leostimpfle (#534)
- Fix bug that lead use of the "split" and "fsplit" arguments to not produce FixestMulti objects @s3alfisc (#658)
- Add split and fsplit arguments to feols and fepois @s3alfisc (#656)
- Adjusting Figsize of Outcome Plot @rafimikail (#654)
- [pre-commit.ci] pre-commit autoupdate @pre-commit-ci (#653)
- mypy confit to pyproject @juanitorduz (#652)
- [pre-commit.ci] pre-commit autoupdate @pre-commit-ci (#651)
- 0.25.0 Release @s3alfisc (#649)
- Python
Published by github-actions[bot] over 1 year ago
pyfixest - v0.25.2
Highlights
- Environments are now managed via pixi. This should greatly facilitate new contributions!
- We have added a
pf.dtable()function for producing summary statistics. - We now provide outcome plots via the
panelview()function. - All difference-in-differences estimators can now be loaded via
pf.lpdid(),pf.did2s(), etc - We implement in-memory regression compression a la duckreg, via
polars.
What's Changed
- Solve pre commit hook error by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/600
- add publish to pypi wfl by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/602
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in https://github.com/py-econometrics/pyfixest/pull/604
- Try to split and paralelize tests by @juanitorduz in https://github.com/py-econometrics/pyfixest/pull/607
- Bump cryptography from 43.0.0 to 43.0.1 by @dependabot in https://github.com/py-econometrics/pyfixest/pull/612
- test run example notebooks by @juanitorduz in https://github.com/py-econometrics/pyfixest/pull/613
- Run more tests by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/603
- Skip redundant tests to decrease CI runtime by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/615
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in https://github.com/py-econometrics/pyfixest/pull/617
- Large Refactor to Clean Up
FixestMulticlass by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/601 - only coverage for pyfixest folder by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/620
- delete coverage files by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/622
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in https://github.com/py-econometrics/pyfixest/pull/624
- Improve CI Run-Time: Test Smarter by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/625
- install r and deps in test workflow by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/627
- Add Support for (in-memory) Regression compression a la
duckregby @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/619 - Codecov by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/628
- Update codecov.yml by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/629
- update codecov yaml by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/630
- Set flags for tests in different CI steps by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/632
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in https://github.com/py-econometrics/pyfixest/pull/631
- Add dtables and make_tables functions. Small corrections in etable. Update of ipynb notebooks. by @dsliwka in https://github.com/py-econometrics/pyfixest/pull/614
- Codecov by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/633
- Update Regression Table Notebook by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/634
- run codecov only for regulr wfl by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/636
- Compact tables in dtable & bug fix for FE display in etable by @dsliwka in https://github.com/py-econometrics/pyfixest/pull/637
- Move from
poetryandjusttopixiby @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/595 - update contributing.md by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/638
- Minor docs restructuring by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/639
- Update Documentation by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/640
- update all notebooks by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/641
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in https://github.com/py-econometrics/pyfixest/pull/642
- Implementing outcome plot for panelview function by @rafimikail in https://github.com/py-econometrics/pyfixest/pull/581
- Update docs by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/646
- Adjusting the figsize of panelview by @rafimikail in https://github.com/py-econometrics/pyfixest/pull/650
Full Changelog: https://github.com/py-econometrics/pyfixest/compare/v0.24.2...v0.25.2
- Python
Published by s3alfisc over 1 year ago
pyfixest - v0.24.1
Changes
- fix bug in etable # @s3alfisc (#594)
- Option to use Great Tables package for table output @dsliwka (#591)
- [pre-commit.ci] pre-commit autoupdate @pre-commit-ci (#592)
- overhaul mpl backend; fix coordinate flip argument @apoorvalal (#586)
- overhaul DID doc @apoorvalal (#589)
- Simultaneous CI option for iplot, coefplot @s3alfisc (#587)
- fix link formatting @s3alfisc (#585)
- Python
Published by github-actions[bot] over 1 year ago
pyfixest - v0.24.0
Changes
- Layout improvements and new function arguments for etable, in particular for LaTex output: check out the etable notebook for examples and details @dsliwka (#583)
- Small extension to etable that allows to relabel variables @dsliwka (#577)
- Add
labelsargument tocoefplot()andiplot()@s3alfisc (#580) - jit compile multicollinearity detection #466 @s3alfisc (#579)
- Python
Published by github-actions[bot] over 1 year ago
pyfixest - PyFixest 0.23.0
Hightlights
- PyFixest now includes Wald and F-Tests through the
wald_test()method. - The new Wald Test feature enables us to provide basic IV diagnostics on the first stage, thanks to a significant overhaul of the
Feivclass internals. - The
pf.etable()function for regression output has been significantly enhanced for better aesthetics. - We've greatly improved the speed of the
predict()method. - A new
panelviewfunction has been added to inspect staggered treatment rollouts in Difference-in-Differences studies. - We've introduced new arguments to
feols()andfepois(), including a "lean" argument to clear memory-heavy objects from Feols instances. - RI support has been added for the
rwolffunction, for experimenters who want to control the family-wise error rate of their tests. - An
update()method has been implemented, which allows to update regression coefficients based on incoming data (useful for online learning setups). - Additionally, new vignettes on regression tables and using PyFixest with the marginaleffects package have been added.
Take a look at the quickstart notebook for a brief intro to all new features.
Breaking Changes
- We're adjusting the default small sample corrections to exactly match the
fixestdefaults, and a new vignette demonstrates equivalence between fitting models via R-fixest and py-fixest =) This change will lead to minor differences in computed standard errors and vcov's between versions 0.22.0 and 0.23.0.
New Contributors
- @Jayhyung made their first contribution in https://github.com/py-econometrics/pyfixest/pull/514
- @asteves made their first contribution in https://github.com/py-econometrics/pyfixest/pull/520
- @saidamir made their first contribution in https://github.com/py-econometrics/pyfixest/pull/513
- @rafimikail made their first contribution in https://github.com/py-econometrics/pyfixest/pull/528
- @greenguy33 made their first contribution in https://github.com/py-econometrics/pyfixest/pull/527
- @b-knight made their first contribution in https://github.com/py-econometrics/pyfixest/pull/551
What's Changed
- update readme files by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/511
- type hints for vcov_utils by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/512
- Add "ri" resampling method to Romano-Wolf procedure, by @Jayhyung in https://github.com/py-econometrics/pyfixest/pull/514
- docs: add Jayhyung as a contributor for code by @allcontributors in https://github.com/py-econometrics/pyfixest/pull/516
- Bump urllib3 from 2.2.1 to 2.2.2 by @dependabot in https://github.com/py-econometrics/pyfixest/pull/517
- Fix Contributing document format issue by @asteves in https://github.com/py-econometrics/pyfixest/pull/520
- docs: add asteves as a contributor for doc by @allcontributors in https://github.com/py-econometrics/pyfixest/pull/521
- Add 1st stage regression in Feiv class by @Jayhyung in https://github.com/py-econometrics/pyfixest/pull/525
- Added solver to feols and created new test file for it by @saidamir in https://github.com/py-econometrics/pyfixest/pull/513
- docs: add saidamir as a contributor for code by @allcontributors in https://github.com/py-econometrics/pyfixest/pull/530
- [Issue-400] Implementing dynamic alpha for coefplot and iplot by @rafimikail in https://github.com/py-econometrics/pyfixest/pull/528
- docs: add rafimikail as a contributor for code by @allcontributors in https://github.com/py-econometrics/pyfixest/pull/535
- Mention
self._vcovin docs by @greenguy33 in https://github.com/py-econometrics/pyfixest/pull/527 - docs: add greenguy33 as a contributor for code, and doc by @allcontributors in https://github.com/py-econometrics/pyfixest/pull/532
- Bump certifi from 2024.6.2 to 2024.7.4 by @dependabot in https://github.com/py-econometrics/pyfixest/pull/538
- Add Notebook on
Stargazerandpymarginaleffectssupport to the docs by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/473 - fix typos by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/540
- Add updates to wald_test method and unit testing files by @Jayhyung in https://github.com/py-econometrics/pyfixest/pull/536
- Add
leanfunction argument tofeols(),fepois()by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/548 - Vcov by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/529
- Bknight regex migration by @b-knight in https://github.com/py-econometrics/pyfixest/pull/551
- add pure numpy predict function that speeds up ~40x by @apoorvalal in https://github.com/py-econometrics/pyfixest/pull/553
- more fleshed-out panelview implementation by @apoorvalal in https://github.com/py-econometrics/pyfixest/pull/552
- lsqr() for fixed effects solver by @greenguy33 in https://github.com/py-econometrics/pyfixest/pull/546
- fix another all-contributors bug by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/560
- docs: add b-knight as a contributor for code by @allcontributors in https://github.com/py-econometrics/pyfixest/pull/561
- add statsmodels support for stargazer by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/564
- Add (robust) F statistics of weak iv test and change 1st stage reg code by @Jayhyung in https://github.com/py-econometrics/pyfixest/pull/563
- implement update method for coef vector by @apoorvalal in https://github.com/py-econometrics/pyfixest/pull/567
- Remove Stargazer Dependency by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/568
- update readme by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/570
- Revert "update readme" by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/572
- update quickstart for IV first stage, diagnostics, Wald tests by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/569
- Update wls types tests by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/562
- Rerun vignette by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/575
- Release 0.23 by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/576
Full Changelog: https://github.com/py-econometrics/pyfixest/compare/v0.22.2...v0.23.0
- Python
Published by s3alfisc over 1 year ago
pyfixest - v0.22.0
Bug Fixes π
- Fix bug in wildboottest method @s3alfisc (#506)
Changes
- Docs: Poetry contributing @s3alfisc (#507)
- docs: add sanskriti2005 as a contributor for infra @allcontributors (#503)
- Infra: added the release-drafter for automation of release notes @sanskriti2005 (#502)
- Fix broken link in contributing.md @s3alfisc (#499)
- docs: add leostimpfle as a contributor for bug @allcontributors (#495)
- Update justfile @leostimpfle (#494)
- docs: add baggiponte as a contributor for doc @allcontributors (#490)
- docs: improve installation section @baggiponte (#489)
- Bump tornado from 6.4 to 6.4.1 @dependabot (#487)
- docs: add leostimpfle as a contributor for code @allcontributors (#478)
- Feols: speed up the creation of interacted fixed effects via
fe1^fe2syntax @leostimpfle (#475) - rename resampling iterations to 'reps' in all methods @s3alfisc (#474)
- fix a lot of broken links throught the repo @s3alfisc (#472)
- Multiple readme fixes required after package was moved to py-econometrics project @s3alfisc (#450)
Infrastructure
- infrastructure: fix minor release drafter bugs @s3alfisc (#504)
- Python
Published by github-actions[bot] over 1 year ago
pyfixest - PyFixest 0.21.0
Highlights
- We have a new and improved quickstart section, thanks to work by @juanitorduz π
- We add a
ritestmodule for randomization inference:
```python import numpy as np import pyfixest as pf rng = np.random.default_rng(2332)
data = pf.getdata(N = 100000, seed = 1432) fit = pf.feols("Y ~ f3 + X1 | f1", data=data)
fit.ritest(resampvar = "f3", reps = 1000) ```
Full Changelog
- Fix small bugs with weights by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/437
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in https://github.com/py-econometrics/pyfixest/pull/438
- Fix weights r2 bug by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/439
- Bump requests from 2.31.0 to 2.32.2 by @dependabot in https://github.com/py-econometrics/pyfixest/pull/440
- Add more intro material quick start by @juanitorduz in https://github.com/py-econometrics/pyfixest/pull/436
- Set default fig size per plot backend by @juanitorduz in https://github.com/py-econometrics/pyfixest/pull/442
- Fix typos in quickstart by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/443
- Add support for randomization inference by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/431
- Ritest tweaks & bug fixes by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/445
- bump version to 0.21.0 / release version 0.21.0 by @s3alfisc in https://github.com/py-econometrics/pyfixest/pull/449
Full Changelog: https://github.com/py-econometrics/pyfixest/compare/v0.20.0...v0.21.0
- Python
Published by s3alfisc almost 2 years ago
pyfixest - v0.20.0
Summary
This version introduces MyPy type checks to the entire pyfixest codebase. Thanks to @juanitorduz for nudging me to get started with this =). It also fixes a handful of smaller bugs.
New Contributors
- @juanitorduz made their first contribution in https://github.com/s3alfisc/pyfixest/pull/373
- @allcontributors made their first contribution in https://github.com/s3alfisc/pyfixest/pull/389
- @pre-commit-ci made their first contribution in https://github.com/s3alfisc/pyfixest/pull/417
What's Changed
- update readme by @s3alfisc in https://github.com/s3alfisc/pyfixest/pull/368
- update readme by @s3alfisc in https://github.com/s3alfisc/pyfixest/pull/372
- improve pre-commit by @juanitorduz in https://github.com/s3alfisc/pyfixest/pull/373
- Add ruff checks on notebooks via nbqa by @juanitorduz in https://github.com/s3alfisc/pyfixest/pull/374
- Add colors to tests and cov report by @juanitorduz in https://github.com/s3alfisc/pyfixest/pull/376
- PNG -> SVG Badge by @juanitorduz in https://github.com/s3alfisc/pyfixest/pull/377
- Add pre-commit-ci by @juanitorduz in https://github.com/s3alfisc/pyfixest/pull/375
- Rename readme by @s3alfisc in https://github.com/s3alfisc/pyfixest/pull/385
- Rename readme to README in pyproject.toml by @s3alfisc in https://github.com/s3alfisc/pyfixest/pull/388
- docs: add NKeleher as a contributor for code, and infra by @allcontributors in https://github.com/s3alfisc/pyfixest/pull/389
- docs: add styfenschaer as a contributor for code by @allcontributors in https://github.com/s3alfisc/pyfixest/pull/386
- docs: add Wenzhi-Ding as a contributor for code by @allcontributors in https://github.com/s3alfisc/pyfixest/pull/390
- docs: add apoorvalal as a contributor for code by @allcontributors in https://github.com/s3alfisc/pyfixest/pull/391
- Fix contributors by @s3alfisc in https://github.com/s3alfisc/pyfixest/pull/392
- docs: add juanitorduz as a contributor for infra, and code by @allcontributors in https://github.com/s3alfisc/pyfixest/pull/393
- Fix readme by @s3alfisc in https://github.com/s3alfisc/pyfixest/pull/394
- docs: add s3alfisc as a contributor for code, and infra by @allcontributors in https://github.com/s3alfisc/pyfixest/pull/396
- Remove pre-commit from GitHub action by @juanitorduz in https://github.com/s3alfisc/pyfixest/pull/397
matplotlib(viaseaborn) support forcoefplotandiplotby @juanitorduz in https://github.com/s3alfisc/pyfixest/pull/395- Readme call contributions by @s3alfisc in https://github.com/s3alfisc/pyfixest/pull/399
- Add codecov config yml by @juanitorduz in https://github.com/s3alfisc/pyfixest/pull/401
- docs: add apoorvalal as a contributor for bug by @allcontributors in https://github.com/s3alfisc/pyfixest/pull/406
- Fix iplot bug by @s3alfisc in https://github.com/s3alfisc/pyfixest/pull/405
- docs: add aeturrell as a contributor for tutorial, doc, and promotion by @allcontributors in https://github.com/s3alfisc/pyfixest/pull/408
- Pass
MyPyChecks by @s3alfisc in https://github.com/s3alfisc/pyfixest/pull/402 - Mypy estimation by @s3alfisc in https://github.com/s3alfisc/pyfixest/pull/412
- Mypy ccv by @s3alfisc in https://github.com/s3alfisc/pyfixest/pull/413
- Mypy fepois by @s3alfisc in https://github.com/s3alfisc/pyfixest/pull/414
- Mypy feols by @s3alfisc in https://github.com/s3alfisc/pyfixest/pull/415
- Mypy fixest multi by @s3alfisc in https://github.com/s3alfisc/pyfixest/pull/416
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in https://github.com/s3alfisc/pyfixest/pull/417
- Pass MyPy checks for model_matrix and formula parser by @s3alfisc in https://github.com/s3alfisc/pyfixest/pull/419
- Version info + documentation updates by @s3alfisc in https://github.com/s3alfisc/pyfixest/pull/420
- Update docs by @s3alfisc in https://github.com/s3alfisc/pyfixest/pull/421
- Fix several small issues by @s3alfisc in https://github.com/s3alfisc/pyfixest/pull/423
- Pass MyPy Checks for the DiD module by @s3alfisc in https://github.com/s3alfisc/pyfixest/pull/424
- Fix bug with negative fixef #425 by @s3alfisc in https://github.com/s3alfisc/pyfixest/pull/426
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in https://github.com/s3alfisc/pyfixest/pull/432
- Bump jinja2 from 3.1.3 to 3.1.4 by @dependabot in https://github.com/s3alfisc/pyfixest/pull/433
- PyFixest
0.20.0by @s3alfisc in https://github.com/s3alfisc/pyfixest/pull/434
Full Changelog: https://github.com/s3alfisc/pyfixest/compare/v0.19.0...v0.20.0
- Python
Published by s3alfisc almost 2 years ago
pyfixest - PyFixest 0.19.0
PyFixest 0.19.0
- Fixes multiple smaller and larger performance regressions. The NYC-Taxi example regression now takes approximately 22 seconds to run (... if my laptop is connected to a power charger)!
```python
%load_ext autoreload %autoreload 2
import duckdb import time import numpy as np import pyfixest as pf
%%
nyc = duckdb.sql( ''' FROM 'C:/Users/alexa/Documents/nyc-taxi/*/.parquet' SELECT tipamount, tripdistance, passengercount, vendorid, paymenttype, dropoffat, dayofweek(dropoff_at) AS dofw WHERE year = 2012 AND month <= 3 ''' ).df()
convert dowf, vendorid, paymenttype to categorical
tic = time.time() nyc["dofw"] = nyc["dofw"].astype(int) nyc["vendorid"] = nyc["vendorid"].astype("category") nyc["paymenttype"] = nyc["paymenttype"].astype("category") print(f""" I am convering columns of type 'objects' to 'categories' and 'int'data types outside of the regression, hence I am cheating a bit. This saves {np.round(time.time() - tic)} seconds. """ )
I am convering columns of type 'objects' to 'categories' and 'int'data types outside
of the regression, hence I am cheating a bit. This saves 7.0 seconds.
run = True if run:
# mock regression for JIT compilation
fit = pf.feols(
fml = "tip_amount ~ trip_distance + passenger_count | vendor_id + payment_type + dofw",
data = nyc.iloc[1:10_000],
copy_data = False,
store_data = False
)
import time
tic = time.time()
fit = pf.feols(
fml = "tip_amount ~ trip_distance + passenger_count | vendor_id + payment_type + dofw",
data = nyc,
copy_data = False, # saves a few seconds
store_data = False # saves a few second
)
passed = time.time() - tic
print(f"Passed time is {np.round(passed)}.")
# Passed time is 22.
```
- Three new function arguments for
feols()andfepois():copy_data,store_data, andfixef_tol. - Support for frequency weights via the
weights_typefunction argument. ```{python} import pyfixest as pf
data = pf.getdata(N = 10000, model = "Fepois") dfweighted = data[["Y", "X1", "f1"]].groupby(["Y", "X1", "f1"]).size().resetindex().rename(columns={0: "count"}) dfweighted["id"] = list(range(df_weighted.shape[0]))
print("Dimension of the aggregated df:", dfweighted.shape) print(dfweighted.head())
fit = pf.feols( "Y ~ X1 | f1", data = data ) fitweighted = pf.feols( "Y ~ X1 | f1", data = dfweighted, weights = "count", weightstype = "fweights" ) pf.etable([fit, fitweighted], coef_fmt = "b(se) \n (t) \n (p)") ```
- Bugfix: Wild Cluster Bootstrap Inference with Weights would compute unweighted standard errors. Sorry about that! WLS is not supported for the WCB.
- Adds support for CRV3 inference with weights.
What's Changed
- Performance Improvements by @s3alfisc in https://github.com/s3alfisc/pyfixest/pull/359
- Fweights by @s3alfisc in https://github.com/s3alfisc/pyfixest/pull/365
- release version 0.19.0 by @s3alfisc in https://github.com/s3alfisc/pyfixest/pull/366
Full Changelog: https://github.com/s3alfisc/pyfixest/compare/v0.18.0...v0.19.0
- Python
Published by s3alfisc almost 2 years ago
pyfixest - PyFixest 0.18.0
PyFixest 0.18.0
- Large(ish) Refactoring of Interal Processing of Model Formulas, in particular
FixestFormulaParserandmodel_matrix_fixest. As a results, the code should be cleaner and more robust. - The
fmlargument ofmodel_matrix_fixestis deprecated. Instead,model_matrix_fixestnow asks for aFixestFormula, which is essentially a dictionary with information on model specifications like a first stage formula (if applicable), dependent variables, fixed effects, etc. - Additionally,
model_matrix_fixestnow returns a dictionary instead of a tuple. - Fixed effects reference setting via
i(var1, var2, ref)syntax is back. Thei_ref1,i_ref2function arguments are deprecated. It is again possible to run
```python import pyfixest as pf data = pf.get_data()
fit1 = pf.feols("Y ~ i(f1, X2)", data=data) fit2 = pf.feols("Y ~ i(f1, X2, ref = 1)", data=data)
fit1.coef()
Coefficient
Intercept -0.164200
C(f1)[T.0.0]:X2 -0.254219
C(f1)[T.1.0]:X2 -0.118796
C(f1)[T.2.0]:X2 -0.193556
level '1' set as reference
fit2.coef()
Coefficient
Intercept -0.164029
C(f1, contr.treatment(base=1))[T.0.0]:X2 -0.254219
C(f1, contr.treatment(base=1))[T.2.0]:X2 -0.193556
C(f1, contr.treatment(base=1))[T.3.0]:X2 -0.173535
```
What's Changed
- Delete warning message when loading the did module by @s3alfisc in https://github.com/s3alfisc/pyfixest/pull/340
- Add
keep/droptocoefplotand refactor code to improve maintainability by @Wenzhi-Ding in https://github.com/s3alfisc/pyfixest/pull/341 - Rework
fixest_model_matrixby @s3alfisc in https://github.com/s3alfisc/pyfixest/pull/343 - Fix cluster interaction bug by @s3alfisc in https://github.com/s3alfisc/pyfixest/pull/345
- fix: number of observations format by @Wenzhi-Ding in https://github.com/s3alfisc/pyfixest/pull/347
- Fix summary weights bug by @s3alfisc in https://github.com/s3alfisc/pyfixest/pull/351
FixestFormulaParsercleanup / refactoring by @s3alfisc in https://github.com/s3alfisc/pyfixest/pull/352- Formula parser cleanup2 by @s3alfisc in https://github.com/s3alfisc/pyfixest/pull/354
- Fix bug with
keepanddropforcoefplotby @s3alfisc in https://github.com/s3alfisc/pyfixest/pull/356 - Pyfixest 018 by @s3alfisc in https://github.com/s3alfisc/pyfixest/pull/358
Full Changelog: https://github.com/s3alfisc/pyfixest/compare/v0.17.0...v0.18.0
- Python
Published by s3alfisc almost 2 years ago
pyfixest - PyFixest 0.17.0
Highlights of Version 0.17.0
PyFixest 0.17.0 ...
- ... restructures the codebase and reorganizes how users can interact with the
pyfixestAPI. It is now recommended to usepyfixestin the following way:
```python import pyfixest as pf import numpy as np
data = pf.get_data() data["D"] = data["X1"] > 0 fit = pf.feols("Y ~ D + f1", data = data) fit.tidy() ```
Loading import pyfixest as pf will expose the most common functions: feols, fepois, etable, summary, coefplot, iplot, etc. The update does not introduce any breaking changes. Thanks to @Wenzhi-Ding for the PR!
- ... adds support for simultaneous confidence intervals via a multiplier bootstrap. Thanks to @apoorvalal for the contribution!
python
fit.confint(joint = True)
- ... adds support for the causal cluster variance estimator by Abadie et al. (QJE, 2023)
for OLS via the
.ccv()method.
{python}
fit.ccv(treatment = "D", cluster = "group_id")
Details
- dev: add exactmatch to _selectorder_coefs and etable by @Wenzhi-Ding in https://github.com/s3alfisc/pyfixest/pull/325
- added implementation of simultaneous confidence intervals by @apoorvalal in https://github.com/s3alfisc/pyfixest/pull/286
- Fix
coefplot()bug after deleting whitespace before % for CIs intidy()by @s3alfisc in https://github.com/s3alfisc/pyfixest/pull/327 - Implement the Causal Cluster Variance Estimator following Abadie et al by @s3alfisc in https://github.com/s3alfisc/pyfixest/pull/314
- Restructure API and support backward compatibility by @Wenzhi-Ding in https://github.com/s3alfisc/pyfixest/pull/332
- Fix ci error with Python 3.10 by @s3alfisc in https://github.com/s3alfisc/pyfixest/pull/334
- Pyfixest017 by @s3alfisc in https://github.com/s3alfisc/pyfixest/pull/338
New Contributors
- @apoorvalal made their first contribution in https://github.com/s3alfisc/pyfixest/pull/286 π
Full Changelog: https://github.com/s3alfisc/pyfixest/compare/v0.16.0...v0.17.0
- Python
Published by s3alfisc almost 2 years ago
pyfixest - PyFixest 0.16.0
What's Changed
Version 0.16.0 comes with multiple quality of life improvements for development. All of this is thanks to @NKeleher: for example, he has added contribution guidelines to the docs, updated the github workflows to build the documentation, and undertaken a large code-refactoring to pass linting checks that he implemented as well. @Wenzhi-Ding has implemented multiple new features for the etable() function - for example, it is now possible to pass custom statistics, or to keep and drop variables from the estimation tables. Thanks for all your work! π @s3alfisc has implemented the Romano-Wolf procedure for multiple hypothesis correction via the rwolf() function. Last, the documentation has been ported to quartodoc, which required dropping support for Python 3.8.
Details
- Update docs by @s3alfisc in https://github.com/s3alfisc/pyfixest/pull/275
- add information on contributing by @NKeleher in https://github.com/s3alfisc/pyfixest/pull/289
- Build Documentation locally by @s3alfisc in https://github.com/s3alfisc/pyfixest/pull/290
- move content from _site to docs by @s3alfisc in https://github.com/s3alfisc/pyfixest/pull/292
- Github Action to copy docs from
docs/_sitetodocsby @s3alfisc in https://github.com/s3alfisc/pyfixest/pull/294 - update poetry dependencies by @NKeleher in https://github.com/s3alfisc/pyfixest/pull/288
- dev: Customize significance notation and coefficient reporting format. by @Wenzhi-Ding in https://github.com/s3alfisc/pyfixest/pull/297
- Migrate docs build to github workflow by @NKeleher in https://github.com/s3alfisc/pyfixest/pull/299
- take out etable example that likely causes build error for quartodoc by @s3alfisc in https://github.com/s3alfisc/pyfixest/pull/301
- publish docs on refs/heads/master by @NKeleher in https://github.com/s3alfisc/pyfixest/pull/302
- rename docs/readme.md by @NKeleher in https://github.com/s3alfisc/pyfixest/pull/303
- Implement the Romano Wolf Multiple Testing Correction #277 by @s3alfisc in https://github.com/s3alfisc/pyfixest/pull/278
- Add ruff linting formatting and basic ruff autofixes by @s3alfisc in https://github.com/s3alfisc/pyfixest/pull/305
- update readme by @s3alfisc in https://github.com/s3alfisc/pyfixest/pull/308
- add bonferroni correction #309 by @s3alfisc in https://github.com/s3alfisc/pyfixest/pull/310
- Refactor codebase to apply selected ruff linting and formatting rules⦠by @s3alfisc in https://github.com/s3alfisc/pyfixest/pull/312
- Docstyle formatting by @NKeleher in https://github.com/s3alfisc/pyfixest/pull/315
- delete unused functions by @s3alfisc in https://github.com/s3alfisc/pyfixest/pull/317
- dev: Support custom statistics in
etable()output (#306) by @Wenzhi-Ding in https://github.com/s3alfisc/pyfixest/pull/318 - Bump cryptography from 42.0.2 to 42.0.4 by @dependabot in https://github.com/s3alfisc/pyfixest/pull/319
- dev: Support keep/drop coefs; Improve number formatting. by @Wenzhi-Ding in https://github.com/s3alfisc/pyfixest/pull/320
- release version 0.16.0 by @s3alfisc in https://github.com/s3alfisc/pyfixest/pull/321
New Contributors
- @NKeleher and @Wenzhi-Ding made their first contributions! Thank you so much for all your efforts! π
Full Changelog: https://github.com/s3alfisc/pyfixest/compare/v0.15.0...v0.16.0
- Python
Published by s3alfisc about 2 years ago
pyfixest - PyFixest 0.15.0
What's Changed
- Fix
codecov: generate coverage reports by @s3alfisc in https://github.com/s3alfisc/pyfixest/pull/270 - Add support for
WLSforfeols()by @s3alfisc in https://github.com/s3alfisc/pyfixest/pull/273
Full Changelog: https://github.com/s3alfisc/pyfixest/compare/v0.14.0...v0.15.0
- Python
Published by s3alfisc about 2 years ago
pyfixest - PyFixest 0.14.0
PyFixest 0.14.0
- Moves the documentation to quartodoc.
- Changes all docstrings to
numpyformat. - Difference-in-differences estimation functions now need to be imported via the
pyfixest.did.estimationmodule:
py
from pyfixest.did.estimation import did2s, lpdid, event_study
What's Changed
- PyFixest 0.14.0: Move documentation to
quartodocby @s3alfisc in https://github.com/s3alfisc/pyfixest/pull/264
Full Changelog: https://github.com/s3alfisc/pyfixest/compare/v0.13.5...v0.14.0
- Python
Published by s3alfisc about 2 years ago
pyfixest - PyFixest 0.13.5
PyFixest 0.13.5
- Fixes a bug that lead to incorrect results when the dependent variable and all covariates (excluding the fixed effects) where integers. See #265 for details.
PyFixest 0.13.4
- Fixes a bug in
etable()with IV's that occurred becausefeols()does not report R2 statistics for IVs.
PyFixest 0.13.2
- Fixes a bug in
etable()and a warning infixest_model_matrixthat arose with higherpandasversions. Thanks to @aeturrell for reporting!
- Python
Published by s3alfisc about 2 years ago
pyfixest - PyFixest 0.13.0
New Features
- Introduces a new pyfixest.did module which contains routines for Difference-in-Differences estimation.
- Introduces support for basic versions of the local projections DiD estimator following Dube et al (2023).
- Adds a new vignette for Difference-in-Differences estimation.
- Reports R2 values in
etable().
- Python
Published by s3alfisc about 2 years ago
pyfixest - PyFixest 0.12.0
Enhancements:
- Good performance improvements for singleton fixed effects detection. Thanks to @styfenschaer for the PR! See #229.
- Uses the r2u project for installing R and R packages on github actions, with great performance improvements.
- Allows to pass
polarsdata frames tofeols(),fepois()andpredict(). #232. Thanks to @vincentarelbundock for the suggestion!
Bug Fixes:
- Missing variables in features were not always handled correctly in
predict()withnewdatanotNonein the presence of missing data, which would lead to an error. See #246 for details. - Categorical variables were not always handled correctly in
predict()withnewdatanotNone, because the number of fixed effects levels innewdatamight be smaller than indata. In consequence, some levels were not found, which lead to an error. See #245 for details. Thanks to @jiafengkevinchen for the pointer! - Multicollinearity checks for over-identified IV was not implemented correctly, which lead to a dimension error. See #236 for details. Thanks to @jiafengkevinchen for the pointer!
- The number of degrees of freedom
kwas computed incorrectly if columns were dropped from the design matrixXin the presence of multicollinearity. See #235 for details. Thanks to @jiafengkevinchen for the pointer! - If all variables were dropped due to multicollinearity, an unclear and imprecise error message was produced. See #228 for details. Thanks to @manferdinig for the pointer!
- If selection
fixef_rm = 'singleton',feols()andfepois()would fail, which has been fixed. #192
Dependency Requirements:
- For now, sets
formulaicversions to be0.6.6or lower as version1.0.0seems to have introduced a problem with thei()operator, See #244 for details. - Drops dependency on
pyhdfe.
- Python
Published by s3alfisc about 2 years ago
pyfixest - PyFixest 0.11.0
- Significant speedups for CRV1 inference thanks to help by @styfenschaer.
- Addition of
fixeststyle benchmarks for OLS and Poisson Regression.
- Python
Published by s3alfisc over 2 years ago
pyfixest - PyFixest 0.10.12
Fixes a bug with the separation check for poisson regression #138.
- Python
Published by s3alfisc over 2 years ago
pyfixest - PyFixest 0.10.11
- Fixes bugs with
i(var1, var2)syntax introduced withPyFixest0.10.10.
- Python
Published by s3alfisc over 2 years ago
pyfixest - PyFixest 0.10.10
Fixes a bug with variable interactions via i(var) syntax. See issue #221 for details.
- Python
Published by s3alfisc over 2 years ago
pyfixest - PyFixest 0.10.9
Makesetable() prettier & more informative. See #196 and #210 .
- Python
Published by s3alfisc over 2 years ago
pyfixest - PyFixest 0.10.8.1
PyFixest 0.10.8.1
Breaking changes
Reference levels for the i() formula syntax can no longer be set within the formula, but need to be specified via the i_ref1 function argument to either feols() and fepois().
New feature
A dids2() function is added, which implements the 2-stage difference-in-differences procedure Γ la Gardner and follows the syntax of @kylebutts did2s R package.
```py from pyfixest.experimental.did import did2s from pyfixest.estimation import feols from pyfixest.visualize import iplot import pandas as pd import numpy as np
dfhet = pd.readcsv("https://raw.githubusercontent.com/s3alfisc/pyfixest/master/pyfixest/experimental/data/df_het.csv")
fit = did2s( dfhet, yname = "depvar", firststage = "~ 0 | state + year", secondstage = "~i(relyear)", treatment = "treat", cluster = "state", iref1 = [-1.0, np.inf], )
fittwfe = feols( "depvar ~ i(relyear) | state + year", dfhet, i_ref1 = [-1.0, np.inf] )
iplot([fit, fittwfe], coordflip=False, figsize = (900, 400), title = "TWFE vs DID2S")
```
- Python
Published by s3alfisc over 2 years ago
pyfixest - PyFixest 0.10.7
Adds basic support for event study estimation via two-way fixed effects and Gardner's two-stage "Did2s" approach. This is a beta version and experimental. Further updates (i.e. proper event studies vs "only" ATTs) and a more flexible did2s front end will follow in a release in the near future =)
```py %load_ext autoreload %autoreload 2
from pyfixest.experimental.did import eventstudy from pyfixest.summarize import etable import pandas as pd dfhet = pd.readcsv("pyfixest/experimental/data/dfhet.csv")
fittwfe = eventstudy( data = dfhet, yname = "depvar", idname= "state", tname = "year", gname = "g", estimator = "twfe" )
fitdid2s = eventstudy( data = dfhet, yname = "depvar", idname= "state", tname = "year", gname = "g", estimator = "did2s" )
etable([fittwfe, fitdid2s])
| Coefficient | est1 | est2 |
|:--------------|:-----------------|:-----------------|
| ATT | 2.135*** (0.044) | 2.152*** (0.048) |
Significance levels: * p < 0.05, ** p < 0.01, *** p < 0.001
```
- Python
Published by s3alfisc over 2 years ago
pyfixest - PyFixest 0.10.6
New Feature
Adds etable(), a function to quickly compare different models:
```python %load_ext autoreload %autoreload 2
from pyfixest.estimation import feols from pyfixest.utils import get_data from pyfixest.summarize import etable import pandas as pd
data = get_data() fit1 = feols("Y ~ X1", data = data) fit2 = feols("Y ~ X1 + X2", data = data) fit3 = feols("Y ~ X2", data = data)
etable([fit1, fit2, fit3])
| Coefficient | est1 | est2 | est3 |
|:--------------|:----------------|:-----------------|:-----------------|
| Intercept | 2.349*** (0.09) | 2.35*** (0.09) | 2.587*** (0.056) |
| X1 | 0.221** (0.069) | 0.228** (0.068) | |
| X2 | | 0.071*** (0.018) | 0.069*** (0.018) |
Significance levels: * p < 0.05, ** p < 0.01, *** p < 0.001
```
- Python
Published by s3alfisc over 2 years ago
pyfixest - PyFixest 0.10.5
- Fixes a bug in IV estimation that triggered an error. See #197 for details. Thanks to @aeturrell for reporting!
- Python
Published by s3alfisc over 2 years ago
pyfixest - PyFixest 0.10.4
Updates since version 0.10.0
PyFixest 0.10.1
- Adapts the internal fixed effects demeaning criteron to match
PyHDFE's default. - Adds Styfen as coauthor. @styfenschaer
PyFixest 0.10.2
- Adds support for two-way clustering.
- Adds support for CRV3 inference (the cluster jackknife) for Poisson regression.
PyFixest 0.10.3
- Allows for white space in the multiway clustering formula.
- Adds documentation for multiway clustering.
PyFixest 0.10.4
- Implements a custom function to drop singleton fixed effects.
- Further small performance improvements.
- Python
Published by s3alfisc over 2 years ago
pyfixest - PyFixest 0.10
- Most importantly, implements a custom demeaning algorithm in
numba- thanks to Styfen (@styfenschaer). This leads to performance improvements of 5x or more:
```python %load_ext autoreload %autoreload 2
import numpy as np import time import pyhdfe from pyfixest.demean import demean
np.random.seed(1238) N = 10000000 x = np.random.normal(0, 1, 10*N).reshape((N,10)) f1 = np.random.choice(list(range(1000)), N).reshape((N,1)) f2 = np.random.choice(list(range(1000)), N).reshape((N,1))
flist = np.concatenate((f1, f2), axis = 1) weights = np.ones(N)
algorithm = pyhdfe.create(flist)
starttime = time.time() respyhdfe = algorithm.residualize(x) endtime = time.time() print(endtime - start_time)
26.04527711868286
starttime = time.time() respyfixest, success = demean(x, flist, weights, tol = 1e-10)
Calculate the execution time
endtime = time.time() print(endtime - start_time)
4.334428071975708
np.allclose(respyhdfe , respyfixest)
True
```
- Python
Published by s3alfisc over 2 years ago
pyfixest - PyFixest 0.9.12
PyFixestfinally supports poisson regression with iid errors! π- Additionally, some bug fixes.
- Python
Published by s3alfisc over 2 years ago
pyfixest - PyFixest 0.9.9
Updates since the last github release (PyFixest 0.9.6):
PyFixest 0.9.9
- Adds support for
wildboottestfor Python3.11.
PyFixest 0.9.8
- Fixes a couple more bugs in the
predict()andfixef()methods. - The
predict()argumentdatais renamed tonewdata.
PyFixest 0.9.7
Fixes a bug in predict() that occurred when multicollinear variables are dropped in the estimation step.
- Python
Published by s3alfisc over 2 years ago
pyfixest - PyFixest 0.9.7
Fixes bug in in fixef(). #147
- Python
Published by s3alfisc over 2 years ago
pyfixest - PyFixest 0.9.6
Improved Collinearity handling. See #145
- Python
Published by s3alfisc over 2 years ago
pyfixest - PyFixest 0.9.5
- Moves plotting from matplotlib to lets-plot.
- Fixes a few minor bugs in plotting and the
fixef()method.
- Python
Published by s3alfisc over 2 years ago
pyfixest - PyFixest 0.9.1
Breaking API changes
It is no longer required to initiate an object of type Fixest prior to running feols or fepois. Instead,
you can now simply use feols() and fepois() as functions, just as in fixest. Both function can be found in an
estimation module and need to obtain a pd.DataFrame as a function argument:
```py from pyfixest.estimation import fixest, fepois from pyfixest.utils import get_data
data = get_data() fit = feols("Y ~ X1 | f1", data = data, vcov = "iid") ```
Calling feols() will return an instance of class Feols, while calling fepois() will return an instance of class Fepois.
Multiple estimation syntax will return an instance of class FixestMulti.
Post processing works as before via .summary(), .tidy() and other methods.
New Features
A summary function allows to compare multiple models:
py
from pyfixest.summarize import summary
fit2 = feols("Y ~ X1 + X2| f1", data = data, vcov = "iid")
summary([fit, fit2])
Visualization is possible via custom methods (.iplot() & .coefplot()), but a new module allows to visualize
a list of Feols and/or Fepois instances:
py
from pyfixest.visualize import coefplot, iplot
coefplot([fit, fit2])
The documentation has been improved (though there is still room for progress), and the code has been cleaned up a bit (also lots of room for improvements).
- Python
Published by s3alfisc over 2 years ago
pyfixest - PyFixest 0.8.9
This release ...
- provides more stringent unit testing
- fixes a few bugs (most importantly, for separation tests with multiple fixed effects)
- reimplements the IWLS Poisson algorithm (it now more closely follows naming conventions from the
pplmhdfepaper) - drops
Fepoisspecialget_vcovmethods, it is now integrated intoFeols.get_vcov - installs
PyHDFEdirectly from PyPi (asPyHDFE0.2 now supports weights) - bases the convergence criterion of the Poisson on it's absolute deviance. The implementation now matches
fixestandglm
- Python
Published by s3alfisc over 2 years ago
pyfixest - PyFixest 0.8.0
New Features
This release adds ...
- support for Poisson regression (via the algorithm suggested by Correia et al and implemented in their
pplmhdfepackage) - a
predict()method - a
fixef()method to retrieve fixed effects of estimated models (only for OLS) - some goodness-of-fit measures (only for OLS)
For example, you can now run a Poisson Regression as
```python import pyfixest as pf from pyfixest.utils import getpoissondata
pdata = getpoissondata() fixest = pf.Fixest(data = pdata) fixest.fepois("Y~X1", vcov = "hetero")
fixest.summary()
Model: Poisson
Dep. var.: Y
Inference: hetero
Observations: 1000
# Estimate Std. Error t value Pr(>|t|) cil ciu # 6.035479 0.080534 74.942848 0.0 5.877635 6.193324 # 0.771267 0.071402 10.801754 0.0 0.631322 0.911213
---
```
- Python
Published by s3alfisc over 2 years ago
pyfixest - PyFixest 0.7.3
- Fixes a bug in the computation of confidence intervals that lead to wildly incorrect CIs.
- Introduces a
confint()method forFixestobjects.
- Python
Published by s3alfisc over 2 years ago
pyfixest - PyFixest 0.7.0
Potentially Breaking Changes
- for
Fixestobjects, the returned dict containing all estimated models is now calledall_fitted_modelsinstead ofres_model.
Internal Refactoring
- This release provides quite a bit of internal refactoring - overall, the code should now be much easier to read & hopefully be more maintainable.
- Additionally, it cleans up the
FixestFormulaParserclass.
New Post-Processing Features
v 0.7.0
- adds a Fixest.fetch_model() method to retrieve individual models out of Fixest
- adds post estimation routines for objects of type Feols: coef(), se(), confint,tidy(), etc
After estimating multiple models, it is now possible to fetch individual models (objects of type Feols) from an object of type Fixest via the fetch_model() method:
```py from pyfixest import Fixest from pyfixest.utils import getdata import pandas as pd data = getdata()
fixest = Fixest(data) fixest.feols('Y ~ X1 | csw(X2,X3)', vcov = 'iid')
mod = fixest.fetch_model(1)
Model: Y~X1|X2+X3
mod
mod.tidy()
Estimate Std. Error t value Pr(>|t|) confintlower confintupper
coefnames
X1 0.03975 0.120714 0.329288 0.741973 -0.03218 0.047319
```
- Python
Published by s3alfisc over 2 years ago
pyfixest - v0.6: IV Support
Version 0.6 introduces support for IV estimation via 2SLS.
- Syntax for IV estimation unambiguously follows fixest' syntax: you can specify IV estimation via a formula with
depvar ~ exog.vars | fixed effect vars | endog.var ~ instruments. If no fixed effects is specified, just drop the second part of the formula. - It is possible to estimate over-identified models, but not possible to estimate models with more than one endogenous variable.
- It is also not (yet) possible to combine IV estimation with multiple estimation syntax.
```py from pyfixest import Fixest from pyfixest.utils import get_data
data = get_data() data.head()
fixest = Fixest(data = data) fixest.feols("Y ~ 1 | X2 | X1 ~ Z1 + Z2") ```
- Python
Published by s3alfisc almost 3 years ago
pyfixest - v0.5
IV Support
- Includes very basic support for IV estimation with one endogenous variable and one instrument.
- Inference: iid, HC1-3, CRV1.
Syntax for IV:
```python import pyfixest as pf import numpy as np from pyfixest.utils import get_data
data = get_data()
fixest = pf.Fixest(data = data) fixest.feols("Y~X1 | csw0(X2, X3) | X1 ~ Z1", vcov = {'CRV1':'group_id'}) fixest.summary()
Model: IV
Dep. var.: Y
Inference: {'CRV1': 'group_id'}
Observations: 1998
Estimate Std. Error t value Pr(>|t|)
Intercept -3.941293 0.221354 -17.805377 2.442491e-15
X1 -0.265817 0.261940 -1.014803 3.203217e-01
---
...
```
What's Changed
- add codecov support by @s3alfisc in https://github.com/s3alfisc/pyfixest/pull/69
- update docs + explicitly drop Intercept based on column name by @s3alfisc in https://github.com/s3alfisc/pyfixest/pull/71
- update inference log in vcov method closing #61 by @s3alfisc in https://github.com/s3alfisc/pyfixest/pull/73
- IV Functionality by @s3alfisc in https://github.com/s3alfisc/pyfixest/pull/74
Full Changelog: https://github.com/s3alfisc/pyfixest/compare/v0.4.0...v0.5
- Python
Published by s3alfisc almost 3 years ago
pyfixest - v0.4.0
- introduces a
ssc()function to control small sample corrections - by default, the small sample correction defaults for iid, HC1 and CRV1 inference now match
fixestdefaults - defaults for inference when the
vcovargument is not specified now matchesfixestas well. Prior, thevcovargument was required - multiple smaller bug fixes
- implements CRV3 inference with and without fixed effects
- implements wild (cluster) bootstrap inference via
wildboottest
- Python
Published by s3alfisc almost 3 years ago
pyfixest - version 0.3.0
Supported Features:
- Basic support for OLS.
- HC and CRV inference
- Multiple estimations via
swandcswsyntax. - Regression interaction via
i(). - on-the-fly SEs
- tidy, summary, iplot methods
Overview of Features: link
- Python
Published by s3alfisc almost 3 years ago