household surveys, which refers to workers indicating that they have access to a pension through their job. Although this implies small differences in coverage and average wages (see supplementary online appendix table S1.3),<sup>23</sup> wage inequality trends are similar across the two data sources in the common time periods, once household surveys data are restrict to formal sector workers (see figure 8).<sup>24</sup> This paper decomposes wage inequality into firm and worker components using the additive worker and firm fixed-effects model first proposed by Abowd, Kramarz, and Margolis (1999), henceforth, AKM. The model is used to disentangle the contributions of unobserved worker and firm heterogeneity to changes in wage inequality. Given our focus on changes over time in the importance of each of these components of wage inequality, it follows Card, Heining, and Kline (2013) and Alvarez et al. (2018) and estimate the model separately by subperiod.<sup>25</sup> It focuses on log monthly wages at jobs held in the private sector. The estimated model is where _αi_ is the worker component; _φj_ ( _i,t_ ) is the firm component; and _εit_ is the error component.<sup>26</sup> Based on equation (3), this paper decomposes the variance of wages within each subperiod into the variance of the worker component, the variance of the firm component, the covariance between the worker and firm components, and the variance of the residual. Following AKM and Card, Heining, and Kilne (2013), the variance in the worker effect is interpreted as wage inequality generated by a combination of workers’ skills and other char-

> 23See also wage kernels comparing the two sources in supplementary online appendix S5.

> 24In addition to the focus on formality and the definition of formality, these two types of data differ in several ways. First, whereas household surveys collect information on a sample of workers, administrative data cover the universe of formal workers. Second, in household surveys earnings are reported by the respondent in response to the question: “what are your monthly wages for the job worked last week?” In the administrative data sets, earnings are reported by firms and used by the government to compute social security benefits. This may imply that administrative data depict earnings in the formal sector with less measurement error (see Mayer and Mittag 2015). In both types of data, wages are typically reported as monthly take-home pay, after social security taxes have been paid. They include bonuses that workers receive on a regular basis (monthly or more frequently), but exclude bonuses paid less frequently than monthly. Because working hours are typically contractual hours in the administrative data, the wage measure used in this section is monthly wages.

25Subperiods of four (three) years are considered in Brazil and Ecuador (Costa Rica), this paper tested the robustness of the findings to longer subperiods, as in Alvarez et al. (2018). Results indicate a larger variance of the residual, which is offset by worker effects explaining a few percentage points less of the overall variation in wages. The share contributed by firms remains roughly the same. Results available upon request.

> 26As in Alvarez et al. (2018), our specification does not include an index of time-varying observable characteristics of workers, as data are not available for all the countries. This exclusion avoids identifying the time-varying effects of changes within workers and firms during the limited time frame of each subperiod. For brevity, the analysis also excludes year effects, the covariance between worker and year, and firm and year effects. The results are available from the authors. They show that, as in Alvarez et al. (2018), these terms play an insignificant role in the variation of overall wage inequality.

24