Sources of Productivity Growth in Uganda: The Role of Interindustry and Intra-Industry Misallocation in the 2000s

Uganda's growth in gross domestic product of the 2000s was accompanied by high growth rates of labor productivity across industries producing tradable goods and services. This came about primarily as a result of investment in equipment and other fixed assets, but also entailed substantial gains in total factor productivity Based on data from two waves of the Uganda Business Indicators survey this paper estimates that economy wide aggregate labor productivity and aggregate TFP grew at average annual rates of 13 t and 3 percent, respectively between survey years 2002 and 2009. Part of the growth in productivity on each measure reflected gains from technical progress made at the establishment level and within narrowly defined industries. But it was also in part the outcome of reallocation of labor and capital within as well as across industries. In particular, the paper estimates that about one-fifth of the aggregate growth in labor productivity between the two years reflected the shifting of labor toward industries and sectors where it was more productive on average and at the margin. The rest of the observed growth in labor productivity reflected gains made within narrowly defined industries. But almost in every case 55 to 90 percent of the observed "within industry" growth in labor productivity represented allocative efficiency gains from the correction of intra-industry inter-firm misallocation of labor. The balance of the observed within-industry growth in labor productivity represented establishment-level gains in technical efficiency.


Policy Research Working Paper 7909
This paper is a joint product of the Trade and Competitiveness Global Practice Group and the Macroeconomics and Fiscal Management Global Practice Group. It is part of a larger effort by the World Bank to provide open access to its research and make a contribution to development policy discussions around the world. Policy Research Working Papers are also posted on the Web at http://econ.worldbank.org. The corresponding author may be contacted at tmengistae@worldbank.org.
Uganda's growth in gross domestic product of the 2000s was accompanied by high growth rates of labor productivity across industries producing tradable goods and services. This came about primarily as a result of investment in equipment and other fixed assets, but also entailed substantial gains in total factor productivity Based on data from two waves of the Uganda Business Indicators survey this paper estimates that economy wide aggregate labor productivity and aggregate TFP grew at average annual rates of 13 t and 3 percent, respectively between survey years 2002 and 2009. Part of the growth in productivity on each measure reflected gains from technical progress made at the establishment level and within narrowly defined industries. But it was also in part the outcome of reallocation of labor and capital within as well as across industries. In particular, the paper estimates that about one-fifth of the aggregate growth in labor productivity between the two years reflected the shifting of labor toward industries and sectors where it was more productive on average and at the margin. The rest of the observed growth in labor productivity reflected gains made within narrowly defined industries. But almost in every case 55 to 90 percent of the observed "within industry" growth in labor productivity represented allocative efficiency gains from the correction of intra-industry inter-firm misallocation of labor. The balance of the observed within-industry growth in labor productivity represented establishment-level gains in technical efficiency.

Motivation and broad objective
In a recent paper Ahmed et al. (2015) show that Uganda's economy underwent significant structural transformation in the 2000s. The change involved a 7 percentage point rise in the employment share of production of non-tradable goods and services and a 12 percentage point increase in that of microenterprises in retail trade and other services at the expense of SMEs and larger firms in manufacturing, commercial agriculture and tradable services. Economy wide aggregate productivity also grew: labor productivity increased at the rate of 13 percent a year, of which about 3 percentage points represented gains in total factor productivity (TFP). This could only have been a major factor in the high GDP growth rate the country achieved over the decade. But it also belies that the growth in the employment share of microenterprises did in fact reduce aggregate labor productivity since output per worker was typically much lower in microenterprises than it was in SMEs and larger establishments across all sectors of the economy. Similarly, in and of itself, the growth in the employment share of the production of non-tradable goods and services could only have reduced aggregate labor productivity economy wide since labor productivity has been consistently higher in the production of tradable goods and services in our data.
In this paper we try to identify some of the sources of the productivity gains that more than offset losses from the rise in the employment shares of microenterprises and of the production of non-tradables in Uganda's economy over the decade. One such source could have been the firm life cycle effects associated with a third aspect of the observed structural transformation, namely, employment shifts across the age distribution of enterprises whereby the share of longer established firms rose sharply at the expense of that of younger ones and startups. However, far from countering the productivity losses due to increasing employment of microenterprises, the increased relative concentration of employment in longer established firms in fact reinforced those losses as younger firms happened to be significantly more productive across industries.
It thus looks that neither the internal dynamic economies of scale nor the learning effects that are likely to be associated with shifts in employment shares across the size and age distribution of firms can be invoked to fully account for the productivity gains that partly drove Uganda's economic growth in the 2000s. The broad objective of the paper is to measure basic components of the productivity gains at issue along the other dimensions of the observed structural transformation as a step towards uncovering policy related underlying factors. Specifically, the paper seeks to measure the following: (a) the relative shares in ( two-digit ISIC) industry level aggregate labor productivity growth of "within industry" productivity growth at the four-digit ISIC level and allocative efficiency gains from inter-industry reallocation of labor and capital also at the four-digit ISIC level (b) the relative contributions to (two-digit ISIC) industry level aggregate TFP growth of "within" industry TFP growth at the four-digit ISIC industry level and allocative efficiency gains from interindustry reallocation of labor and capital also at that level; and (c) the relative shares in the four-digit ISIC industry aggregate productivity growth of " within-firm" (or within establishment) and allocative efficiency gains from intra-industry, reallocation of market shares (and hence of labor and capital) between firms within each four-digit ISIC industry. 3 The proposed measurement would help quantify the effects that specific policy interventions or particular exogenous developments in domestic or international markets and related institutions might have had on aggregate productivity growth in Uganda in one of two ways. Interventions in markets or market-related institutions can facilitate or impede technical progress by influencing firms' incentives for innovations and technology adoption. They can also induce or correct the misallocation of labor and capital across and within industries in as far as they distort or rectify the relative prices firms take into account in deciding where and how much to invest.
To the extent that the first of these happened its effects on aggregate productivity growth would be reflected in measures of "within firm" productivity growth as well as those of "within industry" productivity growth that the paper uses to carry out under tasks (a), (b) and (c) above. Similarly, the aggregate productivity effects of policy induced distortion to market prices or corrections thereof would be reflected in the measures of the shares of intra-industry and inter-industry misallocation in productivity growth that we are reporting here also under the three tasks. The paper presents estimates on these measures, which should provide the reader with a sense of the scope for further productivity growth that might have existed by the end of the decade in important parts of Uganda's economy in as far as they quantify the cost of policy distortion at the time in terms of lost productivity in specific industries of the economy. However, the paper stops well short of identifying the exact policies that are behind the distortions at issue or the remedies that they would call for, which is the subject of a separate paper in its own right.

Data: The structure of Uganda's economy in the 2000s
All of our data come from the 2002 and 2009 waves of the Uganda Business Inquiry (UBI), which is a sample survey of business establishments that the Uganda Bureau of Statistics run at the time as part of the data feeding into the National Accounts. The UBI surveys were designed to covers all business establishments employing 10 or more people and collect information on business fixed assets, employment, purchase and sales transactions, products and processes, on which the indicators of productivity reported in the paper are based. The 2002 and 2009 waves covered about 4,700establishments each sampled from more than 326 four-digit International Standard Industrial Classification (ISIC) industries.
Both waves were based on sampling frames drawn from the Uganda Business Registry (UBR), a census of all business establishments across the country, of which there had been three waves since 2001. This included UBR 2001 and UBR 2010, which were the basis for the characterization in Ahmed et al. (2010) of the structural transformation that Uganda's economy underwent in the 2000s. Indeed the sample of UBI 2002 was a multi-stage stratified sample drawn from the same listing of enterprises as the census listing of UBR 2001, which listed nearly 165,000 business enterprises across the country. Likewise, the sample of UBI 2009 was also a multi-stage stratified sample drawn from the same listing of enterprises as UBR 2010, listing a little over 458,000 establishments nationwide.
For the purpose of this paper, the most basic divide among the 132 four-digit ISIC industries of the production of non-tradable goods and services is that between the 42 "upstream" four-digit ISIC industries providing inputs to the rest of the economy in the form of physical infrastructure and other services, and the 90 four-digit ISIC "downstream" services meeting domestic final demand including domestic wholesale and retail trade and a range of public, social and household services ( Table 4). The upstream industries include four industries in construction and 35 industries in real estate and the provision of business services. In 2009, value added per worker in upstream industries was less than one-third of that in the production of tradable goods and services but 36 percent higher than that in "downstream" industries of the production of non-tradables. Total factor productivity in the production of tradables was also slightly higher that year in the upstream industries than in downstream ones. 5

Exporting vs. import competing industries
Apart from the divide between agriculture, manufacturing and services, our analysis of productivity growth in tradable goods and services focuses on the dichotomy between what policy makers and experts in Uganda deemed "comparative advantage industries" at the time and the rest of the sector, that is, "comparative disadvantage" industries. The former consisted of industries that were either already exporting or were believed to have the potential to export, while the second group included industries that were import competing and were not believed to have any prospects of being exporters in the foreseeable future. The classification of specific industries into either of the two categories is based on data on revealed comparative advantage indices and related cost data and is discussed in Ahmed et al. (2015). At the time official policy classified the following as comparative advantage industries within manufacturing: food and beverages, tobacco products, textiles, garments, leather and leather products, coke, refined petroleum products, and basic metals. The industries that were likewise classified in agriculture were crop and animal production, and fishing and aquaculture. In mining, the comparative advantage industries were extraction of crude petroleum and natural gas, and mining of metal ores. In services they included land transport, transport by pipelines, water transport, and electricity. 2 Of the 194 four-digit ISIC industries that the UBIs covered in the tradable sector, 70 were deemed comparative advantage industries. These were distributed across 35 three-digit ISIC and 15 two-digit ISIC industries. Forty of the 70 comparative advantage industries were in manufacturing, 15 in agriculture, 4 in mining, 7 in transport and communication, 3 in utilities, and one is financial and business services ( Table 3). The manufacturing sector also included 60 four-digit ISIC comparative disadvantage industries spread across 57 three-digit and 25 two-digit ISIC categories. Similarly commercial agriculture included a total of 19 industries. In 2009 annual value added per worker was 27 percent higher in comparative advantage industries relative to that in the production of tradable goods and services as a whole, but total factor productivity in those industries was also less than half of that for the sector as a whole (Tables 2 and 3).

