PyFixest Function Reference

Estimation Functions

User facing estimation functions

estimation.feols Estimate a linear regression models with fixed effects using fixest formula syntax.
estimation.fepois Estimate Poisson regression model with fixed effects using the ppmlhdfe algorithm.
did.estimation.did2s Estimate a Difference-in-Differences model using Gardner’s two-step DID2S estimator.
did.estimation.lpdid Local projections approach to estimation.
did.estimation.event_study Estimate Event Study Model.
estimation.bonferroni Compute Bonferroni adjusted p-values for multiple hypothesis testing.
estimation.rwolf Compute Romano-Wolf adjusted p-values for multiple hypothesis testing.

Estimation Classes

Details on Methods and Attributes

estimation.Feols Non user-facing class to estimate a liner regression via OLS.
estimation.Fepois Estimate a Poisson regression model.
estimation.Feiv Non user-facing class to estimate an IV model using a 2SLS estimator.

Summarize and Visualize

Post-Processing of Estimation Results

report.summary Print a summary of estimation results for each estimated model.
report.etable Create an esttab-like table from a list of models.
report.coefplot Plot model coefficients with confidence intervals.
report.iplot Plot model coefficients for variables interacted via “i()” syntax, with

Misc / Utilities

PyFixest internals and utilities

estimation.demean Demean an array.
estimation.detect_singletons Detect singleton fixed effects in a dataset.
estimation.model_matrix_fixest Create model matrices for fixed effects estimation.