Skip to content

Releases: py-econometrics/pyfixest

v0.30.2a Release to re-trigger PyPi upload

07 Jul 19:32
b7fe815
Compare
Choose a tag to compare

Dummy release to trigger PyPi upload.

v0.30.2 - Fix Type Error on Windows

06 Jul 20:44
f4e60ac
Compare
Choose a tag to compare

Windows user may experience a type error when using the Rust backend with 0.30.1. Here we try to address this error.

Hotfix Release for JAX import error

05 Jul 17:15
25779c1
Compare
Choose a tag to compare

The previous release lead to a JAX import error. This release fixes the error.

v0.30.1

05 Jul 15:20
0f1a845
Compare
Choose a tag to compare
Release v0.30.1

v0.30.0

05 Jul 14:48
12850e1
Compare
Choose a tag to compare

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

New Contributors

Full Changelog: v0.29.0...v0.30.0

v0.29.0

18 Apr 11:50
6eb5150
Compare
Choose a tag to compare

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

New Contributors

Full Changelog: v0.27.1...v0.29.0

v0.28.0

13 Jan 20:27
4a4bc1c
Compare
Choose a tag to compare

Changes

New features and bug fixes

  • Adds a function argument context, that allows to pass information / context to the formulaic.Formulaic.get_model_matrix() call that creates the model matrix.
  • Fix a bug that caused reindexing of LPDID._coeftable when calling LPDID.iplot(). As a result, a second call of LPDID.iplot() would fail.
  • Bumps the required formulaic version to 1.1.0 and fixes errors that arose when a) the ref argument was used for i() syntax, which led to a silent failure under formulaic >= 1.1.0, and fixef() / 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

v0.27.0

15 Dec 12:31
a4272b0
Compare
Choose a tag to compare

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() and pf.fepois() are now converted to pandas via narwhals.
    As a result, users can now provide duckdb or ibis tables as inputs, as well as pandas and polars data frames. polars and pyarrow
    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

v0.26.2

01 Nov 11:53
5027952
Compare
Choose a tag to compare

No changes relative to 0.25.4, I (Alex) simply messed up the PyPi release.

v0.25.4

01 Nov 11:40
bbf5f96
Compare
Choose a tag to compare

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() and fepois() obtain "split" and "fsplit" arguments, just as you might know them from fixest::feols().
  • @leostimpfle has added the "iterated rectifier" check for detecting separation in Poisson models.
  • We have added timing benchmarks against linearmodels (@marcandre259 ).

Changes