Summary of findings and organization of the paper
Section 3 of the paper provides details of our main findings, following an account, in Section 2, of the empirical and theoretical framework of the particular approach to productivity decomposition that we have chosen to use, namely, the dynamic Olley-Pakes decomposition of Melitz and Polanec (2012). The picture of Uganda's economy in the 2000s is one of high rates of labor productivity growth across most industries producing tradable goods and services-mainly through investment in equipment and other fixed assets, but also thanks to substantial TFP growth across industries. At the same time there was steep decline in labor productivity within the non-tradable sector in spite of significant TFP gains. This can only imply rapid de-accumulation of fixed assets in that sector. The balance between these two sectoral productivity trends was such that aggregate labor productivity grew at an economy wide average rate of a little more than 13 percent a year with a corresponding annual TFP growth rate of 3 percent.
We also find that about one-fifth of the growth in economy wide aggregate labor productivity represented allocative efficiency gains in the form of the reallocation of resources across industries and 6 sectors over the period in question. On the whole, labor as well as capital shifted from industries and sectors where labor productivity was lower to those where it was higher, which inevitably pushed up economy wide aggregate labor productivity by reinforcing the effects of "within" industry growth in productivity. The latter accounted for four-fifths of the 13-percent a year growth in aggregate labor productivity. The TFP growth we report likewise had a "within-industry" component as well as one of gains from inter-industry "reallocation" of labor and capital. We find that the "within-industry" component of TFP growth was even more consistently positive across industries than the "within industry" component of labor productivity growth. But we also find that inter-industry reallocation actually reduced TFP growth by offsetting within -industry productivity growth rather than reinforcing it as labor and capital were being reallocated away from industries where TFP was higher rather than lower. There is indeed a pattern throughout the economy whereby "within-industry" TFP gains are typically offset by TFP losses via "between industry" reallocation while "between industry" reallocation is consistently leading to gains in labor productivity that reinforce "within industry" labor productivity growth economy wide as well as within broad sectors of the production of tradable goods and services as those of the production on non-tradable goods and services.
Looking at sectoral patterns, three results clearly stand out. The first is that the period in question saw decline in aggregate labor productivity in the production of non-tradable goods and services at a rate of 1.7% a year. This means that the 13% economy wide growth rate of aggregate labor productivity would understate that of the production of tradable goods and services, our estimate of which is in fact about 19% a year. Secondly, inter-industry reallocation of labor and capital was an important source of labor productivity growth in the production of tradable goods and services, where it accounted for 20 percent of the observed growth, but its relative share was even higher in the decline of labor productivity in the production of non-tradables. Thirdly, aggregate TFP grew three times as fast in the production of tradable goods and services as it did in the production of non-tradables.
Within the production of tradable goods and services, aggregate labor productivity grew at the rate of 25% a year in comparative advantage (or exporting) industries, which was higher than the sector wide average by nearly one-third. However, very little of this growth represented gains from inter-industry reallocation and was a result exclusively of higher within-industry growth rate of labor productivity in those industries relative to the rest of the tradable sector. This means that the relatively high share of allocative efficiency gains in the aggregate labor productivity growth rate of the tradable sector as a whole must have been limited almost entirely to import competing (or comparative disadvantage) industries.
To investigate the issue of what drove within-industry productivity growth, we analyze establishment level productivity difference in a selection of four-digit ISIC industries. The main finding here is that, in the production of tradable goods and services as well as in that of non-tradables , intra industry, interfirm reallocation of market shares-and, ultimately of labor and capital-was a more important source of "within industry" growth in labor productivity than "within -firm" gains in technical efficiency. Indeed we estimate that the share of intra-industry inter-firm reallocation in "within-industry" growth in labor productivity was in the range of 55 % to 90%. 7

Intra-industry decomposition
We obtain the results we report in Section 3 by applying the Olley -Pakes decomposition of aggregate productivity growth to the UBI survey data at various levels of aggregation as defined in the International Standard Industrial Classification (ISIC) of the UN. The decomposition technique we use was first proposed in Melitz and Polanec (2012) as a dynamic extension of the static decomposition equation that Olley and Pakes (1996) used to analyze the relationship between market structure and productivity in a comparatively homogeneous and narrowly defined industry 3 .

