PyFixest 0.18.0
PyFixest 0.18.0
- Large(ish) Refactoring of Interal Processing of Model Formulas, in particular
FixestFormulaParser
andmodel_matrix_fixest
. As a results, the code should be cleaner and more robust. - The
fml
argument ofmodel_matrix_fixest
is deprecated. Instead,model_matrix_fixest
now 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_fixest
now returns a dictionary instead of a tuple. - Fixed effects reference setting via
i(var1, var2, ref)
syntax is back. Thei_ref1
,i_ref2
function arguments are deprecated. It is again possible to run
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 #340
- Add
keep
/drop
tocoefplot
and refactor code to improve maintainability by @Wenzhi-Ding in #341 - Rework
fixest_model_matrix
by @s3alfisc in #343 - Fix cluster interaction bug by @s3alfisc in #345
- fix: number of observations format by @Wenzhi-Ding in #347
- Fix summary weights bug by @s3alfisc in #351
FixestFormulaParser
cleanup / refactoring by @s3alfisc in #352- Formula parser cleanup2 by @s3alfisc in #354
- Fix bug with
keep
anddrop
forcoefplot
by @s3alfisc in #356 - Pyfixest 018 by @s3alfisc in #358
Full Changelog: v0.17.0...v0.18.0