Releases: py-econometrics/pyfixest
v0.30.2a Release to re-trigger PyPi upload
Dummy release to trigger PyPi upload.
v0.30.2 - Fix Type Error on Windows
Hotfix Release for JAX import error
The previous release lead to a JAX import error. This release fixes the error.
v0.30.1
Release v0.30.1
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.
N_qr = 10_000
rng = np.random.default_rng(929)
df_qr = pd.DataFrame({
"X1": rng.normal(0, 1, N_qr),
"X2": rng.normal(0, 1, N_qr)
})
df_qr["Y"] = -0.5 + -2 * df_qr["X1"] + 1.9 * df_qr["X1"] ** 3 + df_qr["X2"] - 0.4 * df_qr["X2"] **4 + rng.normal(0, 1, N_qr)
tic = time.time()
fit_qr = pf.quantreg(
fml = "Y ~ X1 + X2",
data = df_qr,
quantile = [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9],
method = "pfn",
multi_method = "cfm2"
)
toc = time.time()
print(f"Fit the entire quantile regression process with {N_qr} 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()
: link -
You can now set the maximum number of iterations for the demeaning algo via a
fixef_maxiter
argument: 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 #876
- add gd link to readme by @s3alfisc in #881
- Update README.md by @s3alfisc in #882
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in #883
- Code of Conduct by @s3alfisc in #879
- renaming categories without T. notation by @FuZhiyu in #886
- docs: add FuZhiyu as a contributor for bug, and code by @allcontributors in #888
- Bug fix in etable arguments by @dsliwka in #889
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in #893
- update in labels: adding comment on the role of _coefname by @mortizm1988 in #895
- docs: add mortizm1988 as a contributor for doc by @allcontributors in #896
- #890 - Show how to replicate Stata results by @jestover in #897
- docs: add jestover as a contributor for doc by @allcontributors in #898
- small updates to docs by @s3alfisc in #899
- Prevent Casting Dependent Variable to Integer to Avoid Information Loss in Poisson Regression by @JaapCTJ in #900
- docs: add JaapCTJ as a contributor for code by @allcontributors in #903
- Switch default solver to scipy.linalg.solve() [#846 issue] by @AronNemeth in #904
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in #902
- Reorganize Tests against R by @shapiromh in #906
- docs: add shapiromh as a contributor for code by @allcontributors in #907
- add an example for etable by @mortizm1988 in #909
- Rust by @schroedk in #905
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in #918
- Implement Rust Backend by @s3alfisc in #878
- docs: add schroedk as a contributor for code by @allcontributors in #926
- discord to readme by @s3alfisc in #931
- small update to readme by @s3alfisc in #932
- thanks to the aaii team! by @s3alfisc in #934
- chore(license): add MIT SPDX headers and permission record for fixest-derived code by @s3alfisc in #935
- fix logo by @s3alfisc in #936
- Quantile Regression by @s3alfisc in #908
- qreg in readme by @s3alfisc in #939
- remove i_ref1 by @WiktorTheScriptor in #938
- docs: add WiktorTheScriptor as a contributor for code by @allcontributors in #940
- Issue933 - added the ability to customize the maximum iterations for the demeaning algorithm by @damandhaliwal in #944
- docs: add damandhaliwal as a contributor for code by @allcontributors in #946
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in #925
- add citation to readme by @s3alfisc in #947
- Implements "preprocessing frisch newton" algorithm by @s3alfisc in #941
- prepare changelog for v0.30 release by @s3alfisc in #949
- PyFixest version 0.30.0 by @s3alfisc in #950
- Move to pyo3 0.24.1 by @s3alfisc in #951
New Contributors
- @FuZhiyu made their first contribution in #886
- @mortizm1988 made their first contribution in #895
- @jestover made their first contribution in #897
- @JaapCTJ made their first contribution in #900
- @shapiromh made their first contribution in #906
- @schroedk made their first contribution in #905
- @WiktorTheScriptor made their first contribution in #938
- @damandhaliwal made their first contribution in #944
Full Changelog: v0.29.0...v0.30.0
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 #784
- Add a jax module by @s3alfisc in #792
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in #793
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in #800
- update readme by @s3alfisc in #801
- Update feiv_.py by @escherpf in #802
- docs: add escherpf as a contributor for code by @allcontributors in #803
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in #804
- Add feature to automatically rename categorical variables in etable by @dsliwka in #798
- update cat_template docs by @s3alfisc in #809
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in #810
- Docstring improvements for etable; improve display of qmd docs & small extension for rename_categoricals by @dsliwka in #811
- Add a
rename_models
arg to plotting methods by @s3alfisc in #813 - [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in #816
- Modified code to make lets-plot an optional dependency. by @elchorro in #818
- docs: add elchorro as a contributor for code by @allcontributors in #819
- Feols: Implement R2 for WLS by @AronNemeth in #815
- docs: add AronNemeth as a contributor for code by @allcontributors in #820
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in #824
- Prediction error for non-fe model by @greenguy33 in #573
- Model summary if intercept-only by @leostimpfle in #707
- disable numba jit for code run on jit for full coverage by @s3alfisc in #827
- run extended tests on merge to master by @s3alfisc in #831
- Speed up ci by @s3alfisc in #832
- Multcomp tests by @s3alfisc in #833
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in #834
- Fix decomposition bug by @s3alfisc in #836
- Fix formula parsing bug by @DTchebotarev in #839
- docs: add DTchebotarev as a contributor for code by @allcontributors in #841
- Decompose performance by @s3alfisc in #837
- Gelbach optimization by @s3alfisc in #843
- Add R2 within to etable #821 by @AronNemeth in #842
- Dense mm for wild boottest by @s3alfisc in #845
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in #847
- Add context capture to prediction with new data by @adamvig96 in #848
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in #849
- Add options
fixef_k = "full"
andfixef_k = "nested"
by @s3alfisc in #850 - [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in #874
- saturated event study + joint tests for cohort-level heterogeneity by @apoorvalal in #762
- documentation update by @s3alfisc in #877
New Contributors
- @escherpf made their first contribution in #802
- @elchorro made their first contribution in #818
- @AronNemeth made their first contribution in #815
- @DTchebotarev made their first contribution in #839
Full Changelog: v0.27.1...v0.29.0
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._coeftable
when callingLPDID.iplot()
. As a result, a second call ofLPDID.iplot()
would fail. - Bumps the required
formulaic
version to1.1.0
and fixes errors that arose when a) theref
argument 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)
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 topandas
via narwhals.
As a result, users can now provideduckdb
oribis
tables as inputs, as well aspandas
andpolars
data frames.polars
andpyarrow
are 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
wildboottest
method, 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
ritest
method, 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)
v0.26.2
v0.25.4
Highlights
- Bugfix in fixef() method for WLS @s3alfisc (#682) that would lead to incorrect predictions with WLS when the
newdata
argument 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)