Misallocation and manufacturing TFP in Ecuador: formal, semi-formal and informal firms

Resource misallocation can lower the aggregate total factor productivity (TFP). We use micro-data on manufacturing establishments from the Instituto Ecuatoriano de Estadística y Censos to quantify the differences in productivity and diagnose the efficiency in the allocation of resources between formal and informal firms in the Ecuadorian in the manufacturing sector. We use the model proposed by Hsieh and Klenow (Q J Econ 124(4):1403–1448, 2009) to find informal firms have lower physical productivity than formal firms. We also found formal firms have a restricted growth due to capital and output distortions. These results indicate the existence of an inefficient allocation of resources between firms. By reallocating resources to equalize marginal productivity in the manufacturing sector, we calculate TFP gains of 80% in 2002 and 69% in 2015.

Conventional investigations such as Howitt (2000) and Klenow and Rodríguez-Clare (2005) argue that increases in productivity are generally obtained by improvements in the production processes, machinery and/or products due to the firms' investments in human capital and in research and development (R & D). Slow growth of TFP was considered to be caused by barriers that prevent the diffusion and implementation of new technologies.
However, recent studies by Banerjee and Duflo (2005), Restuccia and Rogerson (2008) and Hsieh and Klenow (2009) argue that the slow growth of TFP may also be a consequence of policies and market failures. These determine the existence of the firms and the allocation of resources among them. When the allocation of resources is inefficient, the aggregate TFP is affected because productive firms are smaller than they would be in an economy with adequate allocation of resources.
Developing countries are characterized by large differences in productivity between formal and informal firms, which indicates the existence of inefficiencies in the allocation of resources (Busso et al. 2013). The misallocation of resources arises when the most productive firms have insufficient resources to increase their production, while the less productive firms continue to use a certain amount of resources instead of reducing their use of capital and labor, and eventually stop operating (Busso et al. 2013). Therefore, the correction of inefficiencies between formal and informal businesses is a determining factor to increase the productivity of an economy and, at the same time, boost its growth.
In this paper, we use micro-data on manufacturing establishments for the Ecuadorian manufacturing sector from 2002 to 2015 to determine whether there are differences in productivity between firms, and an inefficient allocation of resources between them. We use the model proposed by Hsieh and Klenow (2009) to calculate the differences in productivity and the potential gains of the reallocation of resources in the presence of distortions. We find informal firms have lower physical productivity than formal firms, and formal firms have a restricted growth due to the distortions 1 they face. These results indicate the existence of an inefficient allocation of resources among firms. By reallocating resources to equalize marginal productivity in the manufacturing sector, gains of 80% in 2002 and 69% in 2015 would be obtained.

