rafmacalaba/datause-encoder-data huggingface dataset:
the job in each services sector, hence it measures the magnitude of fixed training costs. This measure can be calculated for all services sectors next to the goods industries originally used in Costinot’s work, and is equal to the average number of months an employee needs to be fully trained and qualified for working in the service sector under consideration. The 2-digit industry data on complexity are manually converted into the 3-digit EBOPS classification similar to the trade data, because no correspondence table exists between the PSID and EBOPS for services industries. The correspondence table is available from the authors on request.

Finally, the second interaction term of industry characteristics measures the extent to which sectors are vulnerable to hold-up problems due to the concentration of input contracts each producer has within an industry. This variable is based on Levchenko (2007) and calculates an index of product complexity for each services industry based on US Input-Output use tables. Specifically, for each 6-digit output industry the Herfindahl index is calculated (multiplied by -1) based on each sectoral input use. The index measures input use concentration or, in other words, institutional intensity. This variable is then interacted with our country measure of rule of law so that a positive coefficient tells us that countries with better legal systems are better placed to export in industries with high-input use concentration and, thus, are sensitive to hold-up problems. All industry data are again converted into the 3-digit EBOPS classification system similar to our trade data by manually creating an appropriate correspondence table between EBOPS and the IO classification of the Bureau of Economic Analysis. The correspondence table is available from the authors on request.

17
_8_ backup generators. Finally, extreme temperature changes could compromise the effective functioning of critical infrastructure, communications, and transportation systems, imposing additional disruptions to business activities.

# **III. Data**

To estimate the impacts of temperature deviations from the long-term average on firm productivity, we match two sets of data. The first data set is global firm-level data from the WBES.<sup>7</sup> This a nationally representative survey covering nonagricultural firms with five or more full-time permanent employees in low-, middle-, and high-income economies. The coverage is comprehensive, with more than 190,000 observations from 154 countries and spanning 2006–22 .<sup>8</sup> The data are collected using a standardized questionnaire, allowing comparability across countries. The WBES collects information on several firm-level variables, including annual sales, number of workers, various firm-level characteristics, and selfreported obstacles to business, such as licensing and power outages. The WBES data include estimates of TFP for a subset of the sample for which detailed data on labor, capital, and material inputs are available. The WBES also contains confidential geomasked information on firms’ longitude and latitude coordinates that allows us to match the WBES data with area-level climate data. Geomasked coordinates are available for 143,047 observations. Map 1 shows the countries covered by the WBES for which geomasked locations of the firms are available, where the dots represent the specific locations of firms in the sample.

The key outcome variable of interest is annual sales per worker, measured in 2009 US dollars, which is considered in the literature as a reasonable proxy for firm productivity. A limitation of this measure is that the price variation in sales may reflect both supply and demand factors including differences in market power, demand and quality (Cusolito and Maloney, 2018). Its attraction, however it its simplicity and direct interpretation compared to other relatively complicated productivity measures. We also use other measures of firm productivity, such as value added per worker and TFP. However, the latter two measures have a large number of missing observations, which we suspect are systematic. Another key firm performance indicator we examined, which is not reported here, is employment growth, which also proxies for firm growth or lack thereof. We dropped observations from the sample with outliers in sales per worker, which represented a very small proportion of the total sample size.<sup>9</sup>

> 7The WBES can be accessed at: http://www.enterprisesurveys.org We thank the Enterprise Analysis Unit of the Development Economics Global Indicators Department for making the data available.

> 8Some firms appear more than once in countries with repeat surveys.

> 9The criterion used to identify outliers is _Outlier_ = _|_<sup>_x_</sup> _SDi_<sup>_−x_ˆ</sup> _>_ 3 _|_ , where _x_ ˆ is the median value and _SD_ is the standard deviation.
<!-- Start of picture text --> Distribution in 2002<br>; WA Distribution in 2010<br>Poverty Line TM~._,<br>: Raw :<br>: Growth<br>Mean Mean . :<br>(2002) (2010 ) Household expenditure per capita<br>va :<br>Inequality-adjusted<br>H Growth<br>: H : ~<br>= >: Raw} ~<br>— : Growth ~<br>M Household expenditure per capita<br><!-- End of picture text -->
- 31 -

