rafmacalaba/data-use-mentions-extended huggingface dataset:
# **3 How to use the** **`outdetect` command**

This section is devoted to illustrating the typical use of `outdetect` . After explaining the syntax, we provide examples of the command “in action”, using a sample of 12,447 households from Malawi’s Fourth Integrated Household Survey (2016-2017).<sup>9</sup> `outdetect` can be installed from the Statistical Software Components Archive by typing `ssc install outdetect` . Stata 15.1 is the earliest version that can run `outdetect` . The core of the command is written entirely in Mata to minimize computation time. The command handles complex survey settings automatically, when `svyset` is used to declare the sampling design features of the data to Stata (see `help svyset` ). The use of `pweights` is also allowed. The general syntax of the command is as follows:

## `outdetect` _varname_ [ _if_ ] [ _in_ ] [ _weight_ ] [ _, options_ ]

`outdetect` identifies extreme values, either “too small” or “too large” observations, in the distribution of `varname` . We shall call these observations bottom outliers and top outliers, respectively (small values being at the bottom of the distribution of `varname` , and large values being at the top). By default, `outdetect` creates a new variable, _ `out` , containing numeric codes that flag outliers of `varname` : 0 observation is not an outlier 1 observation is a bottom outlier (“too small”) 2 observation is a top outlier (“too large”) The output of `outdetect` reports “Raw” statistics (computed using `varname` as is), as well as “Trimmed” statistics (computed using just those observations of `varname` that are not flagged as outliers). A full description of all the available options is provided in the `outdetect` help file.

#
and occupations.

A final important element when analyzing the relationship between innovation and wages is the direction of causality. A particular strand of literature has focused on examining the links between incentive systems within firms and employee innovation activities. Although large-scale quantitative evidence is sparse, it appears that performance-based reward systems have a positive influence on the creativity and “innovative behavior” of individual employees (De Jong and Den Hartog (2007); Ederer and Manso (2013); Gibbs, Neckermann, and Siemroth (2017)) and, in some cases, on the firm’s overall innovation-related activities and outcomes (Leiblein and Madsen, 2009), including for example its patenting propensity (Chen et al., 2016) and quality (Mao and Weathers, 2019). In addition, human resource management and incentive systems play an important role in explaining performance in general (Bloom and Van Reenen, 2011; Bender et al., 2018). Therefore, it is possible that firms increase wages to attract more talented workers and incentivize innovation within firms. This is also consistent with efficiency wage theories (Katz, 1986). Entorf et al. (1999) find for the United States and computer-related occupations that these enjoy a wage premium, although these workers were already better paid before introducing the new technologies. Thus, there can be some “self-selection” of firms that pay higher wages to provide incentives to workers who can implement innovative projects.

Thus, in addition to estimating whether there is a wage premium associated with innovation, it is critical to understand whether this is the outcome of firms that “self-select” into innovation by paying higher wages already or, on the other hand, whether these higher wages of workers capture part of the rents and firm performance gains associated to innovation. The objective of this paper is to shed some light on these questions using a large national employer-employee census (RAIS) in Brazil, and employing a novel measure of innovation based on the share of technical and scientific occupations of the firm (
In one of the few studies that asks directly about preferences, Kusago and Barham (2001) ask each member of a couple in Malaysia how they would spend an additional $40 across thirteen expenditure categories. They then calculate a measure of preference heterogeneity within the household. When this measure is included, it improves the estimation of expenditure decisions. Demographic studies examining fertility decisions do occasionally explicitly ask both husbands and wives about preferences, especially with regard to the number of desired children (e.g. Bankole 1995). Prabhu (2010) asks husbands and wives about their willingness to pay for malaria vaccines, eliciting their different preferences. But most analyses of bargaining within the household simply infer preferences.

_Consumption:_ Consumption measures, broadly defined, are a measure of people’s well-being. Consumption or expenditure measures are often used as a better measure of well-being than income; incomes fluctuate more than expenditures. Thus, examining consumption outcomes may provide direct or indirect evidence on the allocation of resources among household members.

Because most household surveys do not include individual level expenditure or consumption data, it is not possible to tell which individuals consume particular goods. For any goods that are public or shared goods within the household, it is impossible to attribute expenditure to individuals without making strong assumptions. In the case of private goods, those consumed by individuals, it may be possible to obtain information on expenditures on men’s goods, women’s goods, or children’s goods. For example, Dunbar et al (2010) categorize clothing expenditure in this way. Deaton (1989) uses adult clothing as a private good to analyze 24
2014) observes that in the State of Andhra Pradesh in India, enrollment in private preschools is associated with significantly higher test scores at the beginning of primary school relative to those in public preschools. The results highlight the role of preschool type in the emergence of test score gaps at school-entry.

