Papers
NBERCEPR2026

fereg: Fast High-Dimensional Fixed-Effects Regressions in Stata

Johannes F. Schmieder

Source versions
2
Latest record
2026-11-16
Primary source
NBER
NBERCEPRLaborAdministrative dataPDF link
Abstract

Regressions with many fixed effects are central to applied research, but fitting them to large datasets can be slow. In this article, I present the commands fereg and feppml, which fit linear and Poisson pseudo-maximum-likelihood regressions with high-dimensional fixed effects. Both commands use familiar Stata syntax and pass the computation to a compiled plugin. The plugin chooses among projection, Krylov, and multigrid solvers according to the structure of the fixed effects, checks every result before posting it, and runs on several processor cores. The commands support multiple and interacted fixed effects, group-specific slopes, regression weights, robust and multiway clustered standard errors, saved fixed effects, and prediction. Two simulated examples illustrate their use. In simulated designs with up to ten million observations and default stopping settings, fereg was 6–204 times faster than reghdfe and feppml 11–103 times faster than ppmlhdfe. The commands were also faster than fixest (R) and PyFixest (Python) in all 53 simulated configurations and than the Julia packages FixedEffectModels.jl and GLFixedEffectModels.jl in 52 of 53, with geometric-mean time ratios between 3.0 and 7.7. On administrative data with 1.2 million workers and 117,000 firms, fereg and feppml were at least 3.4 times faster than every other command at every number of cores.

Source versions
NBER2026-11-16
Working paper · Working Paper w36017
w36017
CEPR2026-11-12
Working paper · Discussion Paper DP22170
DP22170
Related papers
QJE2026-11-17The Quarterly Journal of Economics

Earnings Instability

Peter Ganong, Pascal Noel, Christina Patterson, Joseph Vavra, Alexander Weinberg

QJELaborAdministrative data