Informality and productivity
Economic development involves structural changes which require the movement of resources from traditional economic units to modern units. We study the allocation of resources among formal and informal firms in the Ecuadorian case. The growth consequence of this allocation of resources depends on the magnitude of the informal economy as a source of growth, and whether the formal and informal sectors of the Ecuadorian economy are complementary or segmented economic units.
Some authors (Hart 1973;Sethuraman 1976; among others) consider the informal sector to be marginal and disconnected from the formal sector, while other authors (Moser 1978;Castells and Portes 1989;among others) argue that the informal sector in developing countries is necessary and would disappear once these countries have reached adequate levels of economic growth or modern industrial development (Chen 2005). Other authors argue that industrial development could follow a different pattern in developing countries (including the expansion of informal economic activities) than in developed countries (Chen 2005). Based on this debate, we have identified three schools of thought: the dualists, the structuralists and the legalists.
The dualist school of thought emerged in the nineteen seventies under the presentation by the ILO in 1972. This school of thought considers the informal sector as a traditional sector, and as an unproductive economic unit with low levels of technology and lack of access to credit and skills, of entrepreneurship, low and irregular incomes, and small and undetermined workplaces (Chen 2005). It considers the informal and formal sectors of the economy to be separated and unrelated. It also considers the informal sector to be made up of marginal activities (Hart 1973;ILO 1972;Sethuraman 1976;Tokman 1978). According to dualists, the existence of informal activities is due to the lack of insufficient job opportunities to absorb the surplus labor because of the slow rate of economic growth and/or a rapid rate of population growth (Chen 2005). The dualists argue that, due to their size, informal firms are unable to achieve economies of scale. This element, together with technological, innovation and credit factors, restrict their productivity in comparison with large and formal firms.
The structuralist school of thought has two main representatives: Caroline Moser and Alejandro Portes. They argue formal firms can be a source of inefficiency in the allocation of resources because they have to face higher costs than informal firms. In contrast to the dualists, the structuralists argue that the formal and informal sectors are two integrated and interdependent economic units (Moser 1978;Castells and Portes 1989). According to this school of thought, the informal economy can improve economic results, especially considering informal firms are labor intensive. Thus, the informal sector is a source of employment opportunities, a theory that sounds appropriate for the labor-intensive production structure of developing countries (Potts 2008). In this sense, due to their flexibility, firms in the informal sector can be more productive than large firms in the formal sector.
The legalistic school of thought, with Hernando de Soto as its main representative, argues that the informal sector is made up of entrepreneurs who choose to operate informally to avoid the costs, time and effort involved in the formalization of the firms (from De Soto 1989). This school of thought considers that the existence of informal firms is conditional on governmental procedures and regulations. So, expensive and excessive procedures will induce firms to operate informally (Chen 2005).
In the same way, the informal economy can be studied at personal level (employees) or at an enclosing firm level. The definition of informal economy at the individual level was updated in 1993 by the International Labor Organization. Under this definition, the informal economy is a subset of informal employment. That is, employment without formal contracts, labor benefits or social security both inside and outside formal firms (Chen 2005). With this in mind, Kanbur (2009) relates informality with the non-compliance of a particular regulation. So, he defines informal employees as those who are not covered by wage labor regulations, specifically, as those who do not have an affiliation to the social security system.
On the other hand, the informal economy at firm level has been less studied than at an individual level despite being linked concepts. Some authors (Busso et al. 2012a) take into consideration the employees to establish the definition of informality at firm level. Busso et al. (2012a) argue that the informality of a firm can be measured by the ratio of social security taxes to the remunerations of all employees. Informal firms do not make any contribution to social security, while semi-formal firms (also called irregular) are those that do not pay the total contribution to social security.
It is important to study semi-formal firms because they share characteristics with both formal and informal firms. Because of this particularity, there are usually more semiformal firms than informal firms in developing countries. This is mainly because firms try to minimize costs (taxes and social security contributions) without avoiding them completely (like informal firms do).
Multiple studies have used the semi-formal definition to classify firms in their studies. Busso et al. (2012b) use a penalty function as an increasing function of the rate of informality, defined as the unpaid fraction of the tax bill to classify firms as informal, semi-formal and formal. Levy and López-Calva (2016) classify firms into formal, informal and semi-formal firms to study the misallocation of resources in Mexico regarding the returns to education. Kenyon (2007) studies the reasons behind the informality and semi-formality status of firms and determines that semi-formal firms employ regulatory evasion as a source of competitive advantage.
The World Bank (n.d.) developed an informality indicator for firms in Ecuador according to the definition of informality by the employment approach. The classification of the firms is based on the level of contribution to the Instituto Ecuatoriano de Seguridad Social (IESS), which is 11.15% of the nominal salary established by law (World Bank n.d.). Formal firms are those that make the full contribution to the IESS according to what is established by law. Completely informal firms are those that do not make any contribution to the IESS. Semi-formal or irregular firms are those that contribute to the IESS less than that established by law.
The existing literature has identified three main sources of aggregate growth of TFP. The first source is technology, which covers the technological development of firms, innovation, and capacity for technological absorption. The second source is the movement of factors from low-productivity sectors such as agriculture to higher-productivity sectors such as manufacturing (Nguyen and Yilmaz 2016). The third source is through the improvement in the allocation of resources between industries, which happens when the resources of low-productivity firms move toward high-productivity firms.
The third main source of the aggregate growth of the TFP, the allocation of resources, between industries will be studied in this investigation. The characterization of developing economies in terms of the differences between formal and informal firms is a sign that an inefficient allocation of resources decreases aggregate productivity. Inefficiencies in the allocation of resources between firms and between sectors are caused when the most productive firms obtain insufficient resources to increase their production, while less productive firms continue to use resources instead of decreasing their production and eventually ending their operations. (Nguyen and Yilmaz 2016). When capital and labor move from productive units with a lower degree of productivity to more productive units, the economy can achieve growth without the need to increase resources. That is why a potential source of growth is the correction of productivity inefficiencies, especially for developing economies that are those that face greater inefficiencies. The study of the movement of resources between formal and informal firms will allow us to evaluate whether there is a misallocation of resources in the Ecuadorian´s manufacturing sector.

Hsieh and Klenow model
The literature has studied the existence of a lower TFP due to the misallocation of resources between firms. These studies have found that gains in TFP can be obtained in the absence of distortions. Studies have also found that there is a greater degree of misallocation in developing countries. This can be explained mainly because of the lower degree of reallocation of factors between productive units and because of distortions generated by public institutions and policies in developing countries (Vasconcelos 2017).
In this context, Hsieh and Klenow (2009) find that if the manufacturing sectors of China and India were reallocated to equalize marginal products to the extent observed in the US manufacturing sector, the TFP gains would be 30% to 50% and 40% to 60%, respectively.
As mentioned before, Busso et al. (2012b) find that the dispersion of TFPQ is greater in Latin America than in the USA and greater than in China. Their results show that countries from Latin America have a higher dispersion in TFPR than in the USA, which suggests Latin America presents a substantial degree of misallocation. They find that the gains from the efficient allocation of resources within four-digit industries would be around 45% to 127%. These results suggest the potential gains of reallocation are larger than in the USA. Busso et al. (2012b) find that improving the allocation of resources across firms could increase total factor productivity by 52.7% to 57.6% in Ecuador. Arellano (2009) also finds the existence of potential gains from the reallocation of resources, indicating that aggregate gains from reallocation of inputs in Ecuador's manufacturing sector range from 12 to 93% of aggregate value added.