8
This states that the aggregate productivity of a given industry during any period is increasing in the average "within firm" productivity, t p , and is also higher the greater are the market shares of more productive firms within the industry. The industry's aggregate productivity is higher relative to that of comparators' the higher is its average "within-firm" productivity, t p , and the greater is the correlation between firm level productivity and market share in the industry.
This in turn has direct implication for the analysis of sources of growth in the aggregate productivity of the industry over the time interval between the two surveys, which is that any given source can only operate in one or both of two ways. One is by influencing the growth of average within-firm productivity. The second is by increasing or reducing the correlation between market shares and firm level productivity.
Our data cover only two time periods (corresponding to the two UBI survey years) so the time range is limited to 2 , corresponds to year 2009. Equation (2) means then that the growth in the aggregate productivity of an industry is given by This is the basic equation of the Olley-Pakes decomposition of productivity growth (as opposed that of productivity levels) proposed in Melitz and Polanec (2012) in terms of the relative contributions of technical change and inter-firm reallocation of market shares measured respectively by the ratios cov . 5 5 In relating equation (3) to alternative decomposition techniques it is useful to note t P  can also be expressed as Here aggregate productivity growth is expressed as the sum of a component due to changes in within-firm productivity captured by the first term, and a component due to changes in the distribution of market shares across firms, measured by the second term. The relative share of the within firm productivity growth in aggregate productivity growth in terms of (3b) is the , which has the same sigh as . This complements the relative share of changes in the distribution market shares, which is given by , which in turn has the same sign as Increases in t p would often reflect technical change at the level of the firm that could be brought about by the deployment of more or better plant and equipment, better organization or management, or increases in skills of the workforce, any of which could in itself benefit from or even originate in industrywide or economy wide technological spillovers. On the other hand, increases in the correlation between firm level productivity and market shares would necessarily entail reallocation of market share from less productive firms to more productive ones, which in turn would require a reallocation of labor, capital and other resources in the same direction.
The reallocation partly occurs across incumbent firms operating throughout the period of observation but also happens in large part through churning, that is, through a simultaneous process of entry and exit in and out of the industry, which in turn would raise the covariance between productivity and market share if, for example, exiting firms are less productive than survivors and new entrants all else given. Indeed, if we were to assume that the distribution of market shares between incumbent firms remained constant across time periods, an increase in the correlation between market share and productivity at the industry level would occur only through a process of entry and/or exit, and would require that exiting firms are less productive as a group than survivors, and/or that new entrants as a group are more productive than incumbents. This follows from the fact that aggregate industry level productivity at time 1  t can also be expressed as a market share weighted average of the aggregate productivity, I P 1 , of firms that would continue to operate in the next period, t=2, and the aggregate productivity, x P 1 , of firms that would not have survived that long and would have exited the industry by t=2, that is, as This delineates two components, namely, one consisting of growth due to increase in the productivity of incumbents (or survivors from the last period) and a second consisting of the aggregate net productivity gain from the entry and exit of firms between the two periods.
Writing the first term on the right hand side of (6) as the difference between respective sums of unweighted means and co-variances of market share and productivity among incumbent leads to the dynamic Olley -Pakes decomposition formula of Melitz and Polanec (2012): The decomposition separates out four distinct sources of aggregate productivity growth, namely (1) Net productivity gains from entry, measured by the excess of the average productivity of entrants over that of incumbents , (2) Net productivity gains from exit, measured by the excess of the average productivity of survivors over that of exiting firms,   X I X P P s 1 1 1  (3) "within firm productivity growth", that is, productivity gains from firm level technical change from incumbents, measured by I p  (4) Productivity gains from the reallocation of market share from less productive incumbents to more productive one, measured by Unfortunately, none of these four can be identified in the Uganda data being analyzed here as we are unable to match firm id numbers between the 2002 and 2009 waves of the UBI survey. The decomposition is nonetheless very useful as a guide to our interpretation of the UBI data from the perspective of evaluating the contribution of intra-industry misallocation in industry level productivity growth based solely on   it it p s , cov  , which we do observe, relative to that of firm level technical change as measured by, t p  , which we also observe. The decomposition given by (7)  had been a major source of the growth of aggregate productivity in a given industry would signify the occurrence of quite interesting developments in the structure of the industry that could have implications for the structure or performance of the broader economy.
Thus substituting the right hand side of equation ( which shows that the total productivity gain from the correction of intra-industry misallocation comes only in part from the gains from reallocation among incumbents/survivors, , depending as it does also on two other factors. These are productivity gains from entry and productivity gains from exit measured by the last three terms on the right hand side of the equation. Not surprisingly the effect of entry and exit itself on productivity gains from reallocation, that is, on   it it p s , cov  , depends on the quality of entry and exit in terms not only of the productivity of entrants and exiting firms relative to incumbents and survivors, but also on the distribution of market shares on productivity among entries and exiting firms. Thus writing out the aggregate productivity of the group of entries and that of the group of exits in terms of "within firm" and "covariance" components leads to   (a) The rate of entry measured relative to the total number of firms -that is, The excess of average within -firm productivity of entrants over that of incumbents, that is, The excess of average within-firm productivity of incumbents over that of exiting firms, that is,   , among incumbents over that of exiting firms, s , cov  would always mean an increase in at least one of those seven quantities on a scale that would more than offset productivity losses from decline in one or more of the other six.

Sector level or economy wide decomposition
The Olley-Pakes decomposition was initially introduced and used to analyze the role of intra-industry reallocation (of resources and market shares) as a source of aggregate industry-level productivity growth. However, it can also be applied at higher levels of aggregation of economic activity including the national economy understood as a collection of broad sectors of activity (such as agriculture, mining, manufacturing and services) and any of one of those sectors, in turn understood to be a collection of large numbers of similar but distinct industries such as those defined by the second, third, and fourth digit level of the ISIC but with appropriate re-interpretation of the economic content of each element of the decomposition and of its drivers.
Indeed it seems to be well suited for assessing the role of economy wide or sector level structural change as a source of aggregate productivity growth. For example, in the context of economy wide structural change, the decomposition of equation (3) provides direct measurement of the share of aggregate productivity growth that should be attributed to "structural change", that is, to reallocation of output (and hence of labor, capital and other inputs) from less productive sectors to more productive sectors. For the interval between any two periods this share would be given by where, in this case, i indexes industries rather than firms, while the first term, p  , provides the share of "within -industry" productivity growth.
If the Olley-Pakes decomposition of equation (3) is applied at the broad sector level -say, to analyze the growth of aggregate manufacturing productivity -then the reallocation at issue would be between manufacturing industries (at the 2-digit, 3-digit or 4-digit level) and the distinction would be between a "within industry" component and one of inter-industry reallocation from low-productivity manufacturing industries to high-productivity manufacturing industries (as for example, from "low tech industries" to "high-tech industries"). This framing can also be extended to analyze the implications of the growth of "export industries" or "comparative advantage industries" to the growth of manufacturing productivity.
When the decomposition of equation (6) or equation (7), is applied at the level of the sector, say, manufacturing, rather than the firm, the unit of observation that i indexes is the industry rather than the firm, the sector, rather than the industry, now being the highest level of aggregation. Obviously entry and exit would not be appropriate concepts for describing what they would in the standard setting of the intra-industry decomposition, where the firm is the only unit of observation. But those same concepts should have useful analogues when the industry is the unit of observation. The analogue to the concept of "entry" could thus be that of a "new industry" (=New), which would refer to an industry that has not existed before but has started to register a significant share of sectoral employment and output for the first time during the accounting year of interest. Similarly the analogue to firm or producer "exit" when the industry is the unit observation could be that of the "dying" or "sunset" industry" (=SS), that used to be a significant employer before the accounting year of interest, but is not any longer. And the analogue to the category of "incumbent" or "surviving" firms could be that of the established industry (=Est). We may then rewrite equation (7) in terms of notation that is more appropriate for this setting as The meaning of the four components of the right hand side of the decomposition would then be as follows (1) The first component , , now measures the increase in the unweighted mean of industry level --as opposed to firm level--and captures " the within industry" component of the growth in the manufacturing sector's aggregate productivity corresponding to the "within firm" productivity growth in the context of intra-industry decomposition of the growth of aggregate industry at the level of the industry rather than the sector; (2) The second component, , measures the contribution of structural change to aggregate manufacturing (sectoral) productivity growth, that is, captures the growth in manufacturing productivity growth through the reallocation of resources from less productive manufacturing industries to more productive ones; (3) The third component, , measures the contribution of (the emergence of) new manufacturing industries to manufacturing productivity growth in general, which is a form of sectoral productivity gains from structural change; (4) So is the fourth component, , which captures sectoral productivity gains from the reallocation of resources away from dying manufacturing industries.

The theory of intra-industry, inter-firm misallocation and aggregate productivity growth
In the final analysis the size of the reallocation component, cov , of aggregate productivity growth in a given industry is determined by the scale of intra-industry inter-firm misallocation of labor and capital, the correction of which is giving rise to it. Several relatively recent and well known papers provide a theoretical framework for that notion by modelling a variety of forms of market distortion -such as industry specific taxes-operating at the level of the individual industry but in a general equilibrium setting of imperfect competition where the distortions might have significant inter-industry spillovers beyond those they might be targeted at de jure. The papers by and large share the motivation and basic structure of the model of Hsieh and Klenow (2009), a model that is a particular "specialization" of the Melitz (2003) model to that of a closed economy, and one the basic predictions of which have distinct implications in terms of the Olley-Pakes decomposition of aggregate productivity growth. The main elements of Hsieh-Klenow model are : a) inherent inter-firm differences in technical efficiency (due to differences in access to technology or know-how); b) monopolistic competition in product markets, whereby producers of a differentiated product have a limited degree of freedom in setting the price they charge for their brand or variety; c) competitive factor markets, where everyone is a price taker; and d) idiosyncratic implicit/ explicit taxes in product or factor markets that distort the allocation of factors and market shares across producers, that is, inject misallocation of resources and market shares into the equilibrium of the model.
The model provides an underlying structure for the covariance term of the static Olley-Pakes productivity decomposition of equation (2), in the sense that more technically efficient firms have higher market shares as well as higher shares in aggregate employment than other firms within each industry. It also directly links the covariance term of the decomposition to the distortions in the prices that firms face in output and inputs markets in the form of idiosyncratic implicit or explicit taxes or subsidies on output or on inputs. Specifically it predicts that a firm's market share and workforce are both smaller the higher are the price distortions it faces in output and input markets. As a result the distortions end up reducing aggregate physical productivity as well as aggregate revenue productivity of individual industries and the economy as a whole by inducing the misallocation of market shares across the productivity distribution of firms within each industry and of resources and output across the productivity spectrum of industries. But the other side of this is that the removal of the distortions and the misallocation associated with them are potential sources of aggregate productivity growth in individual industries and economy wide as well as of inter-industry and intra-industry reallocation of labor and capital that would bring about the growth in productivity.
The misallocation is measured relative to the optimal allocation that would occur in the absence of the distortions, which would be characterized by the equalization of the marginal revenue productivity of each factor input between all producers within and across industries at parametric input and output prices. The misallocation arises when the mechanism for equalizing marginal factor productivities across producers fails as the taxes/subsidies drive a wedge between marginal revenue factor productivities and the corresponding factor prices to produce an equilibrium at which everyone is producing and employing well above or well below what it would have without the taxes/subsidies, the shortfalls or excess being higher for producers for which the underlying implicit taxes/distortions are higher.
A key prediction of the model is that for each industry aggregate total factor productivity (TFP) under equilibrium is higher the higher is the average level of technical efficiency of all firms in the industry and the smaller is the variance in the tax or subsidy rates that firms face. And the higher is the variance of distortions across firms, the higher is the variance of the marginal revenue productivity of each factor across firms. It can indeed be shown that the higher is the variance of marginal revenue factor productivities across firms, the higher is the variance of total factor revenue productivity across firms and the lower the covariance between technical efficiency of each firm and its market share as would be captured by the covariance term ) , cov( it it p s of the static Olley-Pakes decomposition of equation (2).
This inverse relationship between the covariance term of the Olley-Pakes decomposition of aggregate productivity and dispersion in marginal factor productivities is also an implication of the growth model set out in Restuccia and Rogerson (2008). Like the Hsieh-Klenow model, this is also a general equilibrium model of inter-industry resource allocation under monopolistic competition among firm with inherent differences in technical efficiency that are price takers in all factor markets subject to idiosyncratic distortions (i.e., implicit or explicit taxes or subsidies). But it is one in which entry and exit are directly taken into account. In this model too the distortions reduce aggregate TFP by generating misallocation of factors across firms as manifested by inter-firm dispersion in marginal factor productivities. Restuccia and Rogerson (2008) estimate that misallocation of this kind could reduce aggregate productivity in an economy by 30 percent to 50 percent, which is comparable to what Hsieh and Klenow (2009) estimate that the economies of China and India must have been losing in aggregate productivity on same grounds over reference period of the data analyzed in their paper.
What kind of policies are likely to generate productivity losses of that scale? Restuccia and Rogerson (2008) identify half a dozen broad categories of such policies, namely: 1) a credit system based on noncompetitive banking or financial institutions; (2) a non-competitive system of award of government contracts to the private sector; (3) corruption in the enforcement of the regulation of economic activity ; (4) various forms of regulation of pay and employment and work conditions; (5) various forms of taxes or duties or restrictions on foreign trade; (6) administrative or non-competitive provision of access to serviced land or infrastructure, and so on.
Perhaps the best known of other papers modelling policy induced misallocation as a major source of aggregate productivity growth along the same lines as Hsieh and Klenow (2009) and Restuccia and Rogerson (2008) is Banerjee and Duflo (2005), which also provides a broad framework for the analysis of the misallocation in general. 6 Several other papers on the theme focus on one of the six categories of distortions listed above, including Beura et al. (2011) and Midrigan and Xu (2014), on productivity losses due to credit market distortions, Brandt et al. (2012) on productivity losses due to state subsidies to specific sectors and Barseghyan and DiCeio (2011) on entry regulation as a source of distortions. 7 Equation (10) implies that an increase in the rate of entry into an industry would necessarily boost the industry's aggregate productivity simply by raising the covariance term, , of the Olley -Pakes decomposition even if incumbents were exactly as productive as new entrants. It also means that an increase in the exit rate from the industry would have the same effect on aggregate productivity, again regardless whether there were productivity gaps between exiting firms and survivors. These are results that could be explained in terms of the model set out in Barseghyan and DiCeio (2011), which is a finite span of control model of production with a constant returns to scale technology but one with entry by ex-ante identical firm but subject to a non-recoverable cost of entry. But post entry firms exhibit inherent differences in productivity as in Hsieh and Klenow (2009) and a key prediction of the model is that the higher is the cost of entry the lower will be aggregate productivity. This is because higher sunk costs of entry mean less competition would exist for existing factor supplies as fewer firms would actually decide to enter, which in turn would bid down factor prices thereby reducing the minimum productivity threshold for entry and thereby reducing the productivity of the marginal firm. This in turn "sullies the pool of producers" by allowing less productive firms that would not otherwise be viable to operate.

