# **1 Introduction**

This paper studies the role of firm dynamics in aggregate total factor productivity (TFP), job flows, and wage inequality in Ecuador. A large strand of literature has documented that policy-related drivers and structural frictions impact firm performance with significant effects for aggregate TFP (Restuccia and Rogerson [2008, 2013], Hsieh and Klenow [2009], Bartelsman et al. [2013], among others). Recent literature has found that distortions that impact firm-level dynamics are also important for worker-level outcomes, including employment flows and wage inequality (Haltiwanger et al. [2013, 2016], Decker et al. [2014], Barth et al. [2016], Manning [2021], Criscuolo [2020, 2021, 2022], among others). To examine how firm performance drivers affect aggregate TFP and, simultaneously, impact job flows and wage inequality, the paper leverages a comprehensive employer-employee panel dataset encompassing formal firms in Ecuador. At the firm level, this paper documents a substantial overlap in the productivity distributions of incumbent firms versus entrants and survivor firms versus exiters. Additionally, firm productivity growth is negligible across firms’ life cycle. These firm dynamics suggest underlying market frictions, patterns that are corroborated by macro-level empirical trends. By decomposing aggregate TFP growth, the paper identifies factor misallocation across firms as the predominant channel contributing to Ecuador's aggregate TFP deceleration. Moreover, the distributions of firms by size and age and job flow trends are consistent with persistent allocative frictions, as larger and more productive firms are underrepresented in the economy, new jobs are predominantly created by small, unproductive entrants, and existing jobs are primarily destroyed by old, unproductive firms that continue operating instead of exiting. To reconcile these firm-level and aggregate trends, the paper investigates structural and policy drivers of allocative inefficiencies. Regression analysis at the firm level shows that firms in the top quintile of the productivity distribution face distortive non-wage labor costs that are 3.7 times higher than the bottom productivity quintile, after controlling for firm size and age. Also, the paper finds that credit is allocated to both productive and unproductive large firms, while productive small firms face higher credit constraints. Moreover, industry-level regressions indicate that sectors with higher job mobility, lower non-wage labor costs, less exposure to the minimum wage policy, improved credit access, fewer zombie firms, and greater market competition exhibit higher allocative efficiency. Furthermore, the paper finds that drivers contributing to resource misallocation account for up to 41 percent of aggregate wage inequality. Workerlevel regressions indicate that non-wage labor costs and product market frictions are allocative distortions driving aggregate wage inequality, while the minimum wage policy dissipates this inequality despite generating misallocation.

Between 2012 and 2020, the sample period studied in this paper, Ecuador witnessed economic stagnation, as growth driven by factor accumulation was offset by a significant decline in aggregate TFP, starting in 2014. This suggests that aggregate TFP growth was constrained by the presence of institutional and regulatory distortions that kept factor inputs from being efficiently distributed across firms and sectors. These distortions also slowed down firm-level productivity growth and impeded healthy firm entry and exit dynamics. This decline in aggregate TFP coincided with a change in the trend of income inequality, whose previous decreasing pattern plateaued after 2014 and slowly began increasing in 2018. By 2020, Ecuador was the third-most unequal country in South America. These patterns posit the question of whether the same drivers that constrain aggregate TFP performance are also linked to labor market outcomes and aggregate inequality trends.

Market distortions deter aggregate TFP performance by constraining firm outcomes and dynamics. In particular, these distortions diminish aggregate TFP, impeding the efficient allocation of capital and labor across firms (i.e., the allocative efficiency channel) and sectors (i.e., the structural transformation channel), restricting the growth of firm-level technical efficiency (i.e., the technical efficiency channel), and yielding unfavorable dynamics in firm entry and exit (i.e., the market selection channel). These market frictions, which restrain firm outcomes and depress aggregate TFP, also have effects on workers by distorting labor market quantities and prices. In an economy without distortions, heterogeneity in firm-level productivity results in differences in firm-level employment, with more productive firms employing a larger workforce 2