Skip to content

Releases: py-econometrics/pyfixest

PyFixest 0.10.5

28 Oct 19:43
992865f
Compare
Choose a tag to compare
  • Fixes a bug in IV estimation that triggered an error. See #197 for details. Thanks to @aeturrell for reporting!

PyFixest 0.10.4

16 Oct 21:17
4eaef7d
Compare
Choose a tag to compare

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.

PyFixest 0.10

08 Oct 13:48
b202c34
Compare
Choose a tag to compare
  • Most importantly, implements a custom demeaning algorithm in numba - thanks to Styfen (@styfenschaer).
    This leads to performance improvements of 5x or more:
%load_ext autoreload
%autoreload 2

import numpy as np
import time
import pyhdfe
from pyfixest.demean import demean

np.random.seed(1238)
N = 10_000_000
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)

start_time = time.time()
res_pyhdfe = algorithm.residualize(x)
end_time = time.time()
print(end_time - start_time)
# 26.04527711868286


start_time = time.time()
res_pyfixest, success = demean(x, flist, weights, tol = 1e-10)
# Calculate the execution time
end_time = time.time()
print(end_time - start_time)
#4.334428071975708

np.allclose(res_pyhdfe , res_pyfixest)
# True

PyFixest 0.9.12

06 Oct 18:55
4f644e4
Compare
Choose a tag to compare
  • PyFixest finally supports poisson regression with iid errors! 🎉
  • Additionally, some bug fixes.

PyFixest 0.9.9

21 Sep 21:44
611f63c
Compare
Choose a tag to compare

Updates since the last github release (PyFixest 0.9.6):

PyFixest 0.9.9

  • Adds support for wildboottest for Python 3.11.

PyFixest 0.9.8

  • Fixes a couple more bugs in the predict() and fixef() methods.
  • The predict() argument data is renamed to newdata.

PyFixest 0.9.7

Fixes a bug in predict() that occurred when multicollinear variables are dropped in the estimation step.

PyFixest 0.9.7

18 Sep 18:56
85a9d05
Compare
Choose a tag to compare

Fixes bug in in fixef(). #147

PyFixest 0.9.6

17 Sep 20:49
1c60ef4
Compare
Choose a tag to compare

Improved Collinearity handling. See #145

PyFixest 0.9.5

16 Sep 17:48
cdc909d
Compare
Choose a tag to compare
  • Moves plotting from matplotlib to lets-plot.
  • Fixes a few minor bugs in plotting and the fixef() method.

PyFixest 0.9.1

10 Sep 11:34
99bf10c
Compare
Choose a tag to compare

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:

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:

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:

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).

PyFixest 0.8.9

19 Aug 17:05
568f908
Compare
Choose a tag to compare

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 pplmhdfe paper)
  • drops Fepois special get_vcov methods, it is now integrated into Feols.get_vcov
  • installs PyHDFE directly from PyPi (as PyHDFE 0.2 now supports weights)
  • bases the convergence criterion of the Poisson on it's absolute deviance. The implementation now matches fixest and glm