Table 5 Education: Incidence of unsatisfactory rrolects and policies. Results from statistical crosstabulation analysis

|||Project p<br>|erforma<br>|nce<br>|||
|---|---|---|---|---|---|---|
||Unsa<br>|isfactory<br> <br>|Other|s|Chi<br>|-sauare<br>|
|Policies|Numb|er<br>Row%|Numbe|r<br>Row %|X<sup>2</sup>|Prob>X <sup>2</sup>|
|Education<br>(N=228)|40|17.5%|188|82.5%|||
|GrouRed by:|||||||
|Trade restrictiveness|||||||
|Low (Halevi>=3)|0|0%|11|100%|||
|High (Halevi<3)<br>|11|23.9%|35|76.1%|||
|Chi-square|||||3.26|0.07|
|Black market Dremium|||||||
|Low (Mblkc=75)|23|13.6%|146|86.4%|||
|High (Mblk>75)|16|39.0%|25|61.0%|||
|Chi-square|||||14.09|0.00|
|Fiscal deficit|||||||
|Low (Mbalan>=-4)|5|11.1%|40|88.9%|||
|High (Mbalan<-4)|12|22.6%|41|77.4%|||
|Chi-square|||||2.25|0.13|
|Price distortions|||||||
|Low (Dollar>=100)<br>|12|11.9%|89|88.1%|||
|High (Dollar<100)|24|22.9%|81|77.1%|||
|Chi-square|||||4.30|0.04|
|Low (AHDollar<0.5)|4|9.30%|39|90.7%|||
|High (AHDollar>=0.5)|7|20.6%|27|79.4%|||
|Chi-square|||||1.98|0.16|
|Real interest rate|||||||
|Positive|7|13.7%|44|86.3%|||
|Negative|7|23.3%|23|76.7%|||
|Chi-square|||||1.22|0.27|
|Growth of GDP|||||||
|High (MGDPZ>=2)|13|11.4%|101|88.6%|||
|Low (MGDPZ<2)|16|21.3%|59|78.7%|||
|Chi-square|||||3.43|0.06|

Note: Number of education projects = 228. See, also, the note of Table 4.
world. Including weights would mean that we mostly focus on China and India, where most firms are located. These two countries, however, are not the focus of this paper.

A second concern is that some variables have many missing observations. Although most variables are available for most countries, including all variables in a single regression would result in many observations and countries being dropped. In fact, if we omitted all observations with missing values, we would drop more than 80 percent of firms. To avoid this, we impute values for the variables that account for the most missing observations. The imputed variables include: average level of schooling (8% missing values); the share of the population living in cities with more than 1 million residents (17% missing); and a dummy variable indicating that the firm is located in the capital city (34% missing); the average share of workers that are unionized (68% missing); and the average share of skilled worker in total workforce (46% missing). The country level variables are imputed using quartile dummies for GDP per capita and regional dummies (i.e., Africa, East Asia and Pacific, Europe and Central Asia, Mideast and North Africa, and South Asia). The local averages are imputed using the variables listed above, along with a service industry dummy, and three firm size dummies (i.e., with employees between 10 and 20, 21 to 60, and more than 60). For all variables with missing indicators, we also include a dummy variable indicating that the variable is missing for that observation to pick up any systematic differences between firms with missing and non-missing observations.

The final concern is that many important right-hand-side variables are potentially endogenous. Although it might be possible to find instruments for one or two of them, it is not possible to do this for all of them. We therefore rely on an approach that is commonly used in studies linking investment climate variables to firm performance. Rather than including the potentially endogenous variables directly in the regression, we instead include either countrylevel or local-level variables (see Table 1).<sup>6</sup> For expositional convenience, we refer to cityindustry-year averages as local averages. To the extent the aggregate variables are uncorrelated with the firm-level residuals after controlling for firm characteristics and other investment

> 6 See Aterido and others (2011); Dollar and others (2005); Fisman and Svensson (2007); Harrison and others (2013), and Svensson (2003).

10
along the lines of Noriega-Campero et al. [2020]. The distributional analysis could be combined gainfully with a consideration of multidimensional poverty measures that assess impacts beyond the standard consumptionbased perspective taken here.

