Allen et al., 2015; Tsivanidis, 2019) by adding intersectoral distortions and factor misallocation to an urban framework. Following Baqaee and Farhi (2020), I provide a formula that decomposes the welfare gains from transit developments into a “direct” effect and an allocative efficiency term. This latter term captures two different components: factor misallocation and agglomeration forces when they differ between the formal and informal sectors.<sup>4</sup> Mexico City constitutes a relevant and informative case study for several reasons. First, it has a dense concentration of economic activity, accounting for around 8.9 million people. Second, the Mexican case is typical of developing countries, especially in Latin America, where more than 50% of the urban labor force and 70% of business establishments are informal.<sup>5</sup> Furthermore, the city constructed a new primary subway line in the early 2000s, connecting remote areas in the north with the center of the city. The entire line was not initially planned by the Government and there were multiple delays in its construction, suggesting that the opening dates were uncorrelated with local demand and supply shocks. Moreover, Mexico City collects unique data that I use to estimate the impact of transit improvements on informality. Throughout, I use the standard definition of informality: a worker is informal if he/she does not receive social security benefits based on the contractual relationship with his/her employer.

At the center of the analysis is a rich collection of administrative microdata. I observe the geography of jobs and worker residences for both the formal and informal sectors at the high granular census tract level. In the analysis, I use four main sources of data. First, I use confidential microdata from several reports of the Mexican Economic Census, covering the universe of business establishments located in Mexico City. Second, I use the microdata of the Mexican Population Census to determine the residence of both formal and informal workers. Third, I use detailed information on the transportation network in Mexico City, which I complement with transportation diaries (origindestination survey data). Additionally, I use the 2015 Intercensal Survey to construct commuting and trade flows at the city level for both sectors. I also use standard household survey data to calibrate some of the parameters of the model.

In the first part of the paper, I document three empirical findings that suggest a negative relationship between the accessibility of jobs and informality.

First, I exploit cross-sectional variation among informal vs. formal workers to show that informal workers spend less time commuting, and work closer to home relative to their formal counterparts. For instance, informal workers spend 40% less time commuting on average. This implies that informal workers are more sensitive to commuting costs than formal workers. These findings are robust to controlling for different sets of fixed effects and individual characteristics.

Second, I compare the residence of informal and formal workers. I document that formal jobs concentrate in the west and center of the city, where most economic activity takes place. By contrast,

> 4See Bartelme et al. (2019) for recent work that studies the effect of optimal policies when agglomeration externalities across sectors or locations.

> 5See Perry et al. (2007) and Ulyssea (2018) who document informality rates in Latin America. In this region, the informal economy varies from 35% in Chile to 80% in Peru.

2