The theory of inter-industry misallocation, structural change and aggregate productivity growth
The papers by Buera et al. (2011) and Midrigan and Xu (2011), deal with a specific category of distortions, namely, those arising from the fact that firms, like households, differ very much in the ease and cost of access to finance and hence in the liquidity constraints they face in making decisions on entry or on post entry production and investment. They also share the theme that such differences reduce aggregate productivity in one or more of the following ways: (a) by leading to the misallocation of entrepreneurial talent between sectors or between production activities; (b) by generating misallocation of capital between production activities; or (c) by impeding entry or the adoption of new technology. In other words, they both model misallocation along the lines of classical models of economic duality or segmentation-e.g., Lewis 1954, Fei and Ranis 1961, and Baumol 1967 as the basis of sustained aggregate productivity growth in the course of structural change. 8 In Midrigan and Xu (2014) the economy constitutes a duality between a traditional, low-productivity, small scale or "informal" sector and a "modern" large scale sector, and misallocation arises along that duality as well as within the modern sector. In Buera et al. (2011) the duality is along the manufacturing vs. services divide and the focus is on the measurement of productivity losses due to misallocation along that divide as well as that within the manufacturing sector.
The duality in the model in Midrigan and Xu (2014) is essentially between an unproductive, free entry sector using labor as the only factor input and a modern, productive sector, "manufacturing", where there is significant cost of entry and post entry and follow up investment in plant and equipment is subject to idiosyncratic borrowing constraints. The model predicts that an increase in the scale of the constraint reduces the number of producers as well as the average quality of producers in the modern sector, which would reduce the "within firm" component as well as the covariance term of the Olley-Pakes decomposition of aggregate productivity of the modern sector -per equations (2) and (3). Moreover, the inter-firm differences assumed to exist in borrowing constraints to post entry fixed investment generate corresponding differences in the marginal revenue productivity of capital, which in turn makes aggregate productivity less than what it would be if borrowing constraints were the same for everyone.
By fitting their model to data from Korea, China and Colombia, Midrigan and Xu (2014) estimate that disparities in borrowing constraints can reduce aggregate TFP by as much as 40 percent. They also conclude that as much as 80 percent of this productivity loss comesfrom disparities in borrowing constraints impeding "entry and technology adoption decision", which would manifest itself in a decline in the "within firm" component of the dynamic Olley Pakes decomposition of aggregate productivity. On the other hand, they estimate that aggregate productivity losses due to borrowing constraints injecting greater dispersion in the marginal revenue productivity of capital would be in the range of 5% to 10%, which would be reflected in a decline in the covariance component of equation (3).
As in Midrigan and Xu (2014) misallocation in the Buera et al. (2011) model arises from the effects of disparities in financing constraints on the scales of operation of incumbents and survivors as well as on the decision on entry or exit and, through that, on the talent distribution of operators in a given industry. The disparities occur along the divide between a modern "manufacturing sector" characterized by large scale production dependent on external financing and a traditional "service sector" exclusively of self-financing small scale operators.
Here also the main prediction is that the disparities in financing constraints reduce aggregate labor productivity and aggregate TFP economy wide as well as within "manufacturing" through four distinct mechanisms, namely, (a) by generating misallocation of capital among operating (or incumbent) firms ; (b) by lowering the quality of the pool of entrepreneurs operating over any given period; 8 Ahmed et al. (2015) review the interaction between aggregate productivity growth and inter-industry allocation in the context of more recent developments in the theory of structural change including Echevarria (1997), Ngai and Pissaradis (2007), Duarte and Restuccia (2010), Herrondorf et al. (2013) and others.
(c) by distorting the number and scale of establishments in the economy given the distribution of entrepreneurial talent in the economy; and (d) by distorting the distribution of entrepreneurial talent across the "manufacturing" vs. "services" divide.
This is a prediction about the effect of intra-industry misallocation on aggregate productivity within each industry as much as it is about the role of inter-industry differences in technology and disparities in financing constraints on economy wide aggregate productivity growth. By fitting the model to large scale establishment level dataset on the US and Mexico, Buera et al. (2011) find that disparities in financing constraints reduce aggregate TFP in the "manufacturing " sector as well as in "services". However, while the productivity loss in "manufacturing" primarily occurs through the misallocation of entrepreneurial talent, 90% of the loss in the service sector turns out to be due to the disparities leading to the misallocation of capital within the sector.
In concluding this section, it is worth noting that, while the focus of the models in Hsieh and Klenow (2009) and Restuccia and Rogerson (2008) is on intra-industry inter firm misallocation as a source of aggregate productivity growth, both do have a rich set of implications about the interaction between structural change and aggregate productivity growth that are consistent with those Beura et al. (2011) and Midrigan and Xu (2014). Indeed one could argue that the Hsieh-Klenow model is in a significant sense one of structural change that is as well suited for analyzing inter-industry misallocation as a source of aggregate productivity growth as it is for analyzing that of intra-industry misallocation.
For example, one implication of the model is that major institutional or policy reforms that have the effect of reducing distortions (again in the form of implicit or explicit taxes or subsidies) in output markets in some sectors more than they do in the rest of the economy have the potential to trigger instances of structural change that would draw employment from the rest of the economy to those sectors. This follows from the fact that, in the model, higher average output market distortions of a sector, reduce the employment share of the sector by raising the marginal revenue productivity of labor in the sector relative to the marginal revenue productivity of labor in the rest of the economy. And higher output distortions raise marginal revenue productivities of factor inputs in a given sector in as far as they impede the inter-sectoral factor mobility that would tend to equalize them across sectors under competition. For the higher are the impediments to labor moving to a sector the higher is the marginal revenue productivity of labor in that sector relative to the rest of the economy. Similarly, the model would predict that higher distortions in the market for capital goods in a sector reduce the amount of capital stock deployed in that sector thereby making the marginal revenue productivity of capital in that sector higher relative to the rest of the economy. Policy reforms and institutional changes that would reduce distortions to capital goods markets in some sectors than in the rest of the economy would thus have the potential to raise the relative share of those sectors in the aggregate capital stock and fixed investment. Economic history is indeed replete with instances of major reforms of institutions and property rights more generally that have unleashed structural change of this kind.

Measures and sectoral divides
In this section we address the specific analytic objectives spelled out in the opening section of this paper based on the decomposition of aggregate productivity growth per equation (3) into the "within" and "reallocation" components, cov , respectively . The decomposition is done at various levels of aggregation including the national economy as a whole, key broad sectors including those at the single -digit ISIC level, and selected four-digit ISIC level industries. Depending on the level of aggregation at which the decomposition is done, the economic content of the reallocation component would be summarized best by one of the equations (7), (7a), (8) and (10). The results fall into three categories, each corresponding to a level of aggregation.
The first set of results we report is based on the calculation of The second set of results relates to the "within" and "reallocation" components of decomposition of productivity growth at a lower level of aggregation for (a) the export industries (or "comparative advantage industries") separately; and (b) the rest of the tradable sector or "comparative disadvantage industries" separately again based on the analysis of three-digit industry level observations. In both cases, the reallocation component will again be interpreted in the context of equation (7a).  Table 5 shows that Uganda's GDP growth of the 2000s benefitted from large gains in labor productivity, which grew at the rate of 13-percent a year between 2002 and 2009. This corresponded to an annual TFP growth rate of 3 percent, which means that the observed growth in labor productivity was driven primarily by growing capital intensity of production, i.e., by higher investments in equipment and other fixed assets relative to the size of the workforce, but did also involve significant gains in total factor productivity. The table also suggests that the investment in fixed assets that fueled the growth in labor productivity was overwhelmingly concentrated in the tradable sector with very little, if any, of it going to non-tradable activities, where aggregate labor productivity in fact declined at a rate of 1.7 percent a year--a rate that would have been even higher were it not for the fact that TFP grew at the rate of 1.4 percent a year in those activities. This meant that labor productivity grew at about 19 percent per yeara far higher pace than that the economy wide average growth rate might suggest.

