compared to less productive firms. As markets are efficient, marginal products of labor equalize across firms, resulting in equal wages for workers with similar characteristics. However, when input and output markets face structural or regulatory distortions, marginal products of labor no longer equalize across firms, which leads to wage inequality among similar workers for two reasons. First, market distortions generate labor market rents that can be shared between firms and workers. Differences in workers' bargaining power across firms determine the sharing of these rents, leading to wage differences. Second, market frictions distort firms’ marginal costs, generating dispersion in marginal revenue products. As a result, similar workers will receive different wages due to the distorted performance of firms. Moreover, labor markets adjust through wages as they cannot fully adjust through quantities. Hence, market distortions impact job flows and wage inequality by affecting firm dynamics.

To empirically assess the role of firm dynamics in aggregate TFP, job flows, and wage inequality in Ecuador, this paper utilizes a comprehensive employer-employee matched panel dataset constructed from two firmlevel datasets and one worker-level database. The firm-level datasets provide variables, including firms’ value-added, capital, labor, and materials, which are relevant for estimating firm-level (revenue) productivity using the control function approach to correct for endogeneity (Ackerberg et al. [2015]). The employee database contributes information on wages and human capital characteristics, essential for identifying the determinants that drive aggregate wage inequality.

This paper first documents firm-level patterns, which are indicative of underlying market distortions. As is standard in the literature, the paper finds an increasing relationship between different measures of productivity (i.e., revenue TFP, labor productivity, and sales per worker) and size. However, the paper also finds that older firms are not necessarily more productive than younger ones, signaling constraints on firmlevel productivity growth. Comparing the productivity of surviving firms relative to exiters, the former group is, on average, more productive than the latter. Still, a substantial overlap in their productivity distributions implies inefficiencies in exit dynamics (Levy, 2018). Similarly, incumbent firms exhibit higher productivity levels than entrants, but again, an overlap in their productivity distributions suggests inefficient entry patterns. Furthermore, examining firms' life cycle patterns reveals additional evidence of market distortions. The median firm in Ecuador experiences initial modest growth in technical efficiency during the early years of operation but encounters stagnation and decline in later stages, underscoring the inability of firms to catalyze and sustain productivity growth as they age.

At an aggregate level, the paper documents a decline in aggregate TFP over the sample period. Employing the Melitz and Polanec (2015) approach to decompose aggregate TFP growth, the paper identifies the allocative efficiency channel as the component driving aggregate TFP performance, stemming from persistent factor misallocation across firms. Sectoral factor reallocation is also inefficient, especially during economic downturns. Following adverse external shocks, the combined effect of market distortions with broader macro-structural challenges proves notably detrimental, as it amplifies these economic downturns by reallocating resources towards less productive firms (allocative efficiency channel) and sectors (structural transformation channel), rather than serving as cleansing mechanisms that shift resources more efficiently. Technical efficiency growth in Ecuador has not been able to offset the negative impact of the allocation channels on aggregate TFP trends. The modest contributions of the technical efficiency channel to aggregate TFP growth align with the poor life cycle patterns observed in firm-level productivity growth. Last, the market selection channel (entry plus exit) contributes marginally to aggregate productivity changes due to the entrance of many unproductive firms and the low survival of high-productivity entities.

The paper finds that the poor contributions of the various productivity growth channels are linked to persisting distortions in factor and product markets. To formalize the relationship between allocative efficiency and the aforementioned market distortions, the paper conducts firm- and industry-level regressions, examining various measures of policy-related distortions. At the firm level, distortions in labor and capital markets are studied. The fluidity of Ecuador's labor market is hindered by regulatory frameworks that impose distortionary regulations, leading to escalated labor costs for firms. In comparison to other South American countries, Ecuador has higher firing costs. Also, its labor laws impose additional 3