Releases: py-econometrics/pyfixest
PyFixest 0.10.5
- Fixes a bug in IV estimation that triggered an error. See #197 for details. Thanks to @aeturrell for reporting!
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.
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:
%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
PyFixest
finally supports poisson regression with iid errors! 🎉- Additionally, some bug fixes.
PyFixest 0.9.9
Updates since the last github release (PyFixest 0.9.6
):
PyFixest 0.9.9
- Adds support for
wildboottest
for Python3.11
.
PyFixest 0.9.8
- Fixes a couple more bugs in the
predict()
andfixef()
methods. - The
predict()
argumentdata
is renamed tonewdata
.
PyFixest 0.9.7
Fixes a bug in predict()
that occurred when multicollinear variables are dropped in the estimation step.
PyFixest 0.9.7
Fixes bug in in fixef()
. #147
PyFixest 0.9.6
Improved Collinearity handling. See #145
PyFixest 0.9.5
- Moves plotting from matplotlib to lets-plot.
- Fixes a few minor bugs in plotting and the
fixef()
method.
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:
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
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
specialget_vcov
methods, it is now integrated intoFeols.get_vcov
- installs
PyHDFE
directly from PyPi (asPyHDFE
0.2 now supports weights) - bases the convergence criterion of the Poisson on it's absolute deviance. The implementation now matches
fixest
andglm