PyFixest Function Reference

Estimation Functions

User facing estimation functions

estimation.estimation.feols Estimate a linear regression models with fixed effects using fixest formula syntax.
estimation.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_.Feols Non user-facing class to estimate a linear regression via OLS.
estimation.fepois_.Fepois Estimate a Poisson regression model.
estimation.feiv_.Feiv Non user-facing class to estimate an IV model using a 2SLS estimator.
estimation.feols_compressed_.FeolsCompressed Non-user-facing class for compressed regression with fixed effects.

Summarize and Visualize

Post-Processing of Estimation Results

did.visualize.panelview Generate a panel view of the treatment variable over time for each unit.
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.dtable Generate descriptive statistics tables and create a booktab style table in
report.coefplot Plot model coefficients with confidence intervals.
report.iplot Plot model coefficients for variables interacted via “i()” syntax, with
did.visualize.panelview Generate a panel view of the treatment variable over time for each unit.

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.