Existing research typically does not take into account different types of early education pathways in predicting children’s performance as they transition into primary school given that such data are often unavailable. Our study leverages a uniquely rich data set from rural Indonesia that links children’s test scores in the first few years of primary school with detailed histories on their early education pathways. Moreover, we extend prior research by examining the sequence, 4
[0.036]|[0.033]|[0.160]|[0.230]|
|Observations|173|289|257|509|257|509|286|626|
|R-squared|0.557|0.413|0.314|0.370|0.245|0.218|0.461|0.475<br>BFA,|
|||||ETH,|ETH|BFA ETH|ETH,|ETH,|
|Cntri|ETH,|ETH,|ETH,M|MWI,|,<br>MWI|, ,<br>MWINGA|MWI,|MWI,|
|oues|NGA|NGA|WI,NGA|NGA,|,<br>NGA|,<br>ZWE|NGA,|NGA,|
|||||ZWE||,|SLE|SLE,|
|||||||||ZWE|

Source: HFPS-Wave 1.

Notes: Urban observations only. Adult defined as 25 years old or more. Omitted categories: Below 2.15 USD-a-day. Robust standard errors clustered at the subnational geographic units between brackets. *** significant at 1%, ** 5%,

* 10%.

To sum up, in the first months of the crisis, urban households, especially those with non-farm enterprises, experienced significant income loss. Some – mostly those with farm income – coped by selling assets but most did not employ any additional coping strategies when incomes fell. Women fared worse than others, both in terms of income loss, and in having access to coping strategies. Adults experience greater income losses than youth but also had more access to assistance from an outside source. Those with different levels of poverty fared similarly, both in terms of income losses and use of coping strategies, though trends suggest that the non-poor were more successful in acquiring help from others while not selling off assets
capita real GDP growth (US$ of 2000) HP filter<br>US$ of 2000 per capita<br>annual growth from Real US$ 2000<br>1961 1963 1965 1967 1969 1971 1973 1975 1977 1979 1981 1983 1985 1987 1989 1991 1993 1995 1997 1999 2001 2003 2005 2007 Cape Verde Ghana Sierra Leone Nigeria Liberia Gambia, The Niger Burkina Faso Mali Guinea Senegal Benin Guinea‐Bissau Togo Cote d'Ivoire SSA LICs MICs<br><!-- End of picture text --> _Source:_ DDP data, World Bank.

**Togo’s more recent real per capita income growth rate of ‐0.1%, 2004‐2008, was the second lowest of the ECOWAS countries**<sup>**5**</sup> **and much lower than the average growth rate of Sub‐Saharan Africa (3.2%) as well as that of**

> 4 After the one‐party system, people started their fight for democracy in the beginning of the 1990s. President Gnassingbe Eyadema died in February 2005 after 38 years in power and immediately replaced by his son Faure Gnassingbe. International pressure forced him to hold an election, but his victory was soon disputed by the opposition and some international observers. This triggered violence, hundreds of lives were claimed and tens of thousands fled to neighboring countries. In August 2006 an agreement, Accord Politique Global (APG) was signed and parliamentary elections were held in October 2007, starting a new period of reconciliation and focus on economic reforms.

> 5 The Economic Community of West African States (ECOWAS) is a regional group of 15 West African countries founded in 1975, with the main mission of promoting economic integration among its members. It includes: Benin, Burkina Faso, Cape Verde, Côte d'Ivoire, Gambia, Ghana, Guinea (suspended after 2008 coup d’etat), Guinea‐Bissau, Liberia, Mali, Niger, Nigeria, Senegal,
of Brazil, Dilma Rousseff, in 2016 as the mainstream Brazilian political parties formed an alliance to withstand the ‘voice of the street’, herewith inducing anti-elitist sentiments (Enstanque, 2015) and opening up space for the entry of new parties. In the end, the vote for the Partido Social Liberal was not only a vote against the Partido dos Trabalhadores, but also a protest vote against the current social contract.

Ideally, in our analysis, we would like to link the decline in SWB to the decline in support for the social contract and the switch in voter support from one end of the political spectrum to the other in the 2018 general elections. Unfortunately, we do not have data from the GWP to answer this question because the Poll does not include questions on voting behavior. However, using information from the Brazilian Electoral Study - a post-electoral national survey that is carried out by the Center for Studies for Public Opinion - we explore whether the incumbent party was indeed punished for the economic and leadership crisis associated with the decline in SWB in the second half of the 2010s.

# _5.1. Demographic characteristics of Bolsonaro supporters_