Informality in Latin America and Ecuador
Informality is a characteristic that underdeveloped and developing countries present and can cause further economic retardation, taking into consideration that the misallocation of resources has a negative impact on productivity. Loayza et al. (2009) find that there is a large heterogeneity in the extent of informality in Latin America. However, informality rates are higher than in the USA, and some countries of the region are among the countries with the higher informality rate in the world. They find that the typical country in Latin America produces about 40% of GDP and employs 70% of the labor force informally. Enste and Schneider (2000) attribute the existence of high taxes and social security contributions combined with a high density and intensity of regulations in the official economy (especially on labor markets) as one of the most important causes of a high level of informality. Loayza (1999) shows that informality in Latin America and Caribbean countries is positively associated with levels of taxation and labor market regulations and negatively correlated with the strength and efficiency of government institutions. Ulyssea (2010) explains that a common feature of most Latin American countries is the restrictive labor market institutions and strict regulation of entry. In consequence, operating formally can be extremely costly for a firm and reduce the incentives for firms to operate formally; that is why Latin American countries face high informality rates. Enste and Schneider (2003) find that the informal sector represents more than a third of the global output of developing countries and around 10 to 20% of global output in developed countries. The ILO 2002 find similar results: 51% of non-agricultural employment in Latin America is informal, 48% in North Africa, 65% in Asia and 72% in Sub-Saharan Africa. Benjamin and Mbaye (2014) explain that the urban informal sector tends to absorb the rural workforce and that the informal sector has a strong female presence (60% of female workers in the developing world are in the informal sector).
Informal employment, which refers primarily to employment in enterprises that lack registration and social security coverage for their employees (OECD 2009), is high in Latin America. Gasparini and Tornarolli (2009) identify that the informal labor workforce is characterized by being unskilled and operating in low-productivity jobs, in marginal, small-scale and usually in family-based activities.
Informality is also a characteristic present at firm level in Latin American countries. Maloney (2004) explain that small-scale, semi-legal, often low-productivity, frequently family-based enterprises employ between 30 and 70% of the urban workforce in the region. He argues that small firms face higher costs, are likely to be informal and have high failure rates.
In Ecuador, 67% of firms indicate to face competition with informal firms which is higher than in Latin America (63%) and higher than in upper middle-income countries (51%) according to the World Bank (2017). These figures show that informal firms have an unfair advantage over formal firms in the country because they can avoid costs form complying with regulations. Also, 88% of Ecuadorian firms affirm being registered when starting operations, which is slightly higher than in the region (87%) and lower than in upper middle-income countries (91%).
Having this background, we characterize the Ecuadorian informal firms for the manufacturing sector in the period analyzed. We find that 20% of the firms in the Amazon are informal, 27% in the Andes, and 32% in the Coastline. We also find that from the main subsectors of manufacturing, the leather manufacturing subsector has the highest rate of informality (40%), followed by print and reproduction of recordings subsector (35%). On the other hand, we find that 32% of the small firms, 25% of medium A firms, 24% of medium B firms and 24% of large firms are informal. Hsieh and Klenow (2009) propose a model of monopolistic competition with heterogeneous firms facing distortions in the prices they observe. The misallocation of resources is caused by the distortions that produce differences in the marginal productivity of capital and labor, affecting the aggregate factor productivity (Hsieh and Klenow 2009). In the model, Y is a final good of a set of goods Y s produced by a representative firm in a perfectly competitive market, with constant returns to scale ( Y s = 1 ) and a Cobb-Douglas production function:

Empirical method
where the output of each sector Y s is produced by combining M s differentiated goods, produced by the individual firms using a CES technology. It is assumed that the elasticity of substitution is same for all industries: In the model, the production function for each differentiated product is given by a Cobb-Douglas production function, consisting of productivity (A), and inputs of capital (K) and work (L): where s is sector, i is firm, α s is the capital share 2 , and labor share is 1 − α s . The individual return of a firm is expressed as follows: where w refers to wages and R denotes the cost of capital. Two types of distortions affect the decisions of firms: output distortions ( τ Ysi ) and capital distortions ( τ Ksi ). The former by affecting production affects both capital and labor. These include high transport costs, bribes, operating costs of firms, costs of government restrictions due to the firms' size, among others. On the other hand, capital distortions increase the cost of capital. These include credit restrictions, credit conditions which differ between firms (credit history, evasion patterns), among others.
In the presence of distortions, the marginal productivity of labor and capital is determined as: There are two types of productivity: physical productivity ( TFPQ) measured by A si , and revenue productivity ( TFPR ) measured by P si Y si . In the absence of distortions, more resources would be allocated to firms with greater physical productivity. That is, in the absence of distortions, TFPR should be same among all firms in the same industry or sector. Deviations from this benchmark determine the magnitude of the distortions, which are measured through the dispersion of TFPR. TFPR is determined as: TFPR can be expressed as the geometric mean of the marginal productivity of labor and capital: A high TFPR means firms face barriers that increase products marginal of capital and work of the plant, making the plant smaller than optimal. Similarly, the aggregate TFPQ should be high in the absence of distortions, which would imply a reallocation of resources from the least productive firms to the most productive firms. However, with the presence of inefficiencies in the allocation of resources, there will be some dispersion in the distribution of the firms' physical productivities. TFPQ is determined as: To assess productivity gaps, the efficient level of TFP is calculated to compare it with the actual level of TFP. If the marginal products of capital and labor of all the firms in a given sector are equalized, the TFP of the industry (also called the TFPQ* because it is the geometric average of A si ) would be: For each industry, the TFP ratio is calculated with its efficient level, and it is added for all industries using the Cobb-Douglas method: This expression allows estimating counterfactual productivity gains in the absence of distortions, where: (2019) 8:16 The gains from reallocation of factors are given by:

