• PyFixest
  • Getting Started
  • Function Reference
  • Tutorials
    • All Tutorials

    • OLS with Fixed Effects
    • Formula Syntax
    • Regression Tables
    • Difference-in-Differences
    • Quantile Regression
  • Guides
    • All Guides

    • Marginal Effects & Hypothesis Testing
    • Regression Decomposition
    • PyFixest on the GPU via JAX
    • PyFixest on the GPU via CuPy
    • Compare Stata & PyFixest
    • Variance Reduction in AB Tests
  • Explanation
    • When Are Fixed Effects Problems Difficult?
    • On Small Sample Corrections
    • Does PyFixest Match fixest?
  • Textbook Replications
    • All Textbook Replications

    • Causal Inference for the Brave and True
    • Causal Inference: The Mixtape
    • The Effect
    • Other Resources
  • Changelog
  • Contributing
  • Acknowledgements
  • Sprint 2026
  • llms.txt
  • Skills.md
Categories
All (8)
Causal Inference (1)
Core Estimation (5)
Specialized Methods (1)
Workflow (1)

Tutorials

Guides on PyFixest - mostly using examples from economics and tech (as this is what we know well). Please suggest other interesting applications of fixed effects / PyFixest from other areas of applied statistics!

All tutorials are self-contained. If you’re new to PyFixest and fixed effects estimation, we recommend that you start with OLS with Fixed Effects, else just jump to any topic that fits your problem.

TipSuggested reading order

OLS with Fixed Effects → Formula Syntax → Standard Errors → Instrumental Variables → Poisson & GLMs → Multiple Estimation → Regression Tables

OLS with Fixed Effects
Core Estimation

Twin studies and ‘AKM’ regressions in worker-firm panels: two cases studies in controlling for unobserved heterogeneity with fixed effects.

Formula Syntax
Core Estimation

In this tutorial, we showcase all of PyFixest formulas syntax; including syntax for fitting models with fixed effects, interactions, and multiple-estimation operators.

Standard Errors & Inference
Core Estimation

HC-robust, cluster-robust, wild bootstrap, randomization inference, and the causal cluster variance estimator.

Instrumental Variables
Core Estimation

IV estimation with fixed effects, first-stage diagnostics, and the effective F-statistic.

Poisson & GLMs
Core Estimation

Poisson for nonnegative outcomes, DiD with counts, and logit/probit for propensity-score based AB testing.

Difference-in-Differences Estimation
Causal Inference

TWFE, Gardner’s two-stage DID2S, local projections, and event study designs with heterogeneous treatment effects.

Quantile Regression
Specialized Methods

Quantile regression for modeling the full conditional distribution, not just the mean.

Regression Tables
Workflow

Publication-ready tables with Great Tables or LaTeX booktabs — customize labels, significance stars, and output formats.

No matching items