Our analysis builds on the studies of Amaral (2020) and Rennó (2020) and utilizes a survey collected for the Brazilian Electoral Study (Meneguello, 2019), which is part of the Comparative Study of Electoral Systems Project (CSES), coordinated by the University of Michigan. This survey is nationally representative and provides data on the voting behavior and other characteristics of 1,734 Brazilians. Specifically, we obtain information on whether (1) respondents voted for the presidential candidate of the Partido Social Liberal during the two rounds of the presidential election and whether (2) respondents voted during the 2014 elections for the candidate of the incumbent Partido dos Trabalhadores.<sup>24</sup> For brevity, definitions of variables included in our analyses can be found in Appendix E. We use a logistic regression to test which factors were associated with voting for the Partido Social
# **1. Introduction**

_<mark>“Democracy is the worst form of government, except for all the others.”</mark>_ <mark>W</mark> inston Churchill The debate over the relative benefits of democracies over autocracies has become heated. Democracies are often criticized for being less responsive. The above-mentioned quote epitomizes the apparent trade-off between legitimacy and efficiency in democracies. But is it really so? In the present paper we provide evidence against that trade-off. Indeed, we uncover one important channel through which democracies display a built-in mechanism for self-correction that is “reform chatter”. We find that reform chatter peaks during economic downturns, followed by improved popular attitudes in turn leading to actual reforms.

The political debate over reforms had traditionally revolved around their timing and consequences. The pioneering work on the political economy of reforms steered the debate toward the determinant of reforms and issues of political feasibility (Alesina and Drazen 1991). Yet little is known about attitudes toward reform in the public square. Arguably, understanding public chatter illuminates the presence of support for public policy.

This paperuses text analysis from about a billion newspaper articles to explore the dynamics of reform chatter. Our measure of chatter intensity uses Dow Jones FACTIVA, a global repository of newspaper articles. The approach is akin to Baker et al. (2016) who use the same data to construct an index of economic policy uncertainty. We refine the search method in several directions, beyond the search of keywords like “economic reform” in press articles. In particular, we distinguish between international and local media sources; and across media in 28 different languages. Also, we use machine learning techniques such as topic modeling to ascertain the informational content of reform chatter (Blei et al. 2003).

We compute a measure of attitudes around reform to get a sense of whether or not reform is put forth with a positive lens. This paper contributes to the large and growing economic literature using text analysis and machine learning
are made by motorcycle (JICA 2013). Compared to other large cities in Africa, Nairobi has the largest share of walking trips despite rising and relatively high motorization rates compared to other major African cities (JICA 2006; JICA 2014; Kumar and Barrett 2008).

The overall average travel time per trip in Nairobi is 47 minutes, but differs when compared by gender, age, personal income level, mode, and trip purpose. Higher earners generally make longer trips (by time), while average travel times for motorized modes hover between 54 and 60 minutes per trip (excluding motorcycles, which average 38 minutes per trip).

Traffic congestion is a growing problem in Nairobi, resulting from rapidly increasing population and the crowding of motorized traffic onto a limited street network. Indeed, IBM ranked Nairobi fourth highest in its “commute pain” survey in 2011, indicating that the city hosted one of the world’s longest traffic jams, 2.1 hours. According to the World Bank’s Kenya Urbanization Review (World Bank 2016), increasing average commuting speeds from the average recorded 13.5kph to 20 kph would save $54.1 million USD per year and decrease time spent traveling by 30 percent. Increasing average travel speeds to 30 kph would save $93.4 million USD per year and decrease time spent traveling by 54 percent.

> 6 as measured by the Kenyan Census.

> 7 according to landscan data (Bright, Rose, and Urban 2013).

5
-18-

# Mexico

The sources for Mexican national accounts estimates have been more carefully described than those of our other countries. For the period 197078, there is a massive 8 volume study (SPP, 1981) prepared by the Mexican authorities with the help of a team of foreign experts. This study is a major revision of the national accounts, with increases in the estimates of GDP level, and changes in growth of real product. The two volumes on manufacturing contain 1,441 pages of statistics and source description. These permit a detailed confrontation by branch of gross values, input values, value added, wages and salaries, indirect taxes, gross profits and employment with the figures in the tenth industrial census in Mexico (SPP, 1979a and 1979b). Mexico also has an input-output table for 1975 (table 2.5 below).

The national accounts estimate of manufactur'lng value added for 1975 is 38 per cent higher than that of the census when one adds petroleum refining, which is excluded from the census because output is largely confined to one government enterprise, PEMEX. The differences by branch can be seen in detail in table 2.3 in which the industrial census figures are adjusted to the same conceptual basis as the national accounts, the difference between the two sources being due to inadequate coverage of informal activity in the industrial census. The national accounts estimates are based on a variety of sources including the census, and in many cases it is explicitly stated that output is inadequately covered in the census. The ratio of the national accounts estimates to the census figures varies considerably from industry to industry. For food products, the national accounts figure is 229.7 per cent of the census, whereas for primary metals and metal products it is lower than that of the census. The underestimation in the census does not seem to be confined to small establishments. One can infer this from the fact that output per person employed is generally lower in the census than in the national accounts figures. One
February 2021. The R<sup>2</sup> values for these models are still substantial, however, and range from 22 to 26 percent for the incidence of income declines and are 15 percent for current employment.