Data
The micro-data used on Ecuadorian manufacturing establishments range from 2002 to 2015. 3 We use the data from the "Encuestas de Manufactura y Minería" (Manufacturing and Mining Surveys 4 ), conducted by the Instituto Nacional de Estadística y Censos (INEC). These data cover a representative sample of firms with 10 or more employees each year, and the collection unit is the firm. The variables used are International Standard Industrial Classification of All Economic Activities (three-digit ISIC), labor compensations, gross production by the establishment and capital stock. Specifically, employees' compensations consist of wages, salaries and benefits (made up of other remunerations, bonuses, profit sharing, family allowance, employer's contribution to social security and contribution to the reserve fund). The stock of capital refers to the historical value of fixed assets and their corresponding accumulated revaluation value.
We use the US capital and labor shares as a benchmark because their economy is considered to be comparatively undistorted. To obtain the US labor share, 5 we use the NBER-CES Manufacturing Industry database presented by the National Bureau of Economic Research (NBER) and the Center for Economic Studies (CES). Labor share is used as an annual average. For the years 2012-2015 where data are not available, we calculate the average growth 6 of labor, share is calculated and we project the values.
Once the productivity (both physical and revenue) of the firms has been calculated, we trim the 1% tails of plant productivity and distortions to make the results robust to outliers.

Parameters
To calculate the effects of resource misallocation will establish our key parameters. The capital rental price (R) is set at 10% (without considering the possible distortions), 5% real interest rate and 5% depreciation rate, according to the model proposed by Hsieh and Klenow (2009). The true cost of capital is (1 + τ Ksi )R , where τ Ksi are the capital distortions. In case these differ from 0, the cost of capital would be different from the 10% established. However, we must consider efficiency gains due to the reallocation of resources do not depend on R. Therefore, incorrect values for R only affect the average capital distortions, but not the reallocation gains. Because our hypothetical reforms collapse τ Ksi to their average in each industry, potential efficiency gains do not depend on R. If R has been incorrectly established, it would only affect the average capital distortions but not the liberalization experiment. The elasticity of substitution is established at σ = 3 , according to the model proposed by Hsieh and Klenow (2009). 7 In the NBER and CES databases, labor compensations omit the additional benefits and social security contributions made by the employer. According to the Income and National Products Accounts, the labor share presented in the database is 2/3 of the total labor share, which includes other forms of compensation apart from the employees' salary. So, we multiply the labor share of the NBER and CES databases by 3/2 to obtain the elasticity of the labor that will be used for the calculations. The capital share is established as 1 minus the US labor share.

Model assumptions
• The aggregate labor and capital shares in each industry are not affected by the magnitude of the misallocation when the average marginal revenue products remain constant. This property is due to the Cobb-Douglas aggregator (unit elastic demand 8 ). • We consider an aggregate stock of fixed capital. 9 • We assume that the number of firms in each industry is not affected by the scope of the inefficient allocation of resources. 10

Characterization of informal manufacturing firms
Informality is the non-compliance of a particular regulation. We measure the level of evasion by measuring the firm's social security's contribution to the IESS. The level of informality is calculated as follows: The employers' contribution to social security is 11.15% of the nominal salary required by law, according to IESS. So, the percentage of contribution to social security is set at 11.15%. 11 Formal firms contribute to the IESS the full amount required by law. Completely informal firms do not contribute in any way to the IESS. Irregular firms contribute to the IESS in a lesser extent than required by law. So that the level of informality will be 1 if (17) Level of informality = 1 − (contribution to IESS/(remunerations × percentage of contribution to social security 11 To check that the level of contribution to the IESS is 11.15%, we calculated the ratio of contribution (IESS) to the remunerations, and then the mode was obtained for each year. 8 Hsieh and Klenow (2009) argue that an industry that is 1% more efficient has a 1% lower price index and a 1% higher demand, which can be accommodated without adding or eliminating inputs. 9 The capital rental rate increases as the aggregate TFP increases so that capital would be expected to respond to the TFP variation. If the capital is endogenized, a Euler consumption equation could be used to specify the long-term rental rate (R). The output elasticity with respect to aggregate TFP would be 1/ 1 − S s=1 ∝ s θ s (Hsieh and Klenow 2009).
the firm is completely casual, 0 if the firm is formal, and between 0 and 1 if the firm is semi-formal, according to the level of evasion contribution to the IESS. 12 Using this methodology, we find that most of the firms are formal, as observed in Table 8 in "Appendix. " Of the total sample, 71% of firms are formal, while 24% are semiformal firms and 5% are completely informal firms. In addition, smaller firms have a lower percentage of formality than larger firms, 13 as indicated in Table 9 in "Appendix. "

Productivity, distortions and potential earnings
We begin by presenting the dispersion of physical productivity, which allows us to quantify the heterogeneity of productivity among firms. Subsequently, we present the dispersion of the revenue productivity which allows us to identify the existence of an inefficient allocation of resources between firms, and to prove the presence of distortions. The dispersion of capital and output distortions affecting the productive process of the firms are quantified below. Finally, we calculate the potential gains of an efficient allocation of resources among firms of the Ecuadorian manufacturing sector.

