where the subindex _m_ corresponds to one of four different transportation modes: car, metro or metrobus, bus, and walking; _λnism|ns_ is the share of workers that commute to location _i_ from location _n_ working in sector _s_ using the transportation mode _m_ ; time _nim_ is the average commuting time across municipalities _n, i_ using _m_ ; _γnsm_ are origin-transportation-sector fixed effects; _γism_ are destination-transportation-sector fixed effects, and _εnism_ captures the measurement error observed in the data of this gravity equation.

The goal is to recover the parameters _θs_ after knowing _βs_ and _δd_ described in the previous section. The parameter _θs_ captures how sensitive workers are to commute in the formal/informal sector. From the evidence in Section 3, the expected result is that _θI > θF_ , suggesting that informal jobs are easier to subsitute across location. I estimate this equation via the Poisson regression by pseudo maximum likelihood (PPML) to include the zero commuting flows between municipalities. Given the set of fixed effects, the identification comes from comparing the workplace decision of workers that use the same transportation mode and live (work) in the same municipality and sector, but work (live) in different places. Panel A in Table 4 reports the results. As expected, there is a negative relationship between commuting flows and the average commuting times. I find that the commuting elasticity in the formal sector is 3.11, and in the informal sector it is approximately 4.66. These values are consistent with the theoretical assumptions, and they confirm that informal workers are more sensitive to commuting costs than formal workers.

**Trade Elasticities:** To estimate the trade elasticities, I use the 2017 OD Survey focusing on data on trips to different establishments. I restrict the sample to trips to restaurants, retail shops, and factory-outlets. I assume that people move across the city and spend their income on different consumption goods. To estimate a different trade elasticity for the informal and formal sectors, I use the fact that most informal establishments in Mexico correspond to restaurants and retail shops, while most formal establishments are manufacturers, as Figure A6 shows (Levy, 2018). I estimate the following gravity equation relating trade flows _π_<sup>_′_</sup> _s_ across municipalities (trips) with iceberg trade costs:

where the different parameters represent the same variables as in equation 5.2. The identification comes from comparing trips to locations that use the same transportation mode and whose origin (destination) is the same, but in which individuals are moving to (from) a different municipality. I estimate this equation via PPML to include zero trips across locations. The goal is to recover the parameters _σs_ . These parameters represent the elasticity of substitution across varieties for each sector. They measure how sensitive are trade flows to trade costs when people move across the city to buy different goods. In addition, according to the monopolistic model, they also represent agglomeration externalities given by _σs_ <u>1</u> _−_ 1<sup>.Iallowtheseexternalitiestodifferbysector,generating</sup> additional welfare effects from workers’ reallocation. One expected result is that _σI > σF_ , indicating 27