fixest
In-depth entryby Laurent Bergé · Library
R package for fast estimation of OLS, GLM, Poisson, IV and difference-in-differences models with many fixed effects, clustered errors, multiple estimations and publication tables
Overview
fixest is an R package by Laurent Bergé for fast econometric estimation with high-dimensional fixed effects, released under the GPL-3 and available on CRAN. A single formula syntax separates regressors, fixed effects and instruments with pipes and covers ordinary least squares (feols), generalized linear models and Poisson pseudo-maximum likelihood (feglm, fepois), negative binomial, maximum-likelihood models and two-stage least squares, with fixed effects absorbed by an efficient demeaning algorithm that handles millions of observations and several fixed-effect dimensions on a laptop.
The package is built for applied-microeconomics workflows: six families of variance-covariance estimators including multi-way clustering and Driscoll-Kraay, one-call multiple estimations over sets of dependent variables, regressors, fixed effects and sample splits, lead/lag/difference operators for panels, event-study estimation with interaction syntax and the Sun-Abraham estimator for staggered adoption, coefficient and event-study plots, and etable, which prints regression tables to the console or exports publication-ready LaTeX with full styling control. Version 0.14.2 is current at the time of writing.
fixest has become the default fixed-effects engine in R, displacing lfe, and its syntax has been ported to Python as pyfixest. It is single-machine and in-memory, offers no nonlinear panel estimators beyond GLM families, and its many options and compact syntax have a learning curve; users still reach for other packages for synthetic control or modern heterogeneous-treatment DID estimators.
Capabilities
- feols, feglm, fepois and fenegbin with absorbed fixed effects
- Instrumental-variable (2SLS) estimation within the same syntax
- Multi-way clustered, heteroskedasticity-robust and Driscoll-Kraay standard errors
- Multiple estimations in one call over variables, fixed effects and samples
- Event-study and Sun-Abraham staggered DID estimation
- Panel lead, lag and difference operators
- etable for console and LaTeX regression tables
- Coefficient and event-study plots
Typical workflows
- Two-way fixed-effects regressions with clustered errors for a paper
- Staggered difference-in-differences with event-study plots
- Gravity models with PPML and exporter-importer-year fixed effects
- Robustness tables across many specifications exported to LaTeX
Strengths
- Fast on large panels with many fixed effects
- Compact formula syntax for complex designs
- Publication tables without extra packages
- GPL-3 open source on CRAN
Limitations
- R only (Python port is a separate project)
- Single-machine, in-memory
- Limited nonlinear models beyond GLM families
- Dense option set has a learning curve
Prerequisites
- R with CRAN access
Who it is for
- Applied micro and trade economists
- Graduate students writing empirical papers
- Researchers replacing Stata reghdfe workflows in R
Alternatives & comparison
linearmodels and statsmodels in Python offer fixed-effects and IV estimation but without fixest's speed on many-level effects or its multiple-estimation and table tooling; Stata's reghdfe is the closest equivalent in a commercial package. pyfixest (not recorded here) ports the syntax to Python.
- DoWhy
Python causal-inference library organized around model, identify, estimate and refute steps, with graphical causal models for attribution, counterfactuals and root-cause analysis
Open sourceFree - EconML
Python library for heterogeneous treatment-effect estimation with machine learning: double ML, doubly robust learners, causal forests, meta-learners, IV and policy learning
Open sourceFree - linearmodels
Python package by Kevin Sheppard adding panel data, instrumental-variable, system (SUR/3SLS) and asset-pricing estimators missing from statsmodels
Open sourceFree - R
Language and environment for statistical computing and graphics, with the CRAN package archive and a strong base in academic statistics and econometrics
Open sourceOpen source - Stata
Commercial statistical software from StataCorp widely used in economics and social science, with editions BE/SE/MP, a command language, Mata and comprehensive PDF manuals
ProprietaryPaid - statsmodels
Python library for estimating statistical and econometric models with R-style formulas, rich result summaries and tests: OLS, GLM, discrete choice, ARIMA, state space, VAR and more
Open sourceFree
Sources & verification
Primary sources consulted for this record. Claims are tied to the fields each source supports; the automated link checker re-verifies every URL on a schedule.
- Official siteFast Fixed-Effects Estimations • fixestchecked Nov 1, 2026
https://lrberge.github.io/fixest
Supports: name, summary, capabilities, vendor, license_spdx
- Package registryCRAN - Package fixestchecked Nov 1, 2026
https://cran.r-project.org/package=fixest
Supports: license_spdx, product_status
- Repositorylrberge/fixestchecked Nov 1, 2026
https://github.com/lrberge/fixest
Supports: repo_url, license_spdx, languages
DESCRIPTION file declares License: GPL-3
- Confidence
- High
- Reviewed
- Nov 1, 2026
- Links
- Verified · Nov 2, 2026
Spotted an error?
More in Econometrics & causal inference
EconML
PyWhy (originally Microsoft Research) · Econometrics & causal inference
Python library for heterogeneous treatment-effect estimation with machine learning: double ML, doubly robust learners, causal forests, meta-learners, IV and policy learning
DoWhy
PyWhy (originally Microsoft Research) · Econometrics & causal inference
Python causal-inference library organized around model, identify, estimate and refute steps, with graphical causal models for attribution, counterfactuals and root-cause analysis
arch (Python package)
Kevin Sheppard · High-frequency financial analysis
Kevin Sheppard's Python package for univariate ARCH/GARCH volatility models, bootstraps, multiple-comparison procedures, unit-root and cointegration tests
EViews
S&P Global (EViews) · Econometrics & causal inference
Commercial Windows econometrics package for time-series estimation, forecasting and macro modelling, sold as single-user, volume, University and free Student Lite editions
gretl
gretl developers (Allin Cottrell, Riccardo Lucchetti) · Econometrics & causal inference
Free, GPL-licensed cross-platform econometrics program with a GUI, the hansl scripting language and estimators for time series, panels and limited dependent variables