Skip to content

PyFixest 0.18.0

Compare
Choose a tag to compare
@s3alfisc s3alfisc released this 24 Mar 09:21
· 360 commits to master since this release
2833674

PyFixest 0.18.0

  • Large(ish) Refactoring of Interal Processing of Model Formulas, in particular FixestFormulaParser and model_matrix_fixest. As a results, the code should be cleaner and more robust.
  • The fml argument of model_matrix_fixest is deprecated. Instead, model_matrix_fixest now asks for a FixestFormula, 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. The i_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

Full Changelog: v0.17.0...v0.18.0