Tools · SPBoucher
Menu

fixest

In-depth entry

by 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

GPL-3.0-only licenseFreeOpen sourceLocalSelf-hostable
Visit official site Compare

Link verified Nov 2, 2026

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

  1. Two-way fixed-effects regressions with clustered errors for a paper
  2. Staggered difference-in-differences with event-study plots
  3. Gravity models with PPML and exporter-importer-year fixed effects
  4. 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
Compare fixest with its alternatives →

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 site
    Fast Fixed-Effects Estimations • fixest

    https://lrberge.github.io/fixest

    Supports: name, summary, capabilities, vendor, license_spdx

    checked Nov 1, 2026
  • Package registry
    CRAN - Package fixest

    https://cran.r-project.org/package=fixest

    Supports: license_spdx, product_status

    checked Nov 1, 2026
  • Repository
    lrberge/fixest

    https://github.com/lrberge/fixest

    Supports: repo_url, license_spdx, languages

    DESCRIPTION file declares License: GPL-3

    checked Nov 1, 2026
Confidence
High
Reviewed
Nov 1, 2026
Links
Verified · Nov 2, 2026

Spotted an error?

Broken link, outdated license, wrong category, or a tool that no longer exists? Tell us; reports are reviewed by the editor.

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

MITFreeOpen sourceLocalNov 2, 2026

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

MITFreeOpen sourceLocalNov 2, 2026

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

NCSAFreeOpen sourceLocalNov 2, 2026

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

ProprietaryPaidAcademicLocalNov 2, 2026

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

GPL-3.0-onlyFreeOpen sourceLocalNov 2, 2026