Overview
Estimating variance components of high-dimensional fixed effects can be complex due to the fact that we’re squaring estimation noise, and this noise can potentially be large due to limited mobility bias. I list some projects that develop procedures to deal with this problem.
In a standard two-way fixed effect model based on Abowd, Kramarz, and Margolis we have $$y_{it} = \alpha_i + \Psi_{j(i,t)} + \varepsilon_{it} $$.
Under fixed regressors and exogenous mobility assumption, we still have the problem that a variance component of the firm effects is biased: $$ E[\hat{\beta}‘A\hat{\beta}] = \beta’ A\beta + \sum_{i=1}^n B_{ii} \sigma_i^2 $$,
where $B_{ii} = x_i’S_{xx}^{-1}AS_{xx}^{-1}x_i$, and $A$ is either a positive semi-definite matrix (variance component) or a non-definite matrix (co-variance component).
The next section lists some useful packages that deal with this problem.
Implementations
- Pytwoway Package by Thibaut Lamadon (Python) – This package includes every implementation of two-way fixed effects estimation of firm effects (exact bias correction, correlated random effects, among others).
- LeaveOutTwoWay Package by Raffaele Saggio (Matlab) – This package implements the bias correction described in Kline, Saggio, and Sølvsten .
- VarianceComponentsHDFE Package by VSE HighDimensionalEconLab (Julia and Executable) – This package implements the bias correction described in Kline, Saggio, and Sølvsten . It also includes some intermediate functions that are useful for AKM models such as finding the largest connected set and the leave-one-out set as described in the paper. If you don’t feel comfortable with learning one of these programming languages to implement this bias-correction, an executable is provided such that no software installation is needed.