Drivers and broad sectoral patterns: Fixed investment, labor productivity growth and technical efficiency gains
The faster TFP growth in the tradable sector reflected the fact that all the major sub-sectors with the exception of transport services experienced robust TFP gains including commercial agriculture and manufacturing, where the annual TFP growth rate averaged 6 percent and 3 percent respectively. No part of the non-tradable sector registered as high TFP growth rates other than real estate and nontraded business services while the construction industry did in fact experience decline in TFP at a rate of 1.8 percent a year in spite of the fact it also had higher labor productivity growth than any other part not only of the non-tradable sector but the economy as whole. However, with the exception of retail and wholesale trade, the rest of the non-traded sector did experience significant TFP growth over the period, which, however, was more than offset by what can only be regarded as a process of disseverment that seems to have led to quite steep decline in labor productivity in all parts of the sector outside of the construction industry.
The picture that emerges of Uganda's economy in the 2000s as read from Table 5 is thus one where labor productivity grew at a fairly rapid pace across industries producing tradable goods and services primarily as a result of greater equipment of the work force with fixed assets through investment, but also on the back of significant TFP gains across industries at the same time as the non-tradable sector must have been undergoing significant underinvestment over the same period relative to its workforce as it was registering steep declines in labor productivity in spite of significant TFP growth.

Patterns of economy wide developments across broad sectors
One of the more remarkable aspects of the determinants of productivity growth in Uganda's economy of the 2000s as read from UBI data was the contrasting roles that inter-industry reallocation of labor and capital had in driving growth in labor productivity, on the one hand, and TFP growth, on the other. Table 5 indicates that, on the whole, resources shifted from industries and sectors where labor productivity was lower to those where it was higher, which pushed up aggregate labor productivity economy wide across all sectors by reinforcing the effects of within industry growth in productivity that also took place across the board economy wide. Economy wide reallocation of this kind accounted for about one-fifth of the 13-percent a year growth in aggregate labor productivity observed over the seven year period.

20
The process of TFP growth that accompanied the growth of labor productivity was also characterized by within industry growth -that was even more consistently positive across industries than within industry labor productivity growth and was also accompanied by reallocation of labor and capital between industries but this time from industries of higher TFP to those of lower TFP. But the effect of reallocation in the reverse direction was one of pulling down productivity rather than increasing it -that is, that of offsetting within -industry productivity growth, which is what we see in table 5 to have happened to TFP growth. Specifically we see that economy wide "within-industry" TFP growth averaged just over 7 percent a year, which was more than half of the annual growth rate of labor productivity economy wide. But the corresponding economy wide over all TFP growth rate averaged only 3 percent or less than a quarter of the overall growth rate of labor productivity, for which one immediate reason was that the "within industry" TFP growth rate, though always positive and substantial across all industries, was also largely offset by large productivity losses brought about by the reallocation of capital and labor from high-TFP industries and sectors to lower-TFP ones. The gross aggregate TFP loss due to that reallocation was nearly 1.5 times as large as what ended up to be the aggregate TFP growth rate over the seven year period (net of the same loss).
This pattern whereby "within-industry" TFP gains were typically offset by TFP losses via "between industry" reallocation very much contrasts with the role that "between industry" reallocation had in driving the gains in labor productivity by reinforcing "within industry" gains in labor productivity economy wide as well as within broad sectors of the production of tradable goods and services as well as non-tradable sector. Thus, focusing on the production of tradable goods and services alone, the within -industry TFP growth rate averaged 8.9 % a year over the entire period against a sector wide average TFP growth rate of just 4.5 %, which reflected the TFP losses brought about by the reallocation of labor and capital from high TFP lines of production to low TFP lines. Looking at individual industry groups within the same sector, the "within-industry" annual TFP growth rate averaged 20 % for commercial agriculture and 11.8 % in manufacturing, which compare with annual growth rates in overall TFP of 6.1 % and 3% in commercial agriculture and manufacturing respectively. Even in transport and communication, where over all TFP declined at an annual rate of 3.4% a year, the within-industry TFP growth rate averaged 2.4 percent a year.
Turning to the production of non-tradable goods and services, although the sector wide TFP growth rate averaged just 1.4% percent a year for the entire period, the annual within-industry TFP growth rate was positive and significant across all industries and averaged more than 5% for the sector as a whole. But this was largely offset by reallocation of capital and labor to lower TFP lines of production. The contrast between "within industry" productivity changes and inter-industry misallocation as two distinct sources of aggregate productivity growth thus looks even sharper in the production of non-tradable goods and services, where aggregate labor productivity actually declined sector wide at the rate of 1.7 percent a year in spite of the growth of TFP at an annual average rate of 1.4 percent. The decline in labor productivity was to a very large extent the result of decline in within-industry labor productivity just as much as the increase in TFP represented "within-industry". Although some 37 percent of the decline in labor productivity was the result of reallocation of labor (and capital) away from more productive lines of activities to less productive ones, the latter were all particularly concentrated in the wholesale and retail trade. Setting that aside for a moment, all the reallocation that has taken place elsewhere within the sector involved resource shifts from less productive activities to more productive ones, which could only have pushed up aggregate labor productivity beyond what it could otherwise have been. By contrasts reallocation in the sector has always involved a shifting of resources from lines of high TFP to lines of low TFP, which was a far more important factor in the relatively low TFP growth rate than the scale of "within industry" TFP changes.

Exporting and import competing industries
A second important divide in the tradable sector is that between exporting (or comparative advantage) industries, on one hand, and import competing (or comparative disadvantage) industries, on the other. As a group, exporting industries had faster growth in aggregate labor productivity than the rest of the tradable sector and indeed the rest of the economy as a whole. But they also had slower aggregate TFP growth than the rest of the tradable sector and the broader economy. As shown in Table  6, aggregate labor productivity grew at the rate of 25 percent a year over the seven year period in exporting industries, which is almost twice as high as the growth rate of economy wide aggregate labor productivity, and 32 percent higher than the growth rate in the production of tradable goods and services as a whole. However, the corresponding TFP growth rate was just 1.4 percent, which, while substantial in absolute terms, was significantly less than the economy wide aggregate TFP growth rate (which averaged about 3 percent per year) and also less than the aggregate TFP growth rate of the tradable sector as a whole (which was 4.5 percent a year). But perhaps surprisingly the higher growth rate of labor productivity in exporting industries was a result exclusively of a higher within-industry growth rate of labor productivity in those industries relative to the rest of the tradable sector as well as relative to the rest of the economy. Indeed inter-industry reallocation accounted for only 2 percent of the aggregate growth in labor productivity in exporting industries over the seven year period, which is comparatively small in light of the fact that reallocation accounted for 20 percent of the growth rate of labor productivity in the tradable sector and in the economy as a whole. On the other hand, the reason why the rate of TFP growth over the same period was lower in exporting industries than in the rest of the economy was the fact that those industries experienced greater TFP losses than the rest of the economy through the reallocation of labor and capital to less productive industries.
That said, the relative productivity of exporting industries and import-competing industries varies between manufacturing, agriculture and tradable services. Focusing on exporting industries within manufacturing, for example, labor productivity grew at the rate of 8 percent a year in these industries, which was less than one-third of the growth rate of labor productivity in exporting industries as a whole and less than half of that in all manufacturing industries combined. Moreover, the contribution of interindustry reallocation to aggregate labor productivity growth in exporting manufacturing industries was only a quarter of the same contribution in all manufacturing industries combined. Thirdly, while there was significant TFP growth in import competing manufacturing industries, TFP declined in exporting manufacturing industries at a rate of 0.6 percent per year as a result of significant reallocation of labor and capital in favor of less productive industries within the group.
The situation was rather different when it comes to exporting farming industries, where TFP grew at an annual rate of almost 2.2 percent over the same period, which rate was much higher than import competing farming industries. Within industry productivity growth was also a far more important source of growth in TFP than inter-industry reallocation in exporting farming industries, which contrasts with the fact that reallocation towards less productive industries was the main factor in the decline in TFP in exporting manufacturing industries. Turning to tradable services, the fastest TFP growth among exporting industries was registered by international transport and communication services, where it averaged nearly 14% a year. This is somewhat surprising in as far as labor productivity fell at an average rate of 13% a year in those services -suggesting that the industries might have suffered from a rundown of (or disinvestment in) fixed assets. The loss in labor productivity was primarily a result of withinindustry decline in productivity as much as the growth in TFP reflected "within -industry" gains.

Production of non-tradable goods and services
Productivity trends within the non-tradable sector can be analyzed in terms of the divide between "upstream" industries and "downstream" ones in the sense of Table 7. The tables shows that although aggregate labor productivity declined by 1.7 % a year sector wide, that average conceals sharp contrast along this particular divide. For aggregate labor productivity did in fact increase at the rate of 1.5 % a year in upstream industries over the period, which means the decline in downstream industries was at a higher rate than the sector wide average. The contrast is even sharper in upstream industries whereby labor productivity did decline in financial, business services and real estate industries at an average rate of 4.5% per year but grew at the nearly 23% a year in the construction industry. It is indeed quite significant that as the main component of the growth of labor productivity in upstream production of non-tradable, 98 percent of the growth rate of labor productivity observed in the construction industry took place "within" individual four digit ISIC lines of that industry.
By contrast, although the decline in labor productivity in finance and real estate also took place very much within individual 4-digit ISIC lines, the decline in the aggregate labor productivity would have been much steeper than it turned out to be were it not for the fact that some of the loss via within-industry productivity losses was made up for through the reallocation of labor and capital towards more productive lines. These gains amounted to some 40% of what turned out to be the net decline in aggregate labor productivity for finance and business services and real estate combined. Looking at the 1.5 % annual growth rate of labor productivity in all upstream non-tradable combined we note that the rate sums to a substantial decline in the within-industry labor productivity and gain in labor productivity via reallocation to more productive 4-digit lines. In this case the scale of gain from reallocation is more than twice the scale of the decline in within industry labor productivity. On the other hand, that the 3.3 percentage decline in labor productivity in downstream production of non-tradables is the outcome of decline in within industry productivity being reinforced by productivity losses through reallocation of labor and capital to lines of lower labor productivity. But even here the reallocation component of productivity losses turns out to be nearly twice the size of the scale of the within line productivity decline. And while the within-industry, within line labor productivity has declined everywhere the reallocation component does vary by line. Specifically there were in fact productivity gains via reallocation to more productive lines within public admin and social services, which made up for a significant decline in within-industry labor productivity to produce a much smaller decline in aggregate labor productivity in those industries than could otherwise have occurred.
Table 7 also shows that the 1.7 percent decline in aggregate labor productivity in the non-tradable sector as a whole occurred in spite of significant aggregate TFP growth sector wide at the rate of 1.4 percent a year. The corresponding within-sector TFP growth rate was much larger than what that could suggest were it not for the fact that within-industry TFP gains were offset by large productivity losses through the reallocation of labor and capital to less productive lines. TFP losses via this kind of reallocation were more than twice as large as the net gain in aggregate sector wide TFP. Upstream production of non-tradable experienced even higher TFP growth, but surprisingly this did not include the construction industry, which registered faster labor productivity growth several time over than the sector as a whole but also saw decline in TFP at the rate of nearly 2 percent a year. TFP growth in upstream industries was thus exclusively concentrated in finance, business services and real estate, where the decline in labor productivity was the steepest. Downstream production of non-tradable also registered significant TFP growth, but the gains involved were exclusively concentrated in public administration and social services. Wholesale and retail trade and catering and the hotel industry showed across-the-board decline in TFP as well as in labor productivity. It is also interesting that nearly every industry of the non-tradable sector experienced quite high within-industry TFP growth, which, however was largely offset by shifts in labor and capital consistently in favor of less productive lines.

Exporting industries
Some 130 four-digit ISIC manufacturing industries were functional in Uganda in 2009, of which 38 were deemed to be comparative advantage (or exporting) industries. The largest employers in the second group of industries was that of the food and beverages industries followed by garments, textiles, and leather and leather products industries. We see in Table 8 that the 7.9 -percent a year growth rate of labor productivity reported as the average for comparative advantage manufacturing industries mainly reflected even higher rates 29.8 percent and 8.4 percent in garments and textiles respectively, which made up for the comparatively low 1.6 percent a year in in the food and beverages industries and precipitous declines of 23 percent and 27 percent a year in basic metals and the tobacco industry respectively.
Surprisingly inter-industry reallocation accounted for just 11 percent of the aggregate labor productivity growth rate in comparative advantage manufacturing industries as a whole. That said, reallocation was nonetheless a major factor in the dynamics of labor productivity in three of the largest comparative advantage industries, namely, food and beverages, textiles and leather and leather products. Only that reallocation played quite contrasting roles between the food and beverages industries that in the end cancelled each other out in terms of contribution to the sector wide average growth rate. Thus 77 percent and 44 percent of the growth of labor productivity in the textiles and leather and leather goods respectively came about as gains from inter-industry reallocation. But reallocation was also what kept down the growth rate of labor productivity comparatively low at 1.6 percent a year in the food and beverages industries, where the "within-industry" growth rate of labor productivity was very high in absolute terms but was largely offset by losses due to resource shifts to less productive lines (Table 8).
It is even more of a surprise that the 7.9 percent a year growth in aggregate labor productivity in comparative advantage manufacturing as a whole can be attributed to investment in fixed business assets and rising capital intensity of production to the exclusion of across-the-board gains in technical efficiency. This is because TFP in fact declined for the same group of industries at the average rate of 0.4 percent a year at the same time as labor productivity was rising. However, this should be seen against the fact that the typical industry within the across the group as a whole did register significant growth in "within-industry" TFP although the gain from this was more than offset by productivity losses through the shifting of labor and capital towards industries where TFP was lower, which accounted for more than three-quarters of the overall 0.4 percent a year decline in TFP for the group of comparative advantage industries as a whole.
Looking at individual comparative advantage industries, three out of the seven industries made significant productivity gains in TFP terms. These were textiles, the tobacco industry and basic metals, where annual TFP growth rates averaged 11%, 1.7% and 1% respectively over the period in question. But interestingly only the textiles industry among the three did also experience significant growth in labor productivity. Basic metals and the tobacco industries both experienced steep declines in labor productivity in spite of the gains they made in TFP terms. On the other hand, the very industries that registered the highest growth rates in labor productivity, namely, garments, leather and leather products and refined petroleum products, were also the ones where TFP declines were the steepest, at respective decline rates of 12%, 10% and 20%. It is interesting that in all three cases the decline in TFP was mainly driven by losses in "within-industry" TFP and, indeed, in two cases the observed productivity loss in TFP did not have anything to do with inter-industry reallocation. Of the three cases, the industry where reallocation did matter was leather and leather products, where there were significant gains in TFP over the period as a consequence of resources shifting in favor of more productive (four-digit ISIC) activity/product lines. But these gains were swamped by losses in "within-industry/line" TFP that were more than three times larger.
The only other comparative advantage industry where inter-industry reallocation did matter as a source of TFP gains /losses was the food and beverages industry, which however, was where TFP declined at the rate nearly of 1% a year over the period of interest. This was indeed a case where we could say that the overall TFP loss was indeed primarily driven by reallocation of resources to less productive (four digit-ISIC) activity/product lines. This is in the sense that, although the industry experienced significant "within industry/line" gains in TFP the scale of those gains was only half of losses made at the same time through the flow of resources towards less productive activity/product lines across the food and beverages industry. Reallocation did not play any role at all in the dynamics of TFP in textiles, garments, the tobacco industry, petroleum products, or basic metals. Recall that in only one of these five, namely, textiles did re-allocation play any role in the dynamics of labor productivity.

Import -competing industries
There were 102 four-digit ISIC manufacturing industries deemed to be "comparative-disadvantage" or "import-competing" in Uganda in 2009. Table 8 shows that labor productivity grew nearly three times as fast in this group between 2002 and 2009 as it did in comparative advantage industries. Import competing manufacturers also registered a higher rate of TFP growth-at the rate 6 percent per yearthan "comparative advantage" industries, where TFP declined. Moreover, inter-industry reallocation (at four-digit ISIC level) accounted for almost half of the growth in labor productivity in import competing industries. This is nearly five times as large as the relative share of inter-industry reallocation in labor productivity growth in exporting manufacturing industries. Inter-industry reallocation at the four digit ISIC level also explained a far larger share of TFP growth in import competing manufacturing than it did in the case of exporting manufacturers even though reallocation in both cases led to productivity losses rather than gains, involving as it did the shifting of labor and capital to less productive activity/product lines of lower TFP. In both cases the observed TFP growth was driven by within-line gains the effect of which in aggregate TFP growth was to a large extent offset by losses via inter-industry reallocation. TFP losses via reallocation were 20 percent larger than the "within industry" TFP growth in exporting manufacturing but also more than 3 times the scale of the net TFP gain of the group over the period. In Similarly TFP losses via inter-industry reallocation in import competing manufacturing were two-fifths of the scale of within-industry TFP growth and about three-quarters of the net TFP growth rate of the group.
Looking at narrower groups of industries among import competing manufacturers, wood and wood products, paper and paper products, chemicals and chemical products, machinery and equipment, electrical equipment and medical instruments all registered labor productivity growth far higher than most exporting manufacturing industries. This bore sharp contrast with the case of three other import competing manufacturing industries, namely, the furniture industry, motor vehicles and other transport equipment and non-metallic products, all of which experienced steep decline in labor productivity. However, nearly all the comparative disadvantage industries that had high growth rate of labor productivity did also show steep declines in total factor productivity underscoring the point made earlier that where labor productivity growth was observed it was more of the outcome fixed investment and rising capital intensity of production than of across the board technical efficiency gains in factor usage. In nearly all cases where high growth rates of labor productivity were observed, reallocation to more productive lines of specialization was a major contributor accounting for between 30 percent and 73 percent of the observed net growth in labor productivity. Reallocation also mattered as a determinant of TFP growth rates industry by industry but in the form of TFP losses that resulted from resource flows to less productive 4-digit ISIC lines, that offset rather than enforce within-line TFP growth.

Commercial agriculture
A dozen four-digit ISIC industries of commercial agriculture were functioning in Uganda in 2009. These divided into four main two-digit ISIC groupings, namely, crop and animal production and fishing and aquaculture, on all three of which Uganda is believed to have comparative advantage in regional and global trade, and forestry and logging, in which it does not seem to. We estimate in Table 9 that labor productivity grew in all 12 industries at the rate of 4.6 percent a year between UBI 2002 and UBI 2009. Of this some 61 percent represented gains from inter-industry reallocation of labor and capital across four-digit ISIC specialization lines within the sector, the balance being the average within-line growth rate. However, labor productivity did in fact decline rather steeply in crop and animal production (at the rate of almost 5% a year) and did even more so in fishing and aquaculture -at the rate of 11.6 percent a year. In both cases most of the decline reflected within-industry losses, which were reinforced by losses via reallocation of resources towards less productive lines. This contribution amounted to 47 percent of the decline in aggregate labor productivity in crop and animal production, and also was quite high in fishing and aquaculture at 37 percent of the total overall decline. But all this means that commercial agriculture in Uganda suffered from steep decline in labor productivity in the very specialization lines it is believed to have had comparative advantage.
We should also note that the only reason that it would appear to have registered relatively high growth in the forestry and logging as an import competing (or comparative disadvantage) industry is because we have no observations of output and inputs in UBI 2002 although we do have observations on both variables in UBI 2009. Now, if this happened because there was no significant output of the industry in 2002 and what we observed in 2009 was something that was not there in 2002, then we would be right in interpreting the difference in values (output and inputs) between UBI 2002 and UBI 2009 as representing growth or decline in those variables. In that case the interpretation we started off with, that labor productivity grew at the rate of 4.6 percent a year over the seven year interval in commercial agriculture as a whole would be quite correct. But it is also possible that there was indeed significant production in forestry and logging in 2002 but it was not covered by that year's UBI. In that case we would be wrong to read into the data any indication of growth in labor productivity in that industry and our estimates of the overall growth rate of labor productivity in the sector over the seven year period would need to be corrected accordingly.
In this sector, we have data on TFP for crop and animal production only, where TFP grew at the rate nearly of 12 percent a year, driven mainly by even steeper growth in within-industry productivity gain. But that gain was largely offset by a TFP loss via reallocation to less productive four-digit ISIC lines -a loss that was nearly 69% of the within-line gain in absolute magnitude and nearly three times as large as what turned out to be the overall sector wide TFP gain over the period. The fact that aggregate labor productivity declined as steeply as it did in spite having made TFP gains at twice the rate at which labor 26 productivity declined suggests that there must have been quite substantial disinvestment of fixed assets in the sector that brought down capital to labor ratio so low as to more than nullify the effect on labor productivity of what should be seen as a high growth rate in TFP by any standard.

Transport and communication services
Uganda had 18 four-digit ISIC functioning industries in transport and communications services in 2009. Table 10 suggests that the sector experienced steep losses in labor productivity as well as TFP between UBI 2002 and 2009, during which both productivity indicators declined at the rate of 3.4 % a year. Surprisingly, most of the decline in labor productivity was driven by within-industry losses at the fourdigit ISIC level. Inter-industry reallocation played an important here as well just as it did in manufacturing and commercial agriculture. Indeed this role had been one of pushing up productivity as the reallocation typically involved the shifting of labor and capital to more productive lines. The productivity gains from such reallocation amounted to 70 percent of what ended up being the aggregate, sector-level loss in labor productivity, but were largely swamped by within industry losses which were even larger.
Looking at individual two-digit ISIC industries within the sector, labor productivity declined in three major industries, namely, land transport, air transport and postal and telecommunication at 10 % or more a year, but it also rose over the same period in water transport and in auxiliary transport services at the rates of 11 % and 3 % respectively. Gains in labor productivity via reallocation were particularly high in land transport and auxiliary transport services. We should also note that, of the three two-digit industries that suffered from the steepest decline in labor productivity, two registered high growth rates in TFP. These were land transport and postal and communication services, where the TFP growth rate averaged 11.7% and 3.7 % respectively. Air transport and auxiliary transport services both suffered from steep declines in TFP at the annual rates of 9% and 22 % respectively. Of these, the TFP decline in air transport was entirely a within-industry effect while the TFP decline in auxiliary transport services was overwhelmingly the outcome of reallocation of labor and capital towards less productive lines. The TFP decline in air transport could only have reinforced the effects (on labor productivity) of what must have been significant disinvestment in fixed assets in that industry , while the TFP decline in auxiliary transport services could only have partially offset the effects of what must have been significant investment in fixed assets to boost labor productivity. Where TFP grew within the sector, which is in land transport and in post and telecommunication services, the gains were almost entirely within-line productivity improvements. By contrast, the situation was rather mixed in industries where TFP declined, as was the case with air transport, where the decline was entirely a within-industry effect, and auxiliary transport services, where the decline was almost entirely a reallocation effect. This is reflected in the decomposition of TFP growth at the sectoral level where the reallocation effect is twice the size of the within-industry effect in absolute terms (Table 10).

Inter-firm intra-industry reallocation always means productivity gains
In Tables 11 and 12 we report the decomposition of labor productivity growth and TFP growth for establishments constituting the UBI subsamples in selected 4-digit ISIC industries. Table 11 reports results for each of 14 four-digit ISIC industries producing tradable goods and services. Table 12 reports for 13 four-digit ISIC industries producing non-tradables.
The results we report here bear sharply contrast with what we infer from Tables 7 to 10 based on the decomposition of aggregate productivity at higher levels aggregation in at four levels. First -estimated average rates of TFP and labor productivity growth are always positive. This is in marked contrast to the fact that, for some of two-digit or three-digit ISIC industries the growth of rate of either productivity indicator is indeed negative. Secondly, unlike the many cases where we have seen inter-industry reallocation to lead to productivity losses at the two-digit and three-digit ISIC levels, intra-industry, inter-firm, reallocation of labor and capital (or market share) is invariably associated with aggregate productivity gains at the (four-digit ISIC) industry level. This contrast between the signs productivity effects of intra-industry reallocation and those of inter-industry reallocation should not be surprising.
For there is no conceivable reason why less productive incumbent firms should gain in market share in a given industry over more productive incumbent firms in the same industry. On the other it is quite possible for a less productive industry to expand at the same time as a more productive industry contracts or fails to expand if, for example, there are more effective policy related (or other) barriers to entry to the more productive industry.
Third, unlike the many cases where we saw (in Tables 8-10) gains in labor productivity and TFP growth occurring simultaneously in the same two-digit or three-digit industry, the establishment level average growth rate of labor productivity is of the same sign as the corresponding average establishment level average TFP growth rate within each four-digit industry (in tables 11 and 12). This happens for the simple reason that rising fixed investment rates (and the associated rises in the capital intensity of production) and technical progress (or technical efficiency gain) tend to reinforce each other at the establishment level while increases in technical efficiency and fixed investment need not to occur simultaneously at higher levels of aggregation of industrial activity including the three-digit and twodigit ISIC level. What we see from Tables 8-10 in that regard is that, at that level of aggregation higher fixed investment rates should lead to growth in labor productivity at higher levels of aggregation as well as at the four-digit ISIC level but need to lead to growth in TFP at higher levels of aggregation and may indeed be accompanied by decline in TFP since the disaggregate levels of activity where the fixed investment occurs need not coincide with those making technical efficiency gains for other reasons (such as learning or life cycle effects or exogenous factors such as the weather). For it is only at the establishment level that effects of new fixed investment are guaranteed to physically coincide with specific sources of technical efficiency gains (such as learning and management reorganization) in specific processes of production.
Tables 11 and 12 also seem to highlight a fourth point of contrast between aggregate productivity decomposition at the four -digit ISIC level and at higher levels of aggregation. This is that the reallocation component is a much higher share of aggregate productivity growth at the four-digit ISIC level than at higher level, which means that intra-industry or inter-firm reallocation is normally a larger share of growth in industry level aggregate labor productivity than inter-industry reallocation is as a share of sector level or economy wide aggregate labor productivity.
In the following section we will highlight these four patterns across the divides, first, between the tradable and non-tradable sectors and then between exporting and import competing industries within the tradable sector.

Exporting industries
Labor productivity grew more than twice as fast in the three four-digit ISIC comparative advantage manufacturing industries represented in Table 11 as it did in the four four-digit ISIC comparative disadvantage industries also in the same table. Within the three comparative advantage manufacturing industries the fastest growth in labor productivity was in the garment industry, where value added per worker more than doubled year on year. This is an extremely high growth rate by any standard and is twice as high as the annual growth rate of labor productivity in the production of grain flour over the same period and about five times as high as that observed in the alcoholic beverages industry. It is also quite striking that all but 3 % of the growth in productivity in the garment industry reflects gains via intra-industry (or inter-firm) reallocation of market share (and hence of labor and capital). Intra-industry (or inter-firm) reallocation was also the main driver of labor productivity gains in the grain flour and alcoholic beverages industries, where it accounted for 89 % and 81% respectively of the gains. Labor productivity grew at an annual average rate of 68% across the four main manufacturing industries covered by UBI 2002 and UBI 2009, namely, the garment industry, alcoholic beverages, grain processing, and meat processing.
The highest TFP growth rate was observed in the garments industry. But the observed TFP growth rate was 20% less than the corresponding growth rate in labor, which means that a significant share of the growth in labor productivity came from new fixed investment and rising capital intensity of production in the industry. On the other hand, the labor productivity growth we observe in the alcoholic beverages and grain processing industries does not seem to have anything to do with fixed investment and seems to derive entirely from technical efficiency gains. Labor productivity as well as TFP grew at the rate same rate of 54% a year in grain processing, which also means that there was no significant net investment in fixed assets in the industry over the period of observation.
In all cases some 83 to 91 percent of the observed growth in productivity was the outcome intraindustry (or inter-firm) reallocation of market share (and hence and ultimately of labor and capital). That said, we should note that there was significant growth in the average within-firm TFP in each of the three industries that contributed significantly to the observed aggregate TFP growth rate.

Import competing industries
Turning the focus to import competing industries, the fastest productivity growth was observed in the manufacturing of structural clay products, where labor productivity grew at an average rate of 121 % a year. The corresponding labor productivity growth rate for the other five industries ranged from 15% a year in the manufacturing of structural metal products to 38% a year in the furniture industry. As in the case of exporting manufacturing industries, the bulk of the observed growth in labor productivity was the outcome of intra-firm reallocation of market share (and hence of labor and capital) within each of the seven industries. Actual shares of the reallocation component ranged from 65 % in sawmilling and paneling of wood to 90% in the soap, detergents and perfume industry and in the manufacturing of structural clay products.
The balance of the observed labor productivity growth in the group reflected within-firm gains in labor productivity via firm level fixed investment and associated increase in capital intensity or within-firm level gains in technical efficiency. The scale of within-firm growth in labor productivity was substantial in each industry with the exception of the pottery industry. And as in the case with exporting industries, the bulk of the observed growth in industry level labor productivity was driven by TFP growth, which averaged 26 % a year across the six industries -again excluding the pottery industry-and ranged from about 13% a year in the manufacturing of soap detergents and perfumes to 86% a year in the manufacturing of clay products.

Fixed investment vs. TFP gains
The magnitudes of these growth rates suggest that the TFP gains rather than net fixed investment was the source of the larger share of the growth in labor productivity observed over the period. Indeed comparison with TFP growth rates suggests that the growth in labor productivity that was observed in the sawmill and wood paneling and structural metal products may have occurred solely as the outcome of technical efficiency gains and in spite of significant decline in capital intensity of production as the rate of growth in labor productivity was in both cases significantly lower than the corresponding TFP growth rates. In all other cases, observed growth rates in labor productivity were considerably higher than the corresponding TFP growth rates, implying that a large part of the growth in labor productivity in those industries was the outcome of net fixed investment and consequent rises in the capital intensity of production. Looking at the mechanics of the growth of TFP in import competing manufacturing industries, it is clear from Table 11 that, here also, as in the case of labor productivity growth in those industries, inter-firm (but intra-industry) reallocation of market share (and, with that, of capital and labor) accounted for the larger of the observed productivity growth. Across the seven industries shown in the tables, inter-firm, intra-industry reallocation of this kind explained on average 72% of the observed TFP growth rate and ranged between 68 % in the sawmilling and wood paneling industry and 84 % in the manufacturing of structural clay products. The balance of the observed TFP growth consisted of within-firm technical efficiency gains, which were substantial in all seven but one of the import competing manufacturing industries shown in the table.

Manufacturing vs. agriculture
The pattern we see in productivity growth in the exporting manufacturing industries represented in Table 11, also largely holds in two of the three industries commercial farming also shown in the same table, namely, cereal and crop production and the livestock industry. In commercial farming industries as well as in manufacturing, TFP growth has been the more important source of growth in labor productivity than fixed investment or rising capital intensity of production. Intra-industry, inter-firm reallocation of market shares and (hence ultimately of labor and capital) has also been as a major source of growth in TFP as well as of growth in labor productivity via expansion investment. Moreover, in commercial agriculture as well as in manufacturing, within-firm technical efficiency gains and within-firm gains in labor productivity via fixed capital formation have also been substantial sources of productivity growth. The most visible difference between farming and manufacturing here is that the share of intra-30 industry inter-firm reallocation of labor and capital has been substantially lower in farming industries, where it has averaged between a little over 50% and 67% as compared to 80% to 90% in exporting manufacturing industries and 72% to 80% in import competing manufacturing.

Inter-firm reallocation in the production of non-tradable goods and services
Turning our attention to the non-tradables sector, Table 12 suggests that labor productivity grew at fairly high rates here also even though these were significantly lower than those observed for manufacturing and commercial agriculture in Table 11. Within the sector the construction industry and health services did register growth rates that were extremely high even by the standards of tradable activities. Elsewhere the annual rate of labor productivity growth ranged from 13 percent a year in wholesale trade in agricultural raw materials to 62 percent a year in motor vehicle repairs and maintenance. This is setting aside steamship agencies for which labor productivity did decline at the rate of almost 15 percent a year. Surprisingly, the share of within-firm growth in the growth of industry aggregate labor productivity, though always substantial was even lower in the production of nontradable than it was in manufacturing or commercial agriculture.
As in the tradable sector intra-industry and inter-firm reallocation of market shares (and resources) in favor of more productive establishments has also been by far the more important source of aggregate productivity growth, but even more so in non-tradable activities where the share has ranged from about 57 % in accounting and auditing services to nearly 97 percent in the building construction industry. Also, as was the case across farming and manufacturing industries represented in Table 11, the growth of labor productivity observed across the industries of the non-tradable sector shown in Table 12 were also largely driven by fairly high rates of TFP growth as well as by net fixed business investment that has made production more capital intensive across the board. Indeed TFP gains were the sole source of the labor productivity growth observed in wholesale trade in agricultural raw materials and freight road transport, where there was significantly higher TFP growth than the observed growth in labor productivity, which suggests that there may not have been significant net investment in those industries over the period of observation, as the gap between the two growth rates would imply significant decline the capital intensity of production.
On the other hand, the growth rate of labor productivity was significantly higher than the corresponding growth rate of TFP across most of the other industries, as was the case, for example, in the building construction industry where labor productivity grew faster than TFP by 17 percentage points. The gaps reflect increases in the capital intensity of production as the second source of the observed growth in labor productivity-gaps the scale of which is such as can only come about via significant investment in fixed business assets. On this reading the industries where the greater share of business fixed investment is likely to have taken place are building construction, wholesales trade in food, beverages and tobacco, scheduled highway passenger transport and health services (as the combination of hospital activities and those of medical and dental practices).
As was the case of labor productivity growth in the sector, intra-industry, inter-firm reallocation of in favor of more productive establishments has been by far the more important source of aggregate TFP gains than within firm TFP growth-i.e. within firm gains in technical efficiency. If anything the share of inter-firm, intra-industry reallocation observed in the production of non-tradable goods and services seems to be higher than that in manufacturing or commercial agriculture. The highest shares of interfirm reallocation are again observed in building construction, scheduled passenger transport, motor vehicle maintenance and repairs, and hospitals, where they range between the upper 80s and the mid -90s. By contrast inter-firm reallocation accounted for 55 to 70 percent of the observed TFP growth in the hotel industry, wholesales trade in food and beverages and scheduled road freight transport.

Summary and Conclusion
In this paper we have sought to assess the contribution of allocative efficiency gains from the removal of policy related market distortions to aggregate productivity growth in Uganda in the 2000s. An analysis of data from the 2002 and 2009 waves the UBI shows that labor productivity grew at an economy wide average rate of 13 percent a year over the intervening period. But the growth was limited entirely to industries producing tradable goods and services. Labor productivity did in fact decline across most industries within the non-tradable sector at the rate of just a little under 2 percent a year, which meant that the pace of growth in the tradable sector was much higher than the economy-wide average might suggest.
Most of the growth in labor productivity in the tradable sector was driven by high rates of investment in equipment and fixed assets that made production increasingly more capital intensive. But it also entailed substantial TFP gains. Indeed the decline in labor productivity in the production of non-tradable goods and services occurred in spite of significant TFP growth in the sector because of what must have been sizeable de-accumulation of fixed business assets.
We also estimate that one fifth of the growth in economy wide aggregate labor productivity came from allocative efficiency gains from inter-industry reallocation of labor and capital over the period of observation. As a rule the direction of reallocation was from industries and sectors where labor productivity was lower at the margin and on average to where it was higher, which inevitably pushed up economy wide aggregate labor productivity by reinforcing the effects of "within" industry growth in productivity. But inter-industry reallocation did not always shift resources in the direction of higher TFP. The pattern we detect in the data --economy wide as well as within broad sectors -is indeed one whereby "within-industry" TFP gains were typically offset by TFP losses via "between industry" reallocation while "between industry" reallocation consistently led to gains in labor productivity by reinforcing "within industry" labor productivity growth.
Bearing in mind that "within-industry" growth in labor productivity thus accounted for four-fifths of the 13-percent a year growth in aggregate labor productivity and an even larger share of the economy wide growth in TFP, what were the drivers of "within industry" productivity gains? In investigating that question, the paper has analyzed establishment level productivity difference in a selection of four-digit ISIC industries. It turns out that in the production of tradable goods and services as well as in that of non-tradables , intra industry, inter-firm reallocation of market shares-and, ultimately of labor and capital-was a far more important source of "within industry" growth in labor productivity than "within -firm" gains in technical efficiency. Our estimate is that productivity gains from intra-industry inter-frim reallocation of market shares account for between 55 percent and 90 percent of the within-industry growth rate of labor productivity at the four digit ISIC level, leaving the balance to "within-firm" technical efficiency gains.
But what this all means is that technical efficiency gains made at the firm level through process or product innovation of some kind or via improved in management or work practices account for well under half the growth in productivity that Uganda registered in the 2000s. Most of the growth, in fact represented allocative efficiency gains from the correction of inter-industry and intra-industry misallocation of labor and capital. It turns out that inter-firm intra-industry reallocation accounted for the larger share of the allocative efficiency gains at issue than inter-industry reallocation.
The paper has discussed the analytic framework that leads to these results. The core of the framework is the Olley-Pakes decomposition of aggregate productivity growth, which was first proposed in Melitz and Polanec (2012). In addition to details of the decomposition technique, we have provided an account of the theoretical literature that justifies our interpretation of the findings as presented here. As that discussion should have made clear, instances of inter-industry and intra-industry misallocation that we have claimed to have been an immediate source of productivity growth in Uganda at the time are likely to reflect some kind of policy distortion or market failure. This is the subject of a companion paper by the authors based on the UBI dataset analyzed here.