Models with high-dimensional sets of fixed effects are frequently used to examine, among others, linked employer-employee data, student outcomes and migration. Estimating these models is computationally difficult because of the high-dimensional design matrix.
I present a simple algorithm to compute the OLS estimates of large two-way fixed effects (TWEE) and match effect models including estimates of the fixed effects. The algorithm simplifies specification tests and variance estimation even with multi-way clustered errors.
An application using German linked employer-employee data illustrates key advantages of the algorithm: Omitting match effects substantially affects estimates including the gender wage gap. Analyzing the estimated fixed effects suggest that firm fixed effects are the main channel through which job transitions drive wage dynamics, which underlines the importance of firm heterogeneity for labor market dynamics.