Total physical factor productivity (TFPQ)
Log ( A si M 1 σ −1 s /Ā s ), which will be called log ( TFPQ si /TFPQ s ), will allow us to evaluate the dispersion of the TFPQ. That is the differences in physical productivity between firms. Figure 1 shows the log distribution curves ( TFPQ si /TFPQ s ) for 2002 and for 2015. In our calculations, industries are defined at a three-digit ISIC disaggregation  Table 1 shows the dispersion statistics of the TFPQ for years. We can observe the dispersion in all the years studied, which indicates that certain firms produce much more than others, with the same quantity of inputs. These differences in productivity may be due to extreme variations between processes and technologies used by firms to produce and compete within the manufacturing sector. These differences may be also related to the differences in human capital or the managerial ability of business leaders.
The standard deviation of 1.20 presented in 2002 and of 1.03 in 2015 shows an inefficient allocation of resources. Likewise, we calculated the difference between the 75th percentile and the 25th percentile to evaluate the physical productivity behavior of the firms. We found this difference was 1.75 in 2002 and 1.37 in 2015. The difference between the 90th percentile and the 10th percentile of 3.15-2.69 for the year 2002 and the year 2015, respectively, is evidence of the inefficient allocation of resources in the manufacturing sector. This result shows the differences in physical productivity among Ecuadorian manufacturing firms since it indicates that firms in the 90th percentile of productivity are approximately 300 times more productive than firms in the 10th percentile.

Revenue productivity (TFPR)
Revenue productivity is the product of physical productivity and a firm's output price. In the absence of distortions, the aggregate TFPR should be equal between firms in each industry because (assuming monopolistic competition) less productive firms should produce less and charge higher prices. Without distortions, more capital and labor are allocated to firms with greater physical productivity, and fewer resources are allocated to firms with lower physical productivity. The TFPR can be expressed as an average of the marginal revenue products of capital and labor. 14 The TFPR at the industry level is TFPR s and can be expressed as a geometric average of the industry's marginal revenue products of capital and labor. 15 Misallocation of resources between firms can be calculated as the dispersion of their distribution among firms. Thus, in the absence of distortions, TFPR si /TFPR s is equal to one, implying that productive resources are allocated in more quantity to more productive firms and to a lesser extent to less productive firms. 16 If the TFPR is not equal between firms, it could be a sign of poor allocation of resources. The deviation of TFPR of a firm, from the average of the industry, would indicate the existence of distortions (Hsieh and Klenow 2009). This can be represented as TFPR si /TFPR s . When the ratio is different from one, meaning the firm faces high distortions (like taxes) and that if the distortions are removed, the firm would increase its production. That is, high dispersion levels imply potential productivity gains that can be achieved by reallocating factors between firms. Log ( TFPR si /TFPR s . will be used as a measure of inefficiency in allocating resources. Figure 2 shows the dispersion of productivity in the manufacturing sector for the years 2002 and 2015. In our calculations, industries are defined at a three-digit disaggregation level according to the International Standard Industrial Classification of All Economic Activities (ISIC), in order to compare firms that produce similar goods.  In the absence of distortions, there should be no differences in productivity between firms, so the dispersion would be 0. Greater dispersion indicates greater distortions. Table 2 provides the dispersion of annual productivity of the sector, which shows the inefficiency in the allocation of capital and labor.
The standard deviation of 0.84 and 0.71 in 2002 and 2015, respectively, shows an inefficient allocation of resources in the manufacturing sector. The difference between the 75th percentile and the 25th percentile was 1.06 in 2002 and 0.84 in 2015. The difference between the 90th percentile and the 10th percentile was 2.16 and 1.79 in 2002 and 2015, respectively. This implies that a dollar of work and capital assigned to firms in the 90th percentile is worth approximately twice as much as the same dollar assigned to firms in the 10th percentile.

Distortions
There are two types of distortions that affect the decisions of firms: output distortions ( τ Ysi ) and capital distortions ( τ Ksi ), according to Hsieh and Klenow (2009). The former affects production, thus also affecting both capital and labor. These include high transport costs, bribes and operating costs of firms, costs of government restrictions due to the size of firms, among others. On the other hand, capital distortions mean an increase in the cost of capital. These include credit restrictions, credit conditions which differ between firms (credit history, evasion patterns), among others.
As mentioned above, a greater dispersion in productivity indicates the presence of distortions and inefficiency in the allocation of resources between firms. In order to verify this in the Ecuadorian manufacturing sector, we calculate the dispersion of the firms' distortions.
We find that there is a dispersion of productivity among firms, which indicates the existence of distortions that affect the level of inefficiency in the allocation of resources between firms. In Table 3 The difference between the 75th percentile and the 25th percentile for output distortions was 0.90 in 2002 and 0.66 in 2015. The difference between the 90th percentile and the percentile 10 was 1.68 and 1.28 for 2002 and 2015, respectively.
In the case of capital distortions, the difference between the 75th percentile and the 25th percentile was 1.49 in 2002 and 1.08 in 2015. The difference between the 90th percentile and the 10th percentile was 3.00 in 2002 and 2.35 in 2015.
Both capital and output distortions show that resources are not allocated efficiently between firms. This indicates that with the reallocation of capital and labor factors, productivity gains would be obtained.

TFP gains
TFP gains for the manufacturing sector would be obtained by the efficient allocation of capital and labor. We calculated that the productivity gains might have been around 80% in 2002 and 69% in 2015, 17 as shown in Table 4. So, by equalizing marginal products between manufacturing firms by the reassignment of factors, the productivity of the manufacturing sector would have been 69% higher in 2015. It makes sense that the In this section, we have studied physical productivity, revenue productivity and distortions on manufacturing firms in Ecuador, in order to assess the existence of an inefficient allocation of resources. The dispersion of TFPQ between firms has shown the difference in physical productivity between firms in the manufacturing sector, while the dispersion of TFPR has evidenced the misallocation of factors between firms, showing the existence of distortions that affect the production process of the firms.
We have evidenced the existence of output and capital distortions, which prevent an efficient allocation of capital and labor. By eliminating the output and capital distortions, and equalizing the revenue productivity, we have been able to quantify the gains from the efficient allocation of resources within the manufacturing sector. This was done for the 3-digit industries, using the model proposed by Hsieh and Klenow (2009). We found that productivity gains would have been around 80% in 2002 and 69% in 2015. On the other hand, it is important to evaluate how the status of the informality of the firms is related to its productivity.

Productivity and informality
In this section, we study the relationship between productivity and informality. As previously mentioned, the main element of the study associated with informality is the productivity differential between firms according to their formality status. Multiple studies have indicated that firms that operate informally are less productive than firms that operate formally. Based on that, we used ordinary least squares (OLS) to compute the effect of informality on productivity.

Physical productivity and informality
Multiple studies (Taymaz 2009;Dabla-Norris et al. 2005; among others) have found that informal firms have lower physical productivity than formal firms. We used log ( TFPQ si /TFPQ s ) as the dependent variable, and formality status, informality level and fixed effects as independent variables. Table 5 shows informal firms have lower physical productivity than formal firms. The results are basically the same among the regressions that present different fixed effects. In column (5), the regression includes size, region, ISIC, and year fixed effects. We find completely informal firms are on average 42% less productive than formal firms and semi-formal firms are on average 7% less productive than formal firms. 18 , 19 This coincides with the level of informality which is negatively correlated with the physical productivity of the firms. 20

Revenue productivity and informality
Previously we found that there is a high dispersion of the TFPR, which denotes an inefficient allocation of resources among firms. It is important to remember that a high TFPR indicates a high factor cost due to the presence of distortions. According to Ma (2010), there are two main elements that explain a high TFPR: a) the presence of distortions altering the marginal revenue products of capital and/or labor, b) the presence of distortion increasing the optimal price of the products produced by the firms.
In the absence of distortions, more resources should be allocated to firms with greater physical productivity. This should be done up to the point when revenue productivity is equal between firms in the same industry. Therefore, firms that have a high TFPR face more distortions and use fewer inputs than they should use in the absence of distortions, while firms with low TFPR face fewer distortions (in many cases, they are subsidized) and use more inputs than they should.
In order to find the relationship between the presence of distortions in the firms, and the formality situation of the same, we apply an OLS regression. We use ( TFPQ si /TFPQ s ) as the dependent variable, and formality situation, level of informality and fixed effects as independent variables. Table 6 shows formal firms face greater distortions than informal firms. The results are basically same among the regressions that present different fixed effects. In column (5), the regression includes size, region, ISIC and year fixed effects. Following the heuristic interpretation of the TFPR differences presented above, the results indicate that a dollar of capital and labor allocated to formal firms is worth approximately 30% more than for completely informal firms, and 7% more than for semi-formal firms.
Having a lower TFPR than the industry average indicates that firms face fewer distortions and use more inputs than they should, and Table 6 shows semi-formal and completely informal firms face fewer distortions than formal firms. The World Bank (n.d.) argues three main reasons why revenue productivity differs between formal and informal enterprises. First, there is an asymmetry in the regulation according to the situation of formality of the firm. Second, these regulations represent taxes for formal firms and subsidies for informal firms. Third, compliance with these regulations is imperfect, which generates ease of evasion by some firms (World Bank n.d.).