3. When limiting the sample to urban regions only, real-time indicators are far more successful in explaining within-region variation in income declines and employment between April 2020 and February 2021. The R<sup>2</sup> values for these models range from 29 to 55 percent for the incidence of income declines and are 33 percent for current employment. Improved predictive performance in urban regions appears to be partly due to the greater predictive accuracy of Google search terms.

4. Google mobility measures are strongly associated with work stoppage and changes in current employment, as well as declines in farm, non-farm enterprise, and wage income, during both the initial phase and the subsequent period.

5. Google search terms related to food, money, jobs, and religion were also strong predictors of income declines and work stoppage during the initial stage of the crisis. Google searches related to food, assistance, religion, and in some cases exercise were strong predictors of changes in the prevalence of income declines and employment as the crisis evolved.

6. In general, Google search and mobility information are far more predictive of income and employment changes than satellite data from vegetation, pollution, and night-time lights. However, vegetation levels strongly predict a measure of food insecurity and the share of students that quit school, while pollution is a moderately strong predictor of work stoppage, current employment, and non-farm and wage changes. Night-time lights were not selected by LASSO in any of the predictive models.

Taken together, our findings suggest that these real-time indicators, particularly Google mobility and search terms, predict a respectable amount of the variation in changes in wellbeing. The signs – positive or negative correlation – are often intuitive, especially when explaining variation over time. Real-time indicators were better able to predict cross-sectional variation in initial
economic complexity for a given income level, aiming to uncover the factors driving their overperformance. Economic complexity refers to the knowledge intensity of an economy, captured by the diversity and sophistication of the goods and services it produces. The Economic Complexity Index (ECI), initially developed by Hidalgo and Hausmann (2009), measures this complexity by analyzing a country's export mix, reflecting its capabilities to produce and export diverse, high-value products. More recently, the ECI expanded to technology, based on patents data, and research, based on research papers (Stojkoski, Koch, and Hidalgo, 2023), since trade data can miss key information about innovative activities.

Using this methodology, we categorize distinct groups of AI overperformers based on their Economic Complexity Index (ECI) and their preparedness and readiness levels. Notably, overperformers are not simply the countries with the highest AIPI scores but those that (i) meet a minimum AIPI threshold and (ii) outperform their predicted scores given their economic complexity. Among high-income economies, global overperformers include Australia, Japan, the Netherlands, New Zealand, three of the four Asian Tigers (Hong Kong SAR, China; Singapore; and the Republic of Korea), and Northern European countries such as Denmark, Finland, and Norway—aligning with findings on the long-term determinants of AIPI detailed later. Upper-middle-income local overperformers comprise Albania, China, Costa Rica, Indonesia, Kazakhstan, Malaysia, and Ukraine. Finally, lower-middle- and lowincome local overperformers include Ghana, India, Morocco, Rwanda, Sri Lanka, Tunisia, and Viet Nam.

From this list of AI overperformers, we observe that AI regulation and ethics consistently emerge as top drivers of AI preparedness across income groups, emphasizing the universal importance of institutions in managing AI integration. In low- and lower-middle-income countries (LICs/LMICs), regulation and workforce development dominate, reflecting foundational priorities amid resource constraints, while digital infrastructure and innovation receive less emphasis. For upper-middleincome countries (UMICs), regulation and human capital remain
3<br>23.4 23.2 23.4<br>22.6 12.1 12.3 12.3<br>20.5 10.6 11.1<br>19.3<br>18.4 18.3<br>17.6<br>15.6 15.5 5.8 6.0 5.9 6.0 5.9<br>1990 1995 2000 2005 2010 1990 1995 2000 2005 2010<br>Year Year<br>% ninis 15-18 % ninis 19-24 Ninis 15-18 Ninis 19-24<br>% ninis 15-24 Ninis 15-24<br>30.0 20.0<br>25.0 15.0<br>20.0 Ninis (Millions) 10.0<br>Ninis (% relevant age group)<br>15.0 5.0<br><!-- End of picture text --> Source: authors’ own computation with data from CEDLAS and The World Bank (2015) _Gender:_ Figure 10 presents a breakdown of nini trends by gender in both percentage and absolute terms, and for both the 15 to 18 and the 19 to 24 age groups. The results show that while detachment from both education and the labor market is still more common among women than among men, female ninis have decreased both as a share of young women and in absolute terms over the period from 1992 to 2010. Moreover, this reduction in female ninis drove the overall reduction in the share 16