In terms of methodological options, alternative variable selection methods that are less prone to suboptimal choices, different predictive models, or non-symmetric prediction intervals that align with the skew of consumption distributions may yield further improvements in the cost-accuracy trade-off. A promising research direction is to move beyond the stopping criterion to a survey design with a question sequence tailored on-the-fly to each household. The adaptation of the tree-based method in Bakker et al. [2021] from classification to regression would be one step in this direction. While computational constraints preclude deployment of a fully-adaptive approach in the field, the development of a semi-adaptive method that deploys a limited set of variable sequences may be a promising research avenue. A related direction would be to tailor data collection to the promotion of more equitable targeting outcomes for economically disadvantaged groups.

# **References**

- Hirotogu Akaike. Information theory and an extension of the maximum likelihood principle. In _Selected papers of Hirotugu Akaike_ , pages 199– 213. Springer, 1998.

- Vivi Alatas, Abhijit Banerjee, Rema Hanna, Benjamin A Olken, and Julia Tobias. Targeting the poor: evidence from a field experiment in Indonesia. _American Economic Review_ , 102(4):1206–40, 2012.

- Ana Areias and Matthew Wai-Poi. Machine learning and prediction of beneficiary eligibility for social protection programs. In _Revisiting Targeting in Social Assistance: A New Look at Old Dilemmas_ , chapter 8. World Bank, Washington DC, 2022.

- Michiel A Bakker, Duy Patrick Tu, Humberto River ́on Vald ́es, Krishna P Gummadi, Kush R Varshney, Adrian Weller, and Alex Pentland. DADI: Dynamic Discovery of Fair Information with Adversarial Reinforcement Learning. _arXiv preprint arXiv:1910.13983_ , 2019.

- Michiel A Bakker, Duy Patrick Tu, Krishna P Gummadi, Alex Sandy Pentland, Kush R Varshney, and Adrian Weller. Beyond reasonable doubt: Improving fairness in budget-constrained decision making using confidence thresholds. In _Proceedings of the 2021 AAAI/ACM Conference on AI, Ethics, and Society_ , pages 346–356, 2021.

- Abhijit Banerjee, Rema Hanna, Benjamin A Olken, and Sudarno Sumarto. The (lack of) distortionary effects of proxy-means tests: Results from a

31
strategy is to use mobile phone data and combine the two types of targeting. On average, given the existing budget available for this type of activity, the cost- eective strategy using mobile phone data performs over 50% better compared to the next best strategy that only relies on incidence in the previous year.

My empirical design accounts for confounders correlated with movement. Using rainfall proxies and month xed eects, I control for seasons and holidays, which drive a large amount of migration in Senegal. I also test that it is not an unobservable correlated with both migration and malaria driving the results, but instead the combination of movement and the malaria levels at origins and destinations. Additional checks show that the relationship between imported incidence and malaria incidence is not driven by some other relationship between origins and destinations as well as to ensure that the relationship holds only for malaria and not for other health conditions. I also test the impact of future imported incidence on malaria incidence in the current month and nd no relationship.

This paper builds on previous health literature that has established travel as a risk factor for contracting malaria, (Montalvo and Reynal-Querol 2007, Lynch et al. 2015, Osorio, Todd, and Bradley 2004, Siri et al. 2010, Littrell et al. 2013), by estimating the size of the causal impact from an expected imported case, which makes it possible to conduct policy simulations and compare dierent targeting strategies. Tatem et al. (2009) and Le Menach et al. (2011) use three months of cell phone data to estimate the malaria importation rate to Zanzibar using a static model that does not account for seasonality due to the limited time frame of their mobile phone data. Similarly, Wesolowski, Eagle, et al. (2012), Enns and Amuasi (2013), Chang et al. (2018) and Ihantamalala et al. (2018) among others, do not incorporate seasonality in incidence and focus on identifying potential sources and sinks based on travel patterns and annual malaria prevalence data. Yet Buckee, Tatem, and J. Metcalf (2017) point out that seasonal variation in biological factors related to climate and seasonal population movements are important for many infectious diseases and failing to account for seasonality could lead to misallocation of resources.