Discussion: misallocation and policies
These results indicate formal firms are more productive than informal firms in the Ecuadorian manufacturing sector. Formal firms also face greater distortions than informal firms. Differences in basic conditions in which firms exist are access to credits and financial markets, taxes and obligations, social policy and labor obligations. These differences result in distinct productivity levels between firms. These elements generate distortions that prevent an efficient allocation of resources between firms. One of the most obvious causes of resource misallocation is the difference in accessibility to credit and financial markets. The difficulty to access loans prevents productive firms from expanding, prevents less productive firms to access technological improvements and/or the necessary investments that would allow them to increase their productivity (Pagés 2010). This usually happens with small or informal firms, which have difficulty accessing the financial market because they do not have a credit history or the necessary guarantees to obtain a loan (Pagés 2010).
The difficulty to access financial markets reduces the incentives of informal firms to comply with regulations (related to taxes or to labor obligations) (Eslava et al. 2010). This allows certain informal firms with lower productivity to survive because they face lower costs compared to their formal counterparts (Eslava et al. 2010). In this sense, the expansion of credit and access to financial markets would represent a contribution to the formalization of firms (Pagés 2010).
On the other hand, the expansion of credit is beneficial only if it is correctly formulated and directed (Arizala et al. 2009). However, a higher credit supply does not necessarily have a positive impact on productivity (Pagés 2010). Inefficiency in the allocation of capital and labor can be accentuated if the loans are directed toward firms with low levels of productivity (loans that may have been made by national development banks or subsidies to public credit) (Pagés 2010) For this reason, it is essential for loans to be channeled toward more productive firms or with a high productive potential (Pagés 2010). The distinction is complicated but crucial to correct the inefficient allocation of resources between firms (Arizala et al. 2009).
The second suspect in resource misallocation is the tax regime. One of the ways in which the structure of tax systems affects productivity is through the tax distinction between firms and industries (Pagés 2010). Certain industries and firms enjoy greater tax deductions or they evade tax payment, causing them to grow in greater quantity independently of their productivity, and that the allocation of productive resources is distorted (Pagés 2010).
Simplified regimes and tax exemption for small businesses also affect productivity because certain firms avoid growth not to exceed the limit that allows them to benefit from the tax regime for small-sized firms. This represents a growth constraint growth for firms (Chong and Pagés 2010). According to Pagés (2010), simplified tax regimes represent discrimination due to the firm's size, greater ease of evading tax obligations, lesser control across companies and limited information to control the payment of taxes All these elements would represent an advantage to unproductive and/or informal firms.
A tax regime in which the most productive firms face higher taxes avoids the efficient allocation of resources between firms. High taxes and inefficient control induce firms to evade their tax obligations (Chong and Pagés 2010). So, certain firms survive despite their low productivity, and the growth of high-productivity firms is restricted (Chong and Pagés 2010). It works in the same way for formal and informal firms. Formal firms face greater costs (taxes), while informal firms evade these costs.
The existence of incorrectly structured tax regimes affects the productivity of firms because it promotes the survival of unproductive firms and obstructs the growth of large and small firms. It also promotes inequality and segmentation between firms in terms of tributary obligations (Chong and Pagés 2010). Tax regimes differentiated by size, industry or based on other firms' characteristics generate distortions in the allocation of resources. These taxes also represent an additional burden for the public administration and, in turn, reduce the tax revenue (Chong and Pagés 2010). A properly structured tax regime is necessary to reduce evasion and to generate incentives for the payment of taxes. Simplification, unification and compliance with tax provisions could generate productivity gains (Pagés 2010).
Poor enforcement and incomplete coverage of social security systems is another tax downfall. The coverage of social security for employees and other labor obligations (family allowance, contribution to the reserve fund, among others) in some cases represents constraints due to the high cost it represents for employers and in many cases, also for the employees given the little use they give to this type of programs (Pagés 2010).
Some firms choose to evade the payment of social security for their employees and other labor obligations to evade the costs it represents (Kapteyn et al. 2005). This is generally related to the size and formality of the firms. Small firms and informal firms have greater incentives to evade these obligations and to incur in lower labor costs (Pagés 2010). This behavior affects the correct allocation of resources because it represents a cost for the most productive firms and a subsidy for the least productive ones (Pagés 2010).
Once we have studied the three possible drivers of misallocation, it is important to determine which of those is the main resource of misallocation in Ecuador´s manufacturing sector. Busso et al. (2013) suggest that the relationship between misallocation and firm size is useful to identify the source of misallocation. If small firms face growth constraints, this would imply misallocation of resources is due to limited access to credit and financial market failures. In this case, the average returns to an additional unit of capital or labor would be higher in small firms than in larger ones.
On the other hand, if misallocation is due to unequal enforcement of taxes, social security regulations or labor contributions, then the returns to additional factors would be expected to be lower in smaller firms. This happens mainly because non-complying firms are usually small firms. Evasion of tax or labor obligations works as a subsidy, as it helps these firms to avoid costs. Therefore, evasion helps them expand more than they would have in case they complied with all the regulations. This lowers the marginal returns of factors relative to compliant firms.
To study the relationship between marginal products of factors and firm size, we used log ( TFPR si /TFPR s ) on firms' size dummies. We established the firm's size based on the personnel employed, and the intervals were defined based on resolution 1260 of the CAN. The control group is small firms (10-49 employees). Table 7 shows the relationship between TFPR and the size of the firms, which indicates the returns of an extra unit of capital and labor decrease with the firm's size. Following the heuristic interpretation of the TFPR differences presented above, the results indicate that a dollar of capital and labor allocated to small firms is worth 8.7% more than for mediumsized A firms, 10% more than for medium-sized B firms and 19% more than for large firms.
The results show that the returns to an extra unit of capital and labor tend to decline with firm's size, which indicates that smaller firms tend to have size constraints, while larger firms appear to be subsidized. This could imply small firms have greater difficulties in accessing financing for not having a credit history or the necessary guarantees to obtain credit. Also, it could mean small firms have difficulties in compensating for the lack of credit, with evasion of taxes and labor regulations. The results indicate that in the Ecuadorian manufacturing sector, credit market constraints seem to be the most likely source of misallocation.
The literature identifies two underlying factors that cause the misallocation of resources: policy distortions and market imperfections. Policy distortions can prevent an efficient allocation of resources at levy plant-level taxes or subsidies to output or the use of production factors such as capital and labor. Idiosyncratic distortions can be generated by multiple policies which create heterogeneity in the benefits or costs faced by individual producers.
In this context, Restuccia and Rogerson (2017) identify that misallocation may be related to policy distortions that reflect statutory provisions such as tax code and regulations. These include labor, land and market regulations, as well as differentiated regulations which are applied according to the firms' characteristics. They also identify discretionary provisions as a source of misallocation. These regulations formulated by public or private institutions favor or penalize specific firms through tax breaks, subsidies, financial credit with interest rates, selective enforcement of the law, preferential market access, between others. On the other hand, market imperfections such as market frictions, monopoly power and enforcement of property rights can cause misallocation. The literature (see, among others, Buera and Shin 2013, and Caselli and Gennaioli 2013) has widely related misallocation of resources to a specific market imperfection: financial frictions in the capital market. Wu (2018) argues that financial frictions may reduce total factor productivity through two channels: preventing entry of productive firms and misallocating capital among the existing firms.
According to Busso et al. (2012b), if distortions are due to financial market failures, then many small firms would have difficulty growing because of the lack of credit or difficulty of access. If this is the case, then on average returns to additional factors would be higher in small firms than in larger ones. On the contrary, if misallocation is due to unequal enforcement of taxes, social security contributions or labor regulations, then the returns of additional capital and labor would be expected to be lower in smaller firms mainly because non-compliant firms are usually small and use regulatory evasion as a subsidy to expand (Busso et al. 2012b).
We found that the returns to an extra unit of capital and labor tend to decline with the firm's size. Following Busso et al. (2012b), this implies that financial market failures seem a more likely source of distortions in Ecuador's manufacturing sector. This implies that small firms are having trouble in accessing credit which would allow them to expand. The lack of credit history or insufficient guarantees prevents firms from acquiring credit, even if those firms are highly productive. This is especially true for small Ecuadorian manufacturing firms, which struggle to access credit because of their lack of signaling.
Although we have assessed financial market failures as one of the main causes of misallocation in the manufacturing sector by taking into consideration the returns of additional factors according to the firms, it is important to take into consideration that the causes of misallocation are a broad theme that keeps being studied by researchers. In fact, there are two main approaches that the literature has followed in its attempt to find the main causes of misallocation: the direct approach and the indirect approach. Restuccia and Rogerson (2013) recognize there is still much work to be done, some of which faces serious challenges in assessing the potential role for misallocation and the specific channels through which misallocation occurs.
Studies that focus on specific causes of misallocation have not been done yet for Ecuador. In this sense, it is important to take into consideration that even though in this paper we made a first approach of the subject, a lot of researches are still necessary to assess the causes of misallocation in the country.

