PyFixest Function Reference

Estimation Functions

User facing estimation functions

estimation.api.feols
estimation.api.fepois
estimation.api.feglm
estimation.api.quantreg
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.feglm_.Feglm Abstract base class for the estimation of a fixed-effects GLM model.
estimation.felogit_.Felogit Class for the estimation of a fixed-effects logit model.
estimation.feprobit_.Feprobit Class for the estimation of a fixed-effects probit model.
estimation.fegaussian_.Fegaussian Class for the estimation of a fixed-effects GLM with normal errors.
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 Generate a table summarizing the results of multiple regression 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.