4
from those designed to improve structural factors. Moreover, measuring the lasting success in the fight against poverty using social indicators with large cyclical fluctuations could be misleading since the analysis would be highly sensitive to the time span under consideration. In other words, given the significant influence that business cycles have on the cyclical component of some social indicators like the poverty rate, a policymaker would draw very different conclusions if the response of poverty were evaluated during a boom or a complete (boom-bust) business cycle. In fact, the importance of the cyclical component in social indicators is magnified for the case of emerging markets subject to large external shocks, such as changes in the terms of trade, global liquidity, and world economic activity.<sup>9</sup> All these shocks are cyclical in nature and thus will tend to amplify emerging markets’ business cycles and, in turn, the cyclical components of social indicators.

To formalize the intuition discussed above, we need to compute the relative importance of the cyclical and trend components in each social indicator. We do so with a simple variance decomposition analysis. First, we decompose each time series into a cyclical (C) and trend (T) components: . (1) CC TT tt tt tt We proxy the trend component with a simple linear trend.SS = SS + SS<sup>10</sup> Then, taking the variance of (1), we can

> <sup>10</sup> Then, taking the variance of (1), we can compute the portion of the variance corresponding to each component:<sup>11</sup>

> 9 See, for example, Vegh _et al_ . (2018).

10 Our definition of trend-driven change calls for truly long-term factors driving the trend component in our set of social indicators. As social indicators data are not available for time spans longer than three decades, the identification of this type of low frequency signals is more difficult. Thus, applying any sort of band-pass filter runs the risk of attaching to the trend component some relatively low frequency cyclical fluctuations. Our decomposition (for the social indicators and real GDP per capita) is thus based on the following regression: = β , where is the linear trend, is the regression coefficient, and YYtt + εεis a white noise error. The trend component is obtained tt from = β and the cyclical component is extracted from the residual: tt . ββ ββ εε TT CC TT 11 tt tt tt tt Since we use a linear trend, the cyclical and trend components are uncorrelated by construction. YY YY = YY −YY

> 11

> 12 See Appendix A for the complete list of countries used in the analysis **.**

5
produce correlations by construction with macroeconomic variables, in this paper, we work only with the non-imputed ILO data. Table A1 in the Appendix contains the descriptive statistics of the resulting data sets, including for the unemployment variable.

# _B. Proxies for the Incidence of the Digital Economy_

To study the correlation between the digital economy and unemployment, we rely on two alternative proxies for the incidence of the digital economy. The first, motivated by Hjort and Paulsen (2019), is internet users as a percentage of the population. It is defined as the proportion of individuals using the internet, based on results from national household surveys implemented by national authorities and then reported back to the United Nations. The survey questionnaires were designed by experts under the aegis of the United Nations. These international data are available for a large number of countries from the International Telecommunication Union (ITU), which is the relevant U.N. agency, and spans 2000 to 2017.<sup>4</sup> Since the empirics explore the relationship between the digital economy and frictional or long-term unemployment, we use country averages from 2000-2017 of the ITU indicator as the first proxy of the incidence of the digital economy.

The ITU variable is appealing for its cross-country and over-time coverage, but it might not be a good proxy for the incidence of the digital economy as it does not contain information about the purpose of the use of the internet, or whether it is used to conduct economic transactions. Consequently, we also use another proxy variable that concerns the use of the internet for economic transactions, and thus is consistent with the data used in Bachas et al (2018), Higgins (2018), and Jack and Suri (2014). It is the percentage of the adult

> 4 The data were downloaded in June 2019 from https://www.itu.int/en/ITUD/Statistics/Pages/stat/default.aspx.

9
Institute).

The Freedom House measures political rights (PR) and civil liberties (CL) using, respectively, an index which ranges from 1 to 7, with a higher score indicating more freedom. The ratings are determined by a list of questions. For the political rights index, for example, the questions are grouped into three sub-categories: electoral processes; political pluralism and participation; and functioning of the government. The civil liberties questions are grouped into four subcategories: freedom of expression and belief; association and organization rights; rule of law and personal autonomy; and individual rights. The sum of each country’s sub-category scores translates to a rating from 1 to 7. Following Acemoglu et al. (2005) we transform the indexes so that they lie between 0 and 1, with 1 corresponding to the most-democratic set of institutions.