Conclusion
We used the method proposed by Hsieh and Klenow (2009) to establish the relationship between informality and productivity between formal and informal firms of the Ecuadorian manufacturing sector. Informality was calculated according to the fulfillment of social security obligations.
We found differences in both physical and revenue productivity among firms in the manufacturing sector. According to our study, firms in the 90th percentile of productivity are approximately 300 times more productive than firms in the 10th percentile. In addition, we found differences in revenue productivity. These results indicate the inefficiency in the allocation of resources among firms due to the existence of distortions. Busso et al. (2013) suggest evaluating the relationship between productivity and the firm's size. To achieve this, we used an OLS regression of log ( TFPR si /TFPR s ) on size dummies. We established the firms' size based on the number of employees, and the intervals were defined based on resolution 1260 of the CAN. The control group is made up of small firms (10-49 employees). Table 10 shows the relationship between productivity and firm size, which shows large firms (more than 200 employees) are more productive than smaller firms, classified by the number of employees. Mid-sized firms A (50-99 employees) are on   average 75% more productive than small firms, medium B firms (100-199 employees) are on average 144% more productive than small firms, and large firms are 284% more productive than small firms. That is, large firms are approximately 300% more productive than small firms.

Robustness check
In order to check the model's robustness, we changed certain parameters used in the model. We take into account two different scenarios: a greater elasticity of substitution ( σ = 5) and a participation of capital and labor of the Ecuadorian manufacturing sector ( α s = 0.15 and 1-α s = 0.85, respectively). 21 We also used the initial parameters as benchmarks to contrast the results. Table 11 shows the dispersion of firms' physical productivity decreases when we assume intermediate inputs approach perfect substitutes. When the resources of the Ecuadorian manufacturing sector's participation are taken into consideration in place of the shares of the US manufacturing sector, results remain very similar in relation to the benchmark's results.
In Table 12, we can observe that the change in the elasticity of substitution does not affect in greater quantity the results of the dispersion of TFPR of the benchmark. We can also verify that there is a change in the results obtained through the use of local participation. However, there are no greater changes in the results, which indicate the results are resistant to changes in the assumptions of the model.
In Table 13, we see changes in the elasticity of substitution and shares do not affect the dispersion results in the output's distortions a lot, compared to the benchmark. This indicates the robustness of the results against changes in the parameters of the model. In Table 14, we can see the change in the elasticity of substitution and shareholdings do not affect in greater quantity the results of the dispersion of the capital distortions compared to the benchmark. This indicates the robustness of the results, with the changes in the parameters of the model. Table 15 shows the results obtained from potential gains from the efficient allocation of resources, both for the benchmark and for the change of parameters used in the calculation. We can see the potential gains from the efficient allocation of resources were greater by altering the elasticity of substitution and less by altering the shares. These  results match with Hsieh and Klenow's (2009), who found that productivity gains are sensitive to the elasticity of substitution 22 and to capital and labor shares.

Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.