Another measure of democracy from the POLITY IV data set is considered. Indicators of democracy measure the general openness of political institutions and combines several aspects such as: the presence of institutions and procedures through which citizens can express e¤ective preferences about alternative policies and leaders; the existence of institutionalized constraints on the exercise of power by the executive power; and the guarantee of civil liberties to all citizens in their daily lives and in acts of political participation. In our data set we consider a composite index (Polity2), that ranges from -10 to + 10. This index is also normalized from 0 to 1, with 1 corresponding to the most democratic set of institutions.

Finally, we also consider Economic Freedom of the World (EFW), an index which measures the degree to which countries’policies and institutions support economic freedom. Five broad areas are distinguished: (1) size of government; (2) legal structure and security of property rights; (3) access to sound money; (4) freedom to trade internationally; and (5) regulation of credit, labor and business. This index is also normalized between 0-1.

# Migration

For emigration data, we use the estimates provided in Defoort (2008). Focusing on the six major destination countries (USA, Canada, Australia, Germany, UK and France), she computed skilled emigration stocks and rates by educational attainment from 1975 to 2000 (one observation every 5 years). On the whole, the six destination countries represent about 75 percent of the OECD total immigration stock.<sup>17</sup>

> 17However, for some sending countries, the coverage by the Defoort dataset may be quite low. For

11
39

# **Appendix B: Definitions and Sources of Variables Used in Regression Analysis**

|**Variable**|**Definition and Construction**|**Source**|
|---|---|---|
|Official Development<br>Assistance|Ratio of official development assistance (current USD)<br>to GDP (current USD).|WDI (2006)|
|Emergency Aid||Development Assistance Committee<br>(OECD) (2006)|
|CPIA|Index that assesses a country’s economic management,<br>structural policies, policies for social inclusion/equity,<br>and public sector management and institutions.|World Bank|
|Sectoral Aid|On a commitment basis|Credit Reporting System (OECD) (2006)|
|Real effective exchange<br>rate|Real effective exchange rate is the nominal effective<br>exchange rate (a measure of the value of a currency<br>against a weighted average of several foreign<br>i diidd b i dflt id f t|International Financial Statistics, (2006)<br>supplemented with internal data from<br>IMF Information Notice System.|
|Terms of Trade|currences) ve y a prce eaor or nex o coss.<br>The terms of trade index shows the national accounts<br>exports price index divided by the imports price index.|World Development Indicators (2005,<br>2006) and Loayza et al. (2005)|
|Post-conflict Episodes|Pre-peace: years -4 to -1 prior to the end of conflict<br>which is denoted as time 0. Peace onset: years 0 and 1;<br>post-conflict 1: years 2 until 5; post-conflict 2: years 6<br>until 9.|Authors’ construction using conflict data<br>from Sambanis (2004) and<br>complementing them with data from<br>armed conflict dataset of PRIO for the<br>years 2002-04. www.prio.no|
|Debt ratio|Debt/GDP measured in nominal USD.|WDI (2006)|
|Growth in reserve money|Log difference of nominal reserve money (local<br>currency).|International Financial Statistics, (2006).|
|Change in reserve ratio|Difference of ratio of international reserves to GDP<br>between years t and t-1|WDI (2006)|
|Inflation|Inflation as measured by the consumer price index .|WDI (2006)|
|Growth in nominal<br>exchange rate|Log difference of nominal exchange rates between years<br>t and t-1|WDI (2006)|
|Productivity|Ratio of per capita GDP at factor cost in United States<br>dollars over average GDP at factor cost in United States<br>dollars for Industrial Countries.|Authors' construction using World<br>Development Indicators, 2005|
|Openness|Residual of a regression of the log of the ratio of exports<br>and imports (in current local currency units) to GDP (in<br>local currency units), on the logs of area and population,<br>and dummies for oil exporting and for landlocked<br>countries|World Development Indicators, 2004 and<br>Loayza et al. (2005)|
|Government<br>Consumption|Ratio of government consumption to GDP (current<br>local currency units)|Authors' construction using International<br>Financial Statistics, December 2004 CD-<br>ROM Release, World Development<br>Indicators, 2004, and Africa Live<br>Database (World Bank), 2004|