Two-Sided Sorting of Workers and Firms:
Implications for Spatial Inequality and Welfare∗
Guangbin Hong†
University of Toronto

February 20, 2024

Abstract
High-skilled workers and high-productivity firms co-locate in large cities. In this paper, I study
how the two-sided sorting of workers and firms affects spatial earnings inequality, efficiency of theallocation of workers and firms across cities, and the welfare consequences of place-based policies. I
build a general equilibrium model in which heterogeneous workers and firms sort across cities and matchwithin cities. I estimate the model using Canadian matched employer-employee data and decompose
the urban earnings premium, finding that worker and firm sorting account for 67% and 27% of thispremium, respectively. The decentralized equilibrium is inefficient as low-productivity firms overvalue
locating in high-skilled cities. The optimal spatial policy would incentivize high-skilled workers andhigh-productivity firms to co-locate to a greater extent while redistributing income towards low-earning
cities, leading to a 6% increase in social welfare. Model counterfactuals underscore the importance of
two-sided sorting when evaluating distributional and aggregate outcomes of place-based policies.
Keywords: Two-sided sorting, matching, spatial inequality, place-based policies, optimal spatial
policy.
JEL codes: E25, R12, R13.

∗ I am deeply indebted to Nathaniel Baum-Snow, Joseph B. Steinberg, Kevin Lim, Serdar Ozkan, and Kory Kroft for theircontinuous guidance and support. I have benefited significantly from discussions with Gabriel Ahlfeldt, Treb Allen, Costas
Arkolakis, Patrick Bayer, David Berger, Adrien Bilal, Mons Chan, Arnaud Costinot, Sebastian Dyrda, Maximiliano Dvorkin,
Min Fang, Cecile Gaubert, Hans Koster, Thibaut Lamadon, Rasmus Lentz, Enrico Moretti, Peter Morrow, Dávid Nagy, Ezra
Oberfield, Fernando Parro, Charly Porcher, Diego Restuccia, Esteban Rossi-Hansberg, Hannah Rubinton, Ana Maria Santacreu,
Chris Severen, Immo Schott, Gregor Schubert, William Strange, Felix Tintelnot, Matthew Turner, Xincheng Qiu, and Yue Yu, andfrom presentations at Bank of Canada GSPA Workshop, the RUSH Browbag, the UEA North American Meeting, Federal Reserve
Bank of St. Louis, the Asian Meeting of the Econometric Society, the Labor, Firms, and Macro Workshop, the Canadian Economic
Association Annual Meeting, the UEA Summer School, and the Midwest Macroeconomic Meeting, as well as numerous seminars
at the University of Toronto. I thank Kalan Couch for his excellent research assistance. The empirical analysis of this paper isconducted in the Statistics Canada Research Data Center (RDC). I sincerely appreciate Lady Bolongaita, Angela Prencipe, andBassirou Gueye for helping me with the use of the Canadian Employer-Employee Dynamics Database, and I thank CRDCN for its
generous financial support. The results and views expressed in this paper are those of the author and do not represent Statistics
Canada. All remaining errors are on my own.
† Department of Economics, University of Toronto. Email: g.hong@mail.utoronto.ca.

1Introduction

Spatial earnings inequality is accompanied by the sorting of high-skilled workers and high-productivity
firms into larger cities.1 Local governments around the world spend billions of dollars annually onplace-based policies aimed at attracting the best workers and firms.2 What are the roles of worker andfirm sorting in shaping spatial inequality? Is the spatial allocation of workers and firms efficient? Can
place-based policies improve welfare by reallocating workers and firms? Answering these questions
requires a model with two-sided spatial sorting of heterogeneous workers and firms, yet the literature hasstudied worker sorting and firm sorting in isolation.3
In this paper, I develop a new two-sided sorting general equilibrium model and estimate it with Canadianmatched employer-employee data. I find that worker sorting, firm sorting, and city characteristics contributeto 67%, 27%, and 6% of the earnings premium of larger cities, respectively. Production complementarity
between worker skill and firm productivity is key to explaining the co-location of high-skilled workers
and high-productivity firms. Novel firm sorting externalities arise from the interplay of spatial sorting
and local matching. Low-productivity firms overvalue locating in larger cities, where they compete forhigher-skilled workers against high-productivity firms. I evaluate the impacts of place-based policies byaccounting for two-sided sorting in general equilibrium. The optimal spatial policy would incentivize
high-skilled workers and high-productivity firms to co-locate to a greater extent while redistributing income
towards low-earning cities, leading to a 6% increase in social welfare. I also find that commonly considered
place-based subsidies may have unintended deleterious distributional or aggregate consequences. The
unifying theme throughout my analysis underscores the importance of two-sided sorting in understanding
spatial inequality and evaluating place-based policies.
I begin with some descriptive evidence to motivate my analysis. First, city mean earnings and within-city
earnings variances significantly increase with city population in Canada, which is consistent with existingfindings in other countries (e.g. Baum-Snow and Pavan (2013) for the U.S. and Dauth et al. (2022) for
Germany). Second, to investigate the role of worker and firm heterogeneity, I decompose individual
earnings into worker and firm fixed effects following Abowd et al. (1999), henceforth AKM, and performa set of decomposition exercises. Higher worker and firm fixed effects in larger cities explain about
three-quarters and one-quarter of the urban earnings premium, respectively. Third, stronger positive
assortative matching in larger cities contributes to about one-fifth of the city-size gradient of within-city
earnings variance.4 In sum, the evidence sheds light on the role of spatial sorting and local matching ofheterogeneous workers and firms in spatial earnings inequality. However, the reduced-form evidence
1See Combes et al. (2008), Eeckhout et al. (2014), and Diamond (2016) for evidence of worker sorting, Gaubert (2018), Bilal(2023), and Lindenlaub et al. (2022) for evidence of firm sorting, and Bauluz et al. (2023) for cross-country evidence of spatial
inequality.
2For example, many U.S. states compete for high-skilled workers by offering low taxes (Moretti and Wilson, 2017). Many
local governments offer substantial subsidies to attract productive firms to locate in their jurisdictions (Greenstone et al., 2010),
including the recent bidding war for Amazon HQ2. For reviews of the literature on place-based policies, see Glaeser and Gottlieb(2008); Neumark and Simpson (2015); Austin et al. (2018); Duranton and Venables (2018); Ehrlich and Overman (2020); Bartik(2020); Slattery and Zidar (2020).
3See Behrens and Robert-Nicoud (2015) and Diamond and Gaubert (2022) for reviews of the literature on spatial sorting.
4Using the same methodology, Dauth et al. (2022) document that larger cities have higher-quality workers and firms, andgreater extents of assortative matching than smaller cities in Germany. Card et al. (2023) show that these patterns are also present
across U.S. cities. However, neither of these two papers aims to rationalize the spatial allocation of workers and firms using ageneral equilibrium model or study the welfare implications of spatial sorting.

1

can neither explain why workers and firms choose locations in such ways nor be used to conduct policy
counterfactuals.
Motivated by the descriptive evidence, I build a general equilibrium model in which heterogeneous
workers and firms sort across cities and match within cities. The model incorporates the new monopsonymodel (Card et al., 2018; Manning, 2021; Lamadon et al., 2022) into the Rosen-Roback model (Rosen,
1974; Roback, 1982), thereby establishing a link between two-sided spatial sorting and local matching in a
general equilibrium context. In the model, workers differ in skills, while firms differ in their production
technologies and skill-specific amenities. The model allows for production complementarity between
worker skill and firm productivity, which generates greater match returns for higher-skilled workers andhigher-productivity firms. Cities differ in exogenous productivity, skill-specific amenities, and the amountof land, which is used by local developers to produce housing for residential and production purposes.
City productivity is also endogenously related to the population through agglomeration spillovers.
Workers and firms choose locations to maximize utilities and profits, respectively.5 Within a city, eachfirm posts skill-specific wages and each worker chooses which firm in the city to work for based on wages,
non-wage amenities, and idiosyncratic preferences that are unobserved by firms. Local matching affects
city-specific utilities for workers and profits for firms, which in turn influence their spatial sorting choices.
One key implication is that an increase in the number of firms in a city benefits local workers by offering awider array of employment options, yet it decreases local firms’ profits by congesting the local labor market.
The equilibrium interaction of these forces determines the spatial sorting and matching of workers andfirms, resulting in the spatial wage structure.
To study the welfare implications of two-sided sorting, I then solve the social planner’s problem
and characterize sorting inefficiencies in the laissez-faire equilibrium. I find two novel types of firm
sorting externalities, namely the labor market stealing and love-of-variety externalities, that cause spatial
misallocation.6 Specifically, when a firm chooses to locate in a city, it competes for workers from other firms
either in the city or in other cities, which impacts the profits of affected firms and aggregate output. In
addition, this firm generates welfare gains for local workers through a love-of-variety effect, since workers
view local firms as imperfectly substitutable workplaces. Neither of these two effects is internalized byfirms when they make location choices.
The externalities are a result of spatially segmented and imperfectly competitive local labor markets.
Workers’ idiosyncratic preferences give rise to firms’ local labor market power. However, the idiosyncratic
preferences are unobserved to firms, which makes them unable to offer individual-specific wages toaccount for the preference heterogeneity. This information asymmetry results in a fundamental market
failure in local labor markets, generating distortions in the lassez-faire equilibrium through firms’ inefficient
location choices. The cost of spatial misallocation is greater when there exists worker-firm production
complementarity, amplifying negative labor market stealing externalities caused by low-productivity
firms when they compete for high-skilled workers.Therefore, a utilitarian planner would reallocate lowproductivity firms towards smaller, lower-skilled cities to achieve the efficient spatial allocation. In addition,
the planner would redistribute income from larger, high-wage cities towards smaller, low-wage cities for
5The location choices are also affected by workers’ and firm owners’ idiosyncratic preferences.
6As widely studied in the literature (e.g. Fajgelbaum and Gaubert (2020)), worker sorting is inefficient as workers do notinternalize the agglomeration spillovers, which benefit both local workers and firms.

2equity considerations.
I structurally estimate the model using Canadian matched employer-employee data. Despite its
complexity, the model yields estimating equations that facilitate transparent identification of the model
parameters. Most parameters, including the sorting elasticity parameters, the amenity parameters, and theparameters related to housing demand and supply, can be identified from the estimating equations following
established approaches in the literature. A key challenge is the separate identification of city, firm, andworker productivity parameters, which are crucial for quantifying the importance of two-sided sorting.In
particular, the model gives rise to an empirical earnings equation that is additive in city productivity, firm
productivity, and worker-firm interaction, where the last term is a product of the corresponding firmcomplementarity parameter and worker skill. Applying a movers design, which is used to identify thetwo-way fixed effects AKM equation, necessitates both exogenous worker movements across firms andexogenous firm movements across cities.7 However, firm movements are highly selective, endogenous, andpoorly measured in the data, making them unreliable for the purpose of identification.
I address this challenge by utilizing worker movements across firms and revealed location choicesof firms. First, I follow Bonhomme et al. (2019a) to identify worker skills and the firm complementarity
parameters from changes in earnings when workers move across firms.8 Then, I utilize the insight from the
Rosen-Roback model to identify city productivities from revealed firm location decisions. The intuition isthat unobserved city productivities can be estimated as compensating differentials to explain the observed
firm sorting shares, after controlling for other determinants of firm profits (e.g. commercial rents andworker composition). For example, a city is inferred to be productive if it has high commercial rents and atight labor market, but a disproportionately large share of firms choose to locate there. In summary, myapproach leverages both the structure of my model and the richness of the matched employer-employee
data. This approach allows for the separate identification of city, firm, and worker components in theircontribution to earnings differentials, which is novel in the literature.
I use the estimated model to decompose spatial earnings inequality, which stems from both location
heterogeneity and two-sided sorting of heterogeneous workers and firms. Quantitatively, I find thatworker, firm, and city heterogeneity explain 66.8%, 26.8%, and 6.6% of the urban earnings premium,respectively.9 Two additional insights are worth highlighting: First, I find a significant degree of production
complementarity between worker skill and firm productivity, which is crucial for explaining the sorting
pattern and urban premium. The interplay between production complementarity and the spatial variation
in location fundamentals leads to the systematic sorting of high-skilled workers and high-productivity
firms into larger, more productive cities. Model counterfactuals show that the urban earnings premium
would decrease by 40.6% if production complementarity was absent. Second, the estimated agglomeration
spillovers appear to be rather modest when accounting for worker and firm heterogeneity across cities.
Therefore, spatial frameworks with limited heterogeneity may conflate the contributions of sorting and
7Although I observe between-city worker movers and within-city between-firm worker movers, it is not enough to separately
identify firm and city productivities using worker movers. There will be a city-level normalization for firm productivity estimates,
which prohibits the comparison of firm productivity between cities.
8To mitigate limited mobility bias (Andrews et al., 2008), I follow Bonhomme et al. (2019a) to group firms into clusters basedon firms’ empirical earnings distributions. The clustering exercise to uncover firm heterogeneity is non-trivial as earnings contain
information on both firm and city characteristics. See Section 5 for an iteration algorithm that I develop to overcome this challenge.
9These three shares do not sum up to 100%. The residual -0.2% is explained by the iteration component, which captures themean earnings premium from high-skilled workers matched with high-skill-complementary firms in each city.

3

agglomeration spillovers, potentially leading to an overestimation of the agglomeration elasticity.
I use the model to conduct four counterfactual exercises: 1) the optimal spatial policy, 2) local wage
subsidies to productive firms in Toronto, 3) local wage subsidies in low-paying cities, and 4) the rise of
remote work. The results of all four exercises underscore the importance of the sorting interdependence ofworkers and firms in evaluating the outcomes of spatial policies and spatially impactful changes.
I show that the optimal spatial policy, implemented with type-location-specific taxes, would strengthen
the co-location of high-skilled workers and high-productivity firms in high-productivity cities. By
harnessing production complementarity and better location fundamentals, this reallocation leads to a
9.6% increase in total output. Interestingly, to minimize the negative labor market stealing effects, theoptimal policy tends to decrease the number of low-productivity firms in higher-skilled, larger cities, while
increasing the number of high-productivity firms there. This result synthesizes the findings of Gaubert(2018) and Bilal (2023) on the optimal spatial allocation of heterogeneous firms. The former finds it is
optimal to reallocate more firms to larger cities to gain from the productivity advantage and agglomeration
spillovers, and the latter suggests moving unproductive employers to lower-wage cities to decrease labormarket congestion in higher-wage ones. On top of that, two-sided sorting causes workers to move in a waythat strengthens the co-location of better workers and firms. Furthermore, the optimal policy implements
spatial transfers from high-wage cities to low-wage cities. Overall, the induced spatial reallocation andtransfers give rise to a consumption-equivalent welfare gain of 6.5%.
For the counterfactual analysis of place-based subsidies and the rise of remote work, I show thatthe location choice interdependence of workers and firms significantly magnifies their aggregate anddistributional effects. To show this, I compare the counterfactual results of the full model with model
scenarios in which I limit mobility to either workers or firms. For example, I show that a 5% wage subsidy
to the firms with productivity in the top five percentiles, if they choose to locate in Toronto, would increase
total output and the city Gini index by 0.8% and 19.7% respectively in the full model. However, theincreases are much smaller with only one-sided resorting. Total output and the city Gini index increase by
only 0.3% and 3.2% respectively with only workers re-sorting, while these changes are 0.7% and 11.7%
respectively with only firms re-sorting. In the model counterfactual of remote work, I show that if 25% ofworkers who can conduct their job from home switch to remote work, the total population and the numberof firms in the largest five Canadian cities would decrease by 2.7% and 8.0% respectively.10 Total output
would increase by 9.4% because the remote work arrangement loosens the co-location constraint and thus
facilitates better worker-firm matches. The spatial reallocation of workers and the change in total output
are both smaller if firms’ locations are held fixed.
This paper is closely related to three strands of literature. First, I contribute to the literature on spatial
inequality (Combes et al., 2008; Glaeser, 2008; Moretti, 2013; Baum-Snow and Pavan, 2012; Behrens et al.,2014; Behrens and Robert-Nicoud, 2015; Davis and Dingel, 2020; Gaubert et al., 2021a; Porcher et al., 2023),
which has shown that larger cities exhibit higher average wages, high-skilled worker shares, skill premia,
and housing costs. There has been a growing body of literature that studies spatial sorting of heterogeneous
agents, including worker sorting (Gould, 2007; Baum-Snow and Pavan, 2013; Diamond, 2016; Davis andDingel, 2019; Diamond and Gaubert, 2022) and firm sorting (Forslid and Okubo, 2014; Gaubert, 2018; Bilal,
10Following the methodology developed by Dingel and Neiman (2020), Deng et al. (2020) estimate that in Canada, 60% ofcollege-educated workers and 29% of non-college-educated workers can carry out their work from home.

42023; Lindenlaub et al., 2022), and quantifies the contribution to the urban wage premium. However, theseworks have studied worker and firm sorting in isolation. I contribute to this literature by developing a
two-sided sorting model where the location decisions of workers and firms are interdependent. A key
takeaway from my findings is that the interdependence of worker and firm sorting plays a crucial role inshaping spatial inequality and outcomes of place-based policies.
Of particular relevance to my paper is Hoelzlein (2023), who studies how two-sided sorting withina city affects the welfare impacts of place-based policies that target specific neighborhoods. In addition
to focusing instead on spatial sorting across cities, my paper (1) models the matching of heterogeneous
workers and firms in a local labor market, (2) separately identifies city, worker, and firm productivities
using matched employer-employee data and structurally decomposes the spatial earnings differentials,
and (3) formalizes the sorting externalities and designs the optimal policy. Nonetheless, I view these two
papers as complementary to each other in studying the interaction of firms’ and workers’ location choices.
Second, I contribute to the literature on optimal spatial policies (Glaeser, 2008; Kline and Moretti, 2013;
Fajgelbaum and Gaubert, 2020; Gaubert et al., 2021b; Henkel et al., 2021; Rossi-Hansberg et al., 2019), which
has mainly focused on correcting inefficient sorting in the presence of local productivity and amenity
spillovers. I show in my two-sided sorting framework that there is also inefficient firm sorting due to labormarket stealing and love-of-variety externalities. The labor market stealing effect is similar to the one ofthe pooling externality studied by Bilal (2023).11 That is, low-productive firms compete for workers withhigh-productive ones in large cities, but it is further magnified by the presence of firm-worker production
complementarity in my framework. I also distinguish local and national labor market stealing since workers
also spatially follow firms from other cities. The two sources of externality that I find are a local labormarket analog of firm entry inefficiency studied by Dixit and Stiglitz (1977) and Mankiw and Whinston(1986), who show that firm entrants do not internalize business stealing from other incumbent firms andhouseholds’ love-of-variety preference for more product varieties. To my knowledge, this is the first paperthat formalizes such firm sorting externalities across local labor markets.
Lastly, my work relates to studies on earnings inequality that decompose earnings following AKM
and subsequent papers that build on the AKM approach (Abowd et al., 1999; Card et al., 2013; Songet al., 2019; Bonhomme et al., 2019a; Lamadon et al., 2022). I contribute to this literature by incorporating
geography into the earnings equation to reflect the impact of location characteristics on earnings. Some
recent studies have applied the AKM approach to decompose the spatial earnings disparity into local
worker and firm/industry components (Dauth et al., 2022; Card et al., 2023). In particular, Dauth et al.
(2022) show that the rise in co-location of high-quality workers and high-quality plants is a key factor in
explaining the growth of spatial inequality in Germany. However, the reduced-form approach cannot
separately identify the city effect from the firm/industry effect. I achieve such identification with the aidof the structural model and show that the city effect explains a small yet nontrivial share of the urban
earnings premium.
The rest of the paper is organized as follows. I describe the data and present the descriptive facts in
Section 2. Motivated by these facts, I formulate the two-sided sorting spatial equilibrium model in Section
11As discussed in Bilal (2023), this externality is a spatial analog of Acemoglu (2001) in a frictional labor market with random
search, where wages do not price vacancy filling rates. In my framework, the externality arises because firms’ wage posting does
not price its effect on labor market congestion.

5

3, followed by discussions on its equilibrium properties on efficiency and uniqueness in Section 4. I present
how I estimate the model in Section 5, and then the quantitative analysis in Section 6. Finally, Section 7
concludes.

2

Descriptive Facts

In this section, I present descriptive facts on earnings inequality between and within Canadian cities. I
show that larger cities have not only higher mean earnings but also greater earnings dispersion. I thenprovide suggestive evidence that such patterns are related to differences in worker and firm qualities
between cities and the degrees of assortative matching within cities.

2.1

Data

The main dataset for my empirical analysis is the Canadian Employer-Employee Dynamics Database(CEEDD), which is a set of linkable administrative tax files on firms and workers maintained by Statistics
Canada. The CEEDD covers the universe of tax-paying workers and firms from 2002 to 2017. On the worker
side, I observe total annual earnings from each firm in a year, residential location, as well as demographic
information such as age and gender. For workers receiving earnings from multiple firms within a year, I
only keep the earnings record of the firm that pays the highest earnings for that year. On the firm side,
I observe location, industry (4-digit NAICS code), wage bill, revenue, and value-added. All monetary
variables are converted to 2002 Canadian dollars.
The baseline sample of the analysis includes full-time working individuals between the ages of 25 and60 who live in a city (see the definition of a city below). The CEEDD does not include information on
hours worked. Following Guvenen et al. (2021), I only include workers with annual earnings from themain job no less than the equivalent of working 20 hours per week for 13 weeks at the minimum hourly
wage.12 Furthermore, I exclude firms in industries including agriculture (NAICS 11), mining (NAICS 21),
utilities (NAICS 22), education (NAICS 61), hospitals (NAICS 62), non-profit organizations (NAICS 813),
and public administrations (NAICS 92), as firms in these industries are likely to have other considerations
when choosing locations and setting wages. See more details on the data and sample selection in Appendix
A.
In the CEEDD, a firm is defined as an enterprise with an Enterprise ID in the Business Registry for
tax and accounting purposes. For multi-location firms, indicated by a multi-location flag in the data, I
only observe the location of their main headquarters. Given my research interest in decomposing earnings
into firm and city components, it is important to assign each worker employed by multi-location firms
to a production unit based on location. To this end, I exploit workers’ residential location information toform firm-city units within multi-location firms. For example, an employee living in Ottawa and working
for the Royal Bank of Canada (RBC), headquartered in Toronto, is to be assigned to an RBC - Ottawa unit.
For single-location firms, one firm is equivalent to a firm-city unit. I assume each unit possesses its own
production technology and makes its location choice and wage-setting decisions.13. I define such units as
firms hereafter.
12Canadian provinces set their own minimum wage standards. I take the lowest of these provincial standards as the national
minimum wage.
13The location choice of multi-plant firms is beyond the scope of this paper; see Oberfield et al. (2020), Jiang (2023) andKleinman (2022) for a formal treatment on this topic.

6

A city is defined as a Census Metropolitan Area (CMA) or a Census Agglomerate (CA) delineated in
the 2016 Census of Population. The concept of CMA and CAs resembles the one of commuting zones in the
U.S. – they are formed by combining a population center and adjacent municipalities with a high degree of
integration with the center measured by commuting flows. To only keep those with significant sizes andsufficient labor market integration, I keep CMAs and CAs with no fewer than 15,000 full-time working
individuals in 2002. I further drop one small outlier city that has average earnings greater than 150% of thenational average. This selection process leaves me with 66 cities.
To study the evolution of spatial inequality over time, I split the data into two sample periods: 2002-2009
and 2010-2017. In addition, I construct two sub-samples for each period for estimation purposes: the stayers
sample and the movers sample. The selection procedure follows Lamadon et al. (2022). For the stayers
sample, I only include workers who are associated with the same firm for at least 7 years. In addition, I
restrict the stayers sample to firms with at least 10 worker stayers. For the movers sample, I include workers
who switch firms in each sample period. Following Kline et al. (2020), I restrict the movers sample to firms
with at least two movers, which helps mitigate limited mobility bias. I present summary statistics for thesesamples in Table I.1.

2.2

Descriptive facts

2.2.1

Earnings disparities across Canadian cities

Larger cities have been shown to have higher average earnings and greater earnings dispersion (e.g.
Baum-Snow and Pavan (2013) and De La Roca and Puga (2017)). I first confirm that these patterns are alsopresent in Canadian data, for the 2010-2017 period.14 I show in Table 1 city-size regressions of city-levelmean log earnings and dispersion measures, including the variance, 90-50 difference, and 50-10 difference.
Log earnings are residualized by a third-order age polynomial, gender, marital status, and the number ofchildren using a Mincer-type regression. The results indicate that a 10 log-point increase in city population
is associated with a 0.23 log-point increase in mean earnings and a 0.24 log-point increase in the variance,with the latter mainly driven by higher 90-50 gaps in larger cities. The urban earnings premium elasticity(0.023) is smaller than those estimated in other developed countries (e.g. 0.067 in the U.S. (Albouy et al.,2019), 0.037 in Germany (Dauth et al., 2022), 0.049 in France (Combes et al., 2008) and 0.045 in Spain(De La Roca and Puga, 2017)).15 Nonetheless, spatial inequality is still sizeable in Canada and often prompts
policy debates.16
Table I.2 shows the results of the same regressions for the 2002-2009 period. During this period, a
14I show the descriptive facts in the main text using the 2010-2017 baseline sample, which period I use for structural estimation
to exclude the Great Recession episode. See Appendix I for the reproduction of these facts using the 2002-2009 data.
15Note that these estimates are obtained by controlling for different sets of worker characteristics, so they are not directlycomparable. Albouy et al. (2019) controls for education (Table 1, Column (2)), Dauth et al. (2022) controls for education,
education-specific age, and time effects (Figure 5 (a)), Combes et al. (2008) uses log wage directly (Table 1, Column (2)), De La Rocaand Puga (2017) controls for education, occupation, experiences and firm tenure (Table 1, Column (2)). Nonetheless, they are
all greater than the estimate I get using the Canadian data with fewer observables controlled for. Albouy et al. (2019) compare
the urban wage premium in Canada and the U.S. They find that the earnings-population elasticity is similar when using two
subsets of Canadian and American cities that overlap in the city population distribution. On the other hand, the elasticity estimateof within-city earnings variance to city population is similar to the U.S. Albouy et al. (2019) finds that in the U.S. a 1 log point
increase in city population is associated with a 0.46% increase in the 90-10 gap, which is similar to 0.47% using my data by adding
up 0.33% (Column (3)) and 0.14% (Column (4)) of Table 1.
16See here for discussions on growing concerns of regional inequality in Ontario and policy recommendations of the Opportunity
Zone program.

7

Table 1: City-size regressions of mean and dispersion of log earnings: 2010-2017
Dependent variable:
Mean Log
Earnings

Var. Log
Earnings

90-50 Gap

50-10 Gap

(1)

(2)

(3)

(4)

Log Population

0.023∗∗(0.008)0.024∗∗∗(0.005)0.033∗∗∗(0.004)0.014∗∗(0.006)

Constant−0.296∗∗(0.107)0.228∗∗∗(0.066)0.330∗∗∗(0.059)1.013∗∗∗(0.073)Observations
R2

66
0.109

66
0.238

66
0.454

66
0.084

Note: This table displays the results of city-size regressions of city mean and dispersion measures of log earnings in 2010-2017.
Log earnings are residualized by a cubic polynomial of age, gender, marital status, and the number of children using a
Miner-type regression. I follow Card et al. (2013) to assume that the earnings profile is flat at age 40. The 90-50 gap is thedifference between the 90𝑡 ℎ and the 50𝑡 ℎ percentile of log earnings in the city, and the 50-10 gap is the difference between the
50𝑡 ℎ and the 10𝑡 ℎ percentile. Population is measured as the average number of full-time working individuals in each city in
2010-2017. All regressions are weighted by population. ∗ p<0.1; ∗∗ p<0.05; ∗∗∗ p<0.01.

10 log-point increase in city population is associated with a 0.35 log-point increase in mean earnings.
The comparison with the estimate using the later period suggests that earnings between different-sized
Canadian cities have been converging over time.
I show in Figure I.2 that the above findings are robust to controlling for industry fixed effects and timespent working in large cities; I also show in Figure I.3 that they are robust to using after-tax earnings andexcluding individuals with positive business income. The discussions above can be summarized into thefollowing fact.
Fact 1. Larger cities have higher mean earnings and greater earnings dispersion than smaller cities.
2.2.2

Co-location of high-quality workers and high-quality firms

To uncover the contribution of worker and firm heterogeneity towards spatial earnings disparities, I
decompose earnings into firm and worker components following Abowd et al. (1999):17
log 𝑤 𝑖𝑡 = 𝑧 𝑗(𝑖,𝑡) + 𝑎 𝑖 + 𝜖 𝑖𝑡

(2.2)

where 𝑖 indexes an individual, 𝑗 indexes a firm, and 𝑡 indexes a year; log 𝑤 𝑖𝑡 is the residual of a Mincer-type
regression of log earnings on a set of year dummies and a cubic polynomial in age, 𝑧 and 𝑎 are firm andworker fixed effects, and 𝜖 𝑖𝑡 is the earnings residual.18 I interpret the worker and firm fixed effects as their
17I also implement a specification with the skill-augmenting effect following Bonhomme et al. (2019a):
log 𝑤 𝑖𝑡 = 𝑧 𝑗(𝑖,𝑡) + 𝜃 𝑗(𝑖,𝑡) 𝑎 𝑖 + 𝜖 𝑖𝑡

(2.1)

which is more consistent with the general equilibrium model to be described in Section 3. I present the city mean log earnings
decomposition using this specification in Table I.4. The results are qualitatively similar to the one estimated using equation 2.2.
18I follow Card et al. (2013) in restricting the earnings-age profile to be flat at the age of 40.

8

qualities for now. In the spatial equilibrium model that I describe later, I micro-found these fixed effects asworker skills and firm productivities. Also, note that this decomposition does not explicitly contain a city
fixed effect. One can rightfully think that it is absorbed by the firm effect 𝑧 as they cannot be separately
identified yet.19
There are two well-known issues when estimating the AKM equation. First is limited mobility bias.
Identification of the firm fixed effect relies on earnings changes from workers’ movement across firms. As
pointed out by Andrews et al. (2008), limited worker mobility makes it hard to precisely estimate the firmpremium. To deal with this issue, I follow Bonhomme et al. (2019a) and group firms with similar earnings
distributions into 𝑘 = 10 clusters using the k-means clustering algorithm. The clustering approach mitigates
the bias as there are many more worker movements between these clusters than between individual firms.
Then, I estimate 10 cluster fixed effects rather than a large number of individual firm fixed effects. For
robustness, I also perform the estimation with 𝑘 = 20, 30, 40, 50 clusters, and the results are very similar.
Despite its parsimony, the 10 (50) cluster fixed effects account for 87 (90) percent of the between-firm
variance in earnings.
Second is endogenous mobility bias. The key identifying assumption for the AKM equation is thatworkers’ selection into firms is orthogonal to the earnings residual 𝜖 𝑖𝑡 . For example, if workers receive
negative earnings shocks prior to their moves (i.e. the Ashenfelter dip), then the destination firms’ premia
will be overestimated. However, selection based on firm effects 𝑧, worker effects 𝑎 or the controlled
covariates 𝑋 does not violate the identification assumption. To visualize potential selection on unobservableshocks, I follow Card et al. (2013) and plot an event-study figure of workers who move between firms andgroup these movers into origin-destination cluster pairs. As shown in Figure I.5, workers who move todifferent firm clusters from the same cluster exhibit parallel earnings trends prior to the move. In addition,
workers who move to higher-paying firms on average earn more than those who move to lower-paying
firms (except for those who move from cluster 5 to 1), which is consistent with the findings in Card et al.
(2013).
With the estimates of the AKM equation, I study how firm and worker qualities vary between cities.
I plot the average firm and worker effects against city population in Figure 1 and present the results ofthe city-size regressions in Table 2. The results reveal significant spatial differences in worker and firm
qualities. Specifically, a 10 log-point increase in city population is associated with a 0.16 log-point increasein average worker effects and a 0.06 log-point increase in average firm effects, corresponding to 73.3% and26.7% of the urban earnings premium estimated.
Following Dauth et al. (2022), I also decompose the variance of mean city log residualized earnings asfollows:
Var E𝑐 log 𝑤 𝑖𝑡





=

Var (𝑧 𝑐 )+Var (𝑎 𝑐 )| {z }| {z }

Mean firm effectMean worker effect+2 Cov (𝑧 𝑐 , 𝑎 𝑐 )

|

{z

+

Var (𝜖 𝑐 ) ,

(2.3)

}

Co-location

19It is tempting to use either firm movers or worker movers within multi-location firms to separately identify the city and firm
effects. For firm movers, I argue that are highly selective and poorly measured in the data. For multi-location firms, Kleinman (2022)
finds that establishments within multi-location (services) firms differ significantly in their roles in the firm and productivities.

9

Figure 1: Descrpitive facts on worker and firm FEs: 2010-2017(a) City mean worker FE(b) City mean firm FE
0.65

−0.5
Slope = 0.016 (0.005)

Slope = 0.005 (0.003)

Mean Firm FE

Mean Worker FE

0.60

−0.6

0.55

0.50

−0.7

0.45
−0.8
30k

100 k

300 k

1m

City Population

30k(c) Changes in mean worker and firm FEs

100 k

300 k

City Population

1m(d) Correlation of worker and firm FE by city
0.60

Slope = 0.005 (0.002)

Correlation of Worker and Firm FEs

Changes in Mean Worker FE

0.10

0.55

0.05

Slope = 1.498 (0.079)

0.50

0.00

−0.05

0.45

−0.04

−0.02

0

0.02

0.04

0.06

30k

Changes in Mean Firm FE

100 k

300 k

City Population1m

Note: Panels (a) and (b) plot city mean worker and firm FEs, estimated by equation (2.2), against city population for 2010-2017.
Panel (c) plots the changes in city mean worker FEs against changes in city mean firm FE from 2002-2009 to 2010-2017, with themean changes normalized to zero. Panel (d) plots the correlation of worker and firm FEs for each city against city populationfor 2010-2017. Firms are grouped into 𝑘 = 10 clusters. Population is measured as the average number of full-time working
individuals in each city in 2010-2017. Population-weighted OLS regression coefficients and standard errors are reported.

where 𝑧 𝑐 and 𝑎 𝑐 represent city-level averages. The decomposition result is shown in Table I.3. The varianceof mean worker effects explains 41.1% of the total between-city variation, the variance of mean firm effects
explains about 13.1%, and the covariance of the two explains about 43.9%. The large proportion attributed
to the covariance term underscores the importance of co-location in shaping spatial earnings disparities.
The covariance between worker and firm fixed effects accounts for a significantly larger share of the variance
between cities (43.9%) than the variance between individuals (16.3%). This comparison suggests that
although the matching of individual workers and firms occurs more at random, similarly ranked workers
and firms are much more likely to co-locate in the same city. The evidence can be summarized as thefollowing fact.

10

Table 2: Decomposition of city-size regressions of mean and variance of log earnings: 2010-2017
Dependent variable:
Mean log earnings

Variance log earnings

Total

Mean
Worker

Mean
Firm

Total

Var.
Worker

Var.
Firm

2×
Covar.

(1)

(2)

(3)

(4)

(5)

(6)

(7)

Log Population

0.022∗∗(0.008)0.016∗∗(0.005)0.006∗(0.003)0.024∗∗∗(0.005)0.016∗∗∗(0.003)0.001∗∗(0.000)0.005∗∗∗(0.001)% Explained

100.0%

73.3%

26.7%

100.0%

66.2%

3.4%

19.8%

Observations

66

66

66

66

66

66

66

R2

0.106

0.141

0.051

0.238

0.278

0.067

0.154

Note: This table displays the decomposition results of city-size regressions of city mean and variance of log earnings in
2010-2017. The worker and firm FEs are estimated using equation (2.2). Columns (2) and (3) represent city mean worker andfirm FEs. Columns (5)-(7) are the within-city variances of worker FEs and firm FEs, and two times the covariance of worker
and firm FEs. The within-city variance decomposition follows equation (2.4). The shares explained by Columns (5)-(7) do
not sum up to 1 due to the presence of the earnings residual 𝜖. Population is measured as the average number of full-timeworking individuals in each city in 2010-2017. All regressions are weighted by population. ∗ p<0.1; ∗∗ p<0.05; ∗∗∗ p<0.01.

Fact 2. Larger cities have higher-quality workers and firms, both of which contribute significantly to between-city
earnings inequality.
Having shown the cross-sectional patterns, I now investigate how the spatial allocation of heterogeneous
workers and firms evolves over time. To this end, I estimate equation (2.2) separately for 2002-2009 and2010-2017 and then correlate changes in city mean firm effects with changes in city mean worker effects.
If better workers spatially follow better firms and vice versa, then we should see a positive correlation
between the two. This is borne out in the data, as shown in Panel (c) of Figure 1.20 This result indicatesstrong location choice interdependence of workers and firms. Furthermore, smaller cities on averageexperience increases in both mean worker and firm qualities, in contrast to larger ones, which results in a
reduction of the urban earnings premium over time.21 I summarize this finding as follows.
Fact 3. Over time, city-level changes in worker quality strongly and positively correlate with changes in firm quality.
2.2.3

Assortative matching within cities

Large and thick labor markets have long been hypothesized to facilitate better worker-firm matches(Diamond, 1982; Helsley and Strange, 1990). To study this, I calculate the correlation of AKM worker andfirm effects within each city and regress it on city size. The result is shown in Panel (d) of Figure 1, which
confirms that the degree of assortative matching is higher in larger cities.22
20I have also tried using only new workers in each city, both workers entering into the labor force and those who migrate into
the city, and new firms in each city, and I relate the city mean FEs of these new workers and firms. I also find a strong positive
relationship between the two, as shown in Figure I.7.
21I show that the variance of changes in mean worker effects, the variance of changes in mean firm effects, and the covarianceof the two changes each explains 43.1%, 13.6%, and 43.3% of the variance of changes in city mean log earnings.
22Correction of limited mobility bias is important here as failure to do so will bias downward the correlation of worker andfirm effects. Moreover, the magnitude of such a bias depends on the probability of workers changing firms. Therefore, without

11

To examine how much of the greater earnings dispersion in larger cities is due to a higher degree ofassortative matching, I decompose within-city earnings variance according to
Var𝑐 log 𝑤 𝑖𝑡 = Var𝑐 𝑧 𝑗(𝑖,𝑡) + Var𝑐 (𝑎 𝑖 ) + 2 Cov𝑐 𝑧 𝑗(𝑖,𝑡) , 𝑎 𝑖 + Var𝑐 (𝜖 𝑖𝑡 ) ,







(2.4)

with which I can use to calculate the variance and covariance components by city and regress them on city
population. I present the results in Table 2. The result shows that the covariance component explains about
20% of the city-size gradient of within-city variance. Lager cities also have greater variations in worker andfirm qualities that contribute to greater within-city inequality, as documented in Eeckhout et al. (2014) andCombes et al. (2012). These results can be summarized into the following fact.
Fact 4. Larger cities have higher degrees of positive assortative matching between workers and firms, which contributeto greater within-city inequality.

2.3

Discussion

I have shown that there is co-location of better workers and firms and a higher degree of positive
assortative matching in larger cities. These two patterns should be collectively taken into consideration:
spatial sorting leads to different compositions and matching patterns across cities, and local assortative
matching generates different benefits across agents and thus affects their spatial sorting choices. Furthermore,changes in local worker and firm qualities over time strongly correlate with each other, which is crucial forregional rise and decline. These facts align with Moretti (2012)’s view on the regional divergence in the
U.S. that “a handful of cities with [...] a solid base of human capital keep attracting good employers andoffering high wages, while those at the other extreme, cities with [...] a limited human capital base, arestuck with dead-end jobs and low average wages”. Therefore, place-based policies designed to mitigate
spatial inequality should take the interdependence of heterogeneous workers’ and firms’ location choices
into account.
The descriptive facts are informative about the sources of spatial inequality. However, they cannot shedlight on the mechanisms underlying the observed spatial allocation, nor can it be used to evaluate the overall
efficiency and specific place-based policies. In addition, it has been long posited that large cities provide
better exogenous production amenities and endogenous agglomeration benefits since Marshall (1890).
However, the reduced-form approach does not permit separating the true firm effects from location-specificproductive advantages, thus overstating the importance of firm heterogeneity. To overcome these challenges,
I will next build a model that fully specifies firms’ and workers’ sorting and matching problems in a systemof cities.

3

Model

In this section, I build a two-sided sorting spatial equilibrium model. The model adds rich heterogeneity
to the standard Rosen-Roback model (Rosen, 1974; Roback, 1982). It aims to characterize the Nash
Equilibrium of location choices of heterogeneous agents, that is, in equilibrium each agent’s location
decision is the best response to all others’ choices.
correcting the bias, higher estimated correlations in large cities may simply be due to smaller downward biases caused by moreworker mobility.

12

3.1

Environment

Consider an economy populated by heterogeneous workers and firms. Workers, indexed by 𝑖, differ intheir skill 𝑎 𝑖 ∈ ( 𝑎, 𝑎¯ ). They obtain utility from consuming the final good and residential floor space. Firms,¯
indexed by 𝑗, differ in their production technology summarized by (𝑧 𝑗 , 𝜃 𝑗 ) and skill-specific amenities{𝐺 𝑗 (𝑎)} 𝑎 .23 Each firm uses labor and commercial floor space to produce a homogeneous tradable final
good, which is the numeraire of the economy. The measure of workers of each skill, 𝐿(𝑎), and the set offirms, 𝒥, in the economy are exogenously given.
There are 𝐶 cities in the economy. Each city, indexed by 𝑐, differs in its exogenous productivity 𝐴 𝑐 ,skill-specific amenities {𝑅 𝑐 (𝑎)} 𝑎 , inverse housing supply elasticity 𝛾𝑐 and amount of land 𝐻 𝑐 . Cities are
local labor markets where workers and firms match with each other. There is a housing developer in eachcity who supplies floor spaces demanded by workers and firms. Furthermore, a city’s productivity increases
with its population 𝐿 𝑐 through endogenous agglomeration spillovers, with the elasticity represented as 𝜇. I
denote ℒ 𝑐 and 𝒥𝑐 as the sets of workers and firms located in the city 𝑐.

3.2

Worker’s problem

3.2.1

Preferences

Following Lamadon et al. (2022) and Diamond and Gaubert (2022), I assume that the utility of a worker
𝑖 with skill 𝑎, in city 𝑐, working for firm 𝑗 ∈ 𝒥𝑐 which offers her a wage rate 𝑊𝑗𝑐 (𝑎) is given by:𝑢𝑖 (𝑗, 𝑐; 𝑎) = log



𝑅 𝑐 (𝑎)𝜂𝑟𝑐



+ log 𝜏𝑊𝑗𝑐 (𝑎) + log 𝐺 𝑗𝑐 (𝑎) + 𝛽−1𝑤 𝜖 𝑖𝑗 ,(3.1)

where 𝑟 𝑐 denotes the housing rent of city 𝑐, 𝜂 denotes the expenditure share on housing, 𝜏 represents therebate of total land rents that is proportional to labor earnings (𝜏 > 1), and 𝜖 𝑖𝑗 is worker 𝑖’s idiosyncratic
taste for firm 𝑗.24 The dispersion of the idiosyncratic is controlled by parameter 𝛽 𝑤 : a higher value of𝛽 𝑤 makes the taste draws less dispersed, which implies a smaller role of the preference idiosyncrasy indetermining the workers’ preferred firm and location. Furthermore, I assume that the idiosyncratic taste
𝜖 𝑖𝑗 is drawn from a Type-I Extreme Value distribution: Õ Õ 𝜌𝑤 


𝜖
𝑖𝑗
©
ª 
−
𝐹(→
𝜖 𝑖 ) = 𝑒 𝑥𝑝 −𝑒 𝑥𝑝 −­® ,𝜌𝑤 𝑐 𝑗∈𝒥𝑐
«
¬ 


(3.2)

where 𝜌𝑤 ∈ [0, 1] governs the degree of correlation of tastes for different firms within each city, i.e.
p𝜌𝑤 = 1 − 𝑐𝑜𝑟𝑟(𝜖 𝑖𝑗 , 𝜖 𝑖𝑗′ ) if 𝑗, 𝑗 ′ ∈ 𝒥𝑐 . A higher value of 𝜌𝑤 makes the tastes of firms in the same city
23I will describe the production technology in detail later. The introduction of firm amenities is motivated by empirical evidence
that non-pay characteristics of firms, i.e. compensating differentials, are important for understanding workers’ employer choices
and earnings inequality (e.g. Sorkin (2018)).
24Note that this is an indirect utility expression. The utility maximization problem can be written as

n

h

i

𝑈 𝑖 (𝑞, ℎ; 𝑗, 𝑐) = max (1 − 𝜂) log 𝑞 + 𝜂 log ℎ + log 𝐺 𝑗𝑐 (𝑎) · 𝑅 𝑐 (𝑎) + 𝛽 𝑤 −1 𝜖 𝑖𝑗
𝑞,ℎ,𝑗,𝑐s.t.
𝑞 + 𝑟 𝑐 ℎ = 𝜏𝑊𝑗𝑐 (𝑎)where 𝑞 represents the final good, and ℎ represents housing.

13omore independent from each other. This utility function specification adds preferences for city amenities
and housing rents to the one of Lamadon et al. (2022) and preferences for firm amenities and wages
within cities to the one of Diamond and Gaubert (2022).25 It combines vertical differentiation, which isdifferences in amenity levels, and horizontal differentiation, which comes from idiosyncratic tastes, indetermining workers’ choices of cities and firms. The introduction of idiosyncratic tastes also gives rise
to a love-of-variety preference for more local firms, as workers view them as imperfectly substitutableworkplace options. This aligns with the insight of Helsley and Strange (1990) that a larger set of horizontallydifferentiated firms in a local labor market facilitates better matches.
3.2.2

Labor supply and spatial sorting

Workers observe each city’s amenity 𝑅 𝑐 (𝑎), housing rents 𝑟 𝑐 , the set of firms 𝒥𝑐 and their wage offers
W𝑐 (𝑎) = {𝑊𝑗𝑐 (𝑎)} 𝑗∈𝒥𝑐 . With such information, each worker decides which city to locate in and which firm
to work for. Given the property of the Type-I Extreme Value distribution, the measure of worker with skill
𝑎 choosing firm 𝑗 is given by:𝛽𝑤

𝑆 𝑗𝑐 (𝑎; 𝑊𝑗𝑐 (𝑎)) = 𝐿 𝑐 (𝑎) ·(𝑊𝑗𝑐 (𝑎)𝐺 𝑗𝑐 (𝑎)) 𝜌𝑤

W𝑐 (𝑎)

,

(3.3)
𝛽𝑤

where 𝐿 𝑐 (𝑎) is the measure of workers of skill 𝑎 in city 𝑐 and W𝑐 (𝑎) ≡ 𝑗∈𝒥𝑐 (𝑊𝑗𝑐 (𝑎)𝐺 𝑗𝑐 (𝑎)) 𝜌𝑤 is defined as
the skill-specific wage index in city 𝑐. This equation characterizes the labor supply curve each firm faces
when choosing the wage offer, with the firm-level labor supply elasticity 𝛽 𝑤 /𝜌𝑤 . Analogously, the measureof a skill 𝑎 worker located in city 𝑐 is then given by:Í

𝐿 𝑐 (𝑎) = 𝐿(𝑎) · Í

𝑈 𝑐 (𝑎)𝛽𝑤.
𝛽𝑤
𝑐 ′ ∈𝐶 𝑈 𝑐 ′ (𝑎)

(3.4)

𝜌𝑤

−𝜂

where 𝑈 𝑐 (𝑎) ≡ 𝑅 𝑐 (𝑎)𝑟 𝑐 · W𝑐 (𝑎) 𝛽𝑤 is the expected utility of skill-𝑎 workers located in city 𝑐. Workers trade
off job qualities (wage and non-wage) and city amenities versus the housing rents when making location
choices, with the city-level labor supply elasticity 𝛽 𝑤 .

3.3

Firm’s problem

3.3.1

Production technology

A firm 𝑗 in city 𝑐 produces the final good by combining a set of workers, D 𝑗𝑐 = {𝐷 𝑗𝑐 (𝑎)} 𝑎 , and commercial
floor space, ℎ 𝑗𝑐 , with a Cobb-Douglas production technology:
𝑌𝑗𝑐 D 𝑗𝑐 , ℎ 𝑗𝑐 =



∫ 𝑎¯

𝜇
𝐴 𝑐 𝐿 𝑐 · 𝑧 𝑗 · 𝑎 𝜃𝑗 · 𝐷 𝑗𝑐 (𝑎) 𝑑𝑎 1−𝛼· ℎ 𝑗𝑐 𝛼

(3.5)

𝑎
¯

where 𝐷 𝑗𝑐 (𝑎) is the measure of skill-𝑎 workers employed by the firm 𝑗 in city 𝑐, 𝛼 is the share of commercial
floor space in the production function.
25In Appendix F.1, I have a model extension where I allow skill-specific city amenities to respond to the local skill mix(Diamond, 2016; Almagro and Dominguez-Iino, 2022). These endogenous amenity effects would further encourage worker sortingas high-skilled workers benefit from co-locating with other high-skilled workers.

14

𝜇

There are several labor productivity terms in the production function, including a city part 𝐴 𝑐 𝐿 𝑐 , afirm part 𝑧 𝑗 , and a worker-firm interaction part 𝑎 𝜃𝑗 . Firm technology is characterized by the common
productivity 𝑧 and the skill-augmenting productivity 𝜃. Heuristically speaking, common productivity 𝑧
represents a firm’s absolute advantage for all workers, and skill-augmenting productivity 𝜃 represents afirm’s comparative advantages in utilizing higher-skilled workers. This specification has been proposed by
Bonhomme et al. (2019a) and adopted by Lamadon et al. (2022), Gaubert et al. (2021b), Setzler and Tintelnot(2021) and Huneeus et al. (2021).
If the skill-augmenting productivity is monotonically increasing in the common productivity, thenworker skill and firm productivity are complementary to each other. Mathematically speaking, this implies
the matched output of a worker-firm pair is log-supermodular in worker skill and firm productivity, whichleads to positive assortative matching (PAM) in local labor markets. This is consistent with Costinot (2009)
and Costinot and Vogel (2015) in that output per pair must be log-supermodular to generate PAM whenfirm products are not perfectly substitutable. In this case, firms are imperfectly substitutable workplaces
for workers. I will empirically estimate the two productivity terms later in the next section.
3.3.2

Wage setting and input choices

Firms observe each city’s productivity 𝐴 𝑐 , housing rent 𝑟 𝑐 , and the sets of firms 𝒥𝑐 and workers ℒ 𝑐 .
Each firm decides its optimal production and location choices in a backward manner. First, given one
location 𝑐, it chooses optimal wage offers W 𝑗𝑐 = {𝑊𝑗𝑐 (𝑎)} 𝑎 , labor inputs D 𝑗𝑐 = {𝐷 𝑗𝑐 (𝑎)} 𝑎 and the housing
input ℎ 𝑗𝑐 , which results in expected profits. Second, they choose which city to locate in based on these
expected profits. The first step is specified as a standard profit maximization problem:

( ∫
max
W 𝑗𝑐 ,D 𝑗𝑐 ,ℎ 𝑗𝑐𝑎¯

𝜇𝐴 𝑐 𝐿 𝑐 · 𝑧 𝑗 · 𝑎 𝜃𝑗 · 𝐷 𝑗𝑐 (𝑎) 𝑑𝑎

 1−𝛼

𝛼

· ℎ 𝑗𝑐 − 𝑟 𝑐 ℎ 𝑗𝑐 −

𝑎
¯

∫ 𝑎¯

)
𝑊𝑗𝑐 (𝑎)𝐷 𝑗𝑐 (𝑎) 𝑑𝑎

(3.6)

𝑎
¯

subject to the labor supply curves specified by equation (3.3):
𝛽𝑤

𝐷 𝑗𝑐 (𝑎) = 𝑆 𝑗𝑐 (𝑎; 𝑊𝑗𝑐 (𝑎)) = 𝐿 𝑐 (𝑎) ·(𝑊𝑗𝑐 (𝑎)𝐺 𝑗𝑐 (𝑎)) 𝜌𝑤

W𝑐 (𝑎)

, ∀𝑎.

(3.7)

Following Card et al. (2018) and Lamadon et al. (2022), I assume that firms are infinitesimal, so any
firm’s wage offer does not affect the labor supply curve for other firms.
Assumption 1. All firms are infinitesimal in a city, so one firm’s wage decision 𝑊𝑗𝑐 (𝑎) does not affect the city-level
wage index W𝑐 (𝑎), that is
𝜕W𝑐 (𝑎)= 0.
𝜕𝑊𝑗𝑐 (𝑎)With this assumption, I can solve for the optimal wage offers as:26𝜇𝛼

𝑊𝑗𝑐 (𝑎) = 𝜒 · 𝐴 𝑐 𝐿 𝑐 𝑟 𝑐𝛼−1 · 𝑧 𝑗 · 𝑎 𝜃𝑗

(3.8)

26This assumption abstracts from the strategic interaction of firms’ wage-setting decisions, which is studied by Berger et al.
(2022a). It is challenging to incorporate this strategic interaction in my context as it generates variable markdown and complicatesthe location decisions of both firms and workers.

15

𝛽 /𝜌

𝛽 /𝜌

𝛼

where I define a constant 𝜒 ≡ 1+𝛽𝑤𝑤 /𝜌𝑤𝑤 · (1 − 𝛼)𝛼 1−𝛼 , as the product of the wage markdown, 1+𝛽𝑤𝑤 /𝜌𝑤𝑤 , and afunction of firms’ housing expenditure share, (1 − 𝛼)𝛼 1−𝛼 . Wage markdown, which equals the workers’
take-home share for their marginal revenue product, increases with the firm-level labor supply elasticity
𝛽 𝑤 /𝜌𝑤 . A more elastic labor supply means that firms are more substitutable from the workers’ perspective,
which decreases firms’ monopsony power. Setting the optimal wages at a constant share of marginal
revenue product of labor is a standard result in the class of “new monopsony models”, as summarized
by Manning (2021). The local housing rent 𝑟 𝑐 shows up in the optimal wage offer as it affects the optimal
housing input, which I solve for in Appendix B.1, and thus affects the marginal revenue product of labor.
With wage setting and input choices, I then derive firm 𝑗’s optimal profits in city 𝑐 as:
1



𝑎

𝜇



𝜋 𝑐 (𝑗) = Ψ · 𝐴 𝑐 𝐿 𝑐 𝑟 𝑐𝛼−1 · 𝑧 𝑗 1+𝛽𝑤 /𝜌𝑤· 𝜙 𝑗𝑐(3.9)

𝑎where Ψ ≡ 1+𝛽𝑤1 /𝜌𝑤 · (1 − 𝛼)𝛼 1−𝑎 and𝛽𝑤

𝜙 𝑗𝑐 =

∫ 
𝑎

𝑎 𝜃𝑗

 1+𝛽𝑤 /𝜌𝑤

𝐺 𝑗𝑐 (𝑎) 𝜌𝑤

𝐿 𝑐 (𝑎) ·Í𝑗 ′ ∈𝒥𝑐𝑧 𝑗′ 𝑎

𝜃 𝑗′· 𝐺 𝑗′ 𝑐 (𝑎) 𝜌𝛽𝑤 𝑑𝑎.

𝜇(3.10)𝑤

𝛼Firm 𝑗’s optimal profits are affected by city 𝑐’s adjusted productivity 𝐴 𝑐 𝐿 𝑐 𝑟 𝑐 𝛼−1 , firm 𝑗’s own productivity
𝑧 𝑗 , and a labor composite term 𝜙 𝑗𝑐 . This last term relates to the total efficiency units of labor that firm 𝑗 canemploy in city 𝑐 by synthesizing local labor supply and demand conditions. Note that city 𝑐’s productivity
does not enter the formulation of 𝜙 𝑗𝑐 as it does not affect within-city worker-firm matching. All else equal,
a firm would earn more profits in a city where it can hire more workers, and where it complements theworkers that it can hire. Importantly, variations in firms’ skill-augmenting productivity 𝜃 𝑗 and amenities{𝐺 𝑗 (𝑎)} 𝑎 affect a city’s heterogeneous returns for different firms, giving rise to firm spatial sorting.
3.3.3

Firm spatial sorting

There is a fixed set of firms, denoted by 𝒥 , in the economy.27 Each firm 𝑗 is owned by an entrepreneur,
who spends profits only on the final good. The entrepreneur’s preference is specified as:𝑢𝑐 (𝑗) = ln 𝜋 𝑐 (𝑗) + 𝛽 𝑓 −1 𝜈 𝑗𝑐 .

(3.11)

Symmetric to the worker’s problem, each entrepreneur draws city-specific idiosyncratic preference
tastes 𝜈 𝑗𝑐 from the Type-I Extreme Value distribution, whose dispersion is governed by 𝛽 𝑓 . With the optimal
profits in each city given by equation (3.9), the probability of an entrepreneur 𝑗 choosing city 𝑐 can then be

27In Appendix F.2, I also specify a model extension to allow for free entry of firms at the national level, in which eachentrepreneur pays a fixed cost 𝑐 𝑒 to draw their amenity and production characteristics. However, sorting shares of heterogeneous
workers and firms are scale-invariant to the total measure of firms, and so are equilibrium outcomes such as housing rents, thespatial wage structure, and total output. Changes in the number of firms only affect welfare through workers’ love-of-variety
preference.

16

obtained as:28

𝑝 𝑐 (𝑗) =𝜇𝛼

𝐴 𝑐 𝐿 𝑐 𝑟¯𝑐𝛼−1 · 𝜙 𝑗𝑐

Í 
𝑐′

𝛼
𝜇
𝐴 𝑐′ 𝐿 𝑐′ 𝑟¯𝑐𝛼−1
′



𝛽𝑓

· 𝜙 𝑗𝑐′𝛽𝑓 .

(3.12)

Note that a firm’s own common productivity 𝑧 𝑗 does not affect its location choice since it is carried withthe firm regardless of its location. Equation (3.12) thus enables me to separately identify city productivity
from firm productivity when I take the model to data. The intuition is that revealed firm location choicesin the data are informative of the city fundamentals. More productive cities are able to attract larger sharesof firms, holding all other profit determinants constant.

3.4

Housing supply

Housing in city 𝑐 is supplied elastically by a housing developer, who combines the final good 𝑌 andland 𝐻 𝑐 to produce floor spaces:1
𝐻𝑐 = 𝐻 𝑐 · 𝑌 1+𝛾𝑐
(3.13)
where 𝛾𝑐 governs the return to scale of the housing production function. Floor spaces are rented to workers
and firms at the rental rate 𝑟 𝑐 . The housing developer chooses the final good input 𝑌 to maximize profits,
taking the rental rate 𝑟 𝑐 as given. Solving the developer’s problem yields the housing supply curve for eachcity:
𝐻𝑐𝑆 (𝑟 𝑐 ) = 𝐻 𝑐 · 𝑟 𝑐 𝛾𝑐01(3.14)

0where 𝐻 𝑐 is an exogenous housing supply shifter. I assume that the developer’s profits, which are equivalent
to the land rents, are aggregated into a national portfolio and rebated to workers through 𝜏 in equation 3.1.

3.5

Spatial equilibrium
I am now in a position to formally define the spatial equilibrium.

Definition 1. Given city characteristics {𝐴 𝑐 , 𝑅 𝑐 (𝑎), 𝐻 𝑐 , 𝛾𝑐 }∀𝑐,𝑎 , worker measures {𝐿(𝑎)}∀𝑎 , the set of firm 𝒥 with
their productivites {𝑧 𝑗 , 𝜃 𝑗 }∀𝑗 and skill-specific amenities {𝐺 𝑗 (𝑎)}∀𝑎,𝑗 , the spatial equilibrium is defined as a set ofallocations including worker location and firm choices {𝑐(𝑖), 𝑗(𝑖)}∀𝑖 , firm location choices {𝑐(𝑗)}∀𝑗 , firm labor demand{𝐷 𝑗𝑐 (𝑎)}∀𝑎,𝑗,𝑐 , housing demand {ℎ 𝑗𝑐 }∀𝑗,𝑐 , and a set of prices including wage {𝑊𝑗𝑐 (𝑎)}∀𝑎,𝑗,𝑐 , and housing rents {𝑟 𝑐 }∀𝑐that satisfy the following:
1. Workers choose cities and firms to maximize their utility by equations (3.3) and (3.4);
2. Firms choose cities optimally by equation (3.12), and choose wage offers and housing inputs by equations (3.8)
and (B.6);
3. The housing market clears in each city such that housing demand equals supply, which are given by equations(B.14) and (B.13);
4. The final good market clears by equation (B.17);
28Alternatively, one can assume that entrepreneurs have city-specific idiosyncratic productivity shocks. Such shocks would
enter the earnings equation, yet it is challenging to identify them from firms’ fundamental productivity. Furthermore, thisalternative specification would also induce a negative selection margin in that more profitable markets will attract firms withlower idiosyncratic productivity shocks. See Suárez Serrato and Zidar (2023) for more discussions on this matter.

17

5. Land rents are redistributed to workers by equation (B.16).

4

Equilibrium Properties

4.1

Efficiency

I study how two-sided sorting affects overall efficiency and the optimal policy design in this section.
Being atomistic, workers do not internalize the impact of their location decisions on local productivity
through agglomeration spillovers 𝜇, and firms do not internalize the impact of their location decisions onlabor market congestion through wage indices, W𝑐 (𝑎). These impacts affect other agents’ optimal choices,leading to inefficient sorting in the decentralized economy. To characterize the inefficiencies, I solve thesocial planner’s problem and contrast the planner’s solution with the laissez-faire allocation. I then propose
an optimal spatial policy that implements the efficient allocation.
I start by defining the social welfare function that the planner aims to maximize. For ease of exposition,
suppose there are 𝑁 𝑤 types of workers, indexed by 𝑎, and 𝑁 𝑓 types of firms (entrepreneurs), indexed by 𝑘,though this can be easily generalized to infinite types.29 Consider a planning problem with Pareto weights
𝜑 𝑤 (𝑎) for each worker type and 𝜑 𝑓 (𝑘) for each firm (entrepreneur) type. The social welfare function is
given by
𝒲=

𝑁𝑤
Õ

𝑤

𝜑 (𝑎) 𝐿 (𝑎) 𝑈 (𝑎) +

𝑎=1

𝑁𝑓
Õ

𝜑 𝑓 (𝑘) 𝐽 (𝑘) Π (𝑘) ,

(4.1)

𝑘=1

where 𝑈(𝑎) and Π(𝑘) are the expected utility of type-𝑎 workers and type-𝑘 entrepreneurs. The plannermaximizes equation (4.1) by choosing the spatial allocations of heterogeneous workers and firms acrosscities, {𝐿 𝑐 (𝑎)} and {𝐽𝑐 (𝑘)}, the measure of worker-firm matches in each city, {𝐷 𝑘𝑐 (𝑎)}, the final good for
consumption by workers and entrepreneurs, {𝑐 𝑘𝑐 (𝑎)} and {𝑐 𝑐 (𝑘)}, and for production for housing, {𝑌𝑐 }, andhousing across local workers and firms, {ℎ 𝑘𝑐 (𝑎)} and {ℎ 𝑐 (𝑘)}, subject to spatial mobility and local matching
constraints of workers and firms, as well as resource constraints of the final good and housing.30 This
planning problem extends the ones in Fajgelbaum and Gaubert (2020) and Rossi-Hansberg et al. (2019) byincorporating decisions on the spatial allocation of heterogeneous firms and local labor market matching.
4.1.1

Sorting externalities

To characterize the sources of sorting inefficiency in the laissez-faire equilibrium, I first discuss thedifferences in social and private marginal values of workers and firms, in the following proposition.
Proposition 1. The social marginal product of a type-𝑎 worker working for a type-𝑘 firm in city 𝑐 is
˜ 𝑘𝑐 (𝑎) =𝑊

1 + 𝛽 𝑤 /𝜌𝑤 h· 𝑊𝑘𝑐 (𝑎) +𝛽 𝑤 /𝜌𝑤

¯𝑐
𝜇𝑊

i
(4.2)

|{z}
agglomeration
spillovers¯ 𝑐 is the average wage of city 𝑐. The social
where 𝑊𝑘𝑐 (𝑎) is the competitive equilibrium wage following (3.8) and 𝑊
29With a slight abuse of notation, 𝑎 refers to both worker type and worker skill.
30I denote 𝐷 𝑘𝑐 (𝑎) as the total measure of workers with type 𝑎 employed by type 𝑘 firms in city 𝑐. The number of skill 𝑎 workers
that each type 𝑘 firm employs in city 𝑐 is thus 𝐷 𝑘𝑐 (𝑎)/𝐽𝑐 (𝑘)18marginal value of a type-𝑘 firm in city 𝑐 is𝜋˜ 𝑐 (𝑘) =

Õ

∗
𝑊𝑘𝑐
(𝑎)

𝑎

|

Õ
𝐷 𝑘𝑐 (𝑎)¯ 𝑐∗ (𝑎) 𝐷 𝑘𝑐 (𝑎)− (1 − 𝜌𝑤 )𝑊
𝐽𝑐 (𝑘)𝐽𝑐 (𝑘)
𝑎

{z

}

|

{z

firm surplus}

local labor stealing− 𝜌𝑤

𝐷 𝑘𝑐 (𝑎) 𝜌𝑤 Õ 𝑤 𝐷 𝑘𝑐 (𝑎)𝑊¯ ∗ (𝑎)
𝜑 (𝑎)
+
𝛽𝑤 𝑎
𝐽𝑐 (𝑘)𝐽𝑐 (𝑘)
𝑎

(4.3)

Õ

|

{z
national labor stealing

} |

{z

}

love-of-variety preference∗¯ 𝑐∗ (𝑎) and 𝑊¯ ∗ (𝑎) are the skill-specific mean values at the city level and the
˜ 𝑘𝑐 (𝑎) − 𝑊𝑘𝑐 (𝑎) , and 𝑊
where 𝑊𝑘𝑐(𝑎) = 𝑊
national levels.

The differences in social and private values of workers and firms make clear the location choiceexternalities in the laissez-faire equilibrium. For workers, they do not internalize their agglomeration¯ 𝑐 in equation (4.2).31 The magnitude of such
spillovers for other agents in the city, which is captured by 𝜇𝑊
spillovers is independent of the firm choice the worker makes within a city. One may suspect that workers
do not internalize the impact on firm profits when making location choices. This does not present a sourceof externality in this economy due to the constant wage markdown - namely, workers and firms split fixedshares of the surplus of the match. The fixed rent sharing between firms and workers induces workers toindirectly internalize the impact of their workplace decisions on their employers’ profits.
For firms, they only take into account the profits they can earn in a city by charging markdowns on
the workers they match with, which appears as the firm surplus part in equation (4.3).32 However, they
do not internalize the following. First is the labor market stealing externality, which includes competingfor workers with other firms in the same city, namely local labor stealing, and attracting workers fromother cities, namely national labor stealing. The relative extent of local versus national labor stealing effects
is governed by parameter 𝜌𝑤 , which controls the correlation of idiosyncratic preferences between firms
within a city. When 𝜌 = 0, meaning that workers’ idiosyncratic preferences are perfectly correlated withina city, there is no worker mobility across cities and thus no national labor stealing effect.
The reason for the labor stealing effects is that firms do not consider their location decisions’ impacts
on local wage indices, W𝑐 (𝑎), which ultimately affect the labor supply curves faced by every firm in theeconomy. This is because firms do not observe workers’ idiosyncratic preferences, so they cannot set wages
for each worker conditional on this preference idiosyncrasy. In other words, one firm competes with otherfirms for all workers through the wage index, even though some workers may particularly prefer to workfor this firm. Instead, if firms could observe workers’ preferences, they would optimally set wages to pricethis information. The information asymmetry gives rise to the fundamental market failure in the local
labor market. On the one hand, an additional firm congests the local labor market, making it harder forother local firms to hire local workers. This congestion effect can be seen in equation (3.3). On the other
hand, this additional firm expands local employment opportunities, which attract more workers to move
31Both Fajgelbaum and Gaubert (2020) and Rossi-Hansberg et al. (2019) emphasize heterogeneous productivity spillovers
across different types of workers in proximity, which I abstract from. I experimented with heterogeneous agglomeration elasticities
by worker skill when estimating the model, which aims to capture the heterogeneous spillovers in a reduced-form approach.
However, I do not find significant differences after taking firm heterogeneity into account.
32One thing to note is that the surplus term also contains agglomeration spillovers.

19

into the city from elsewhere. This expansion effect can be seen in equation (3.4). Both effects are costly
from the planner’s perspective.
Second is the welfare improvement of local workers through their love-of-variety preference for more
firms. As discussed before, this is because workers have idiosyncratic preferences for each local firm,
thus viewing them as imperfectly substitutable workplace options. Firms do not internalize this welfare
effect. Equation (4.3) is the local labor market analog of the inefficient firm entry result in Mankiw and
Whinston (1986), who show that firm entrants do not consider business stealing from other firms andconsumers’ love-of-varietypreference when the product market features imperfect competition.33 To myknowledge, this is the first paper that formalizes such firm sorting externalities from the labor market
perspective. In this context, the inefficiency is a result of labor market segmentation and imperfect labormarket competition. Firm sorting in the laissez-faire equilibrium is efficient if any of these two features isabsent.
It is instructional to discuss what role the heterogeneity of cities, firms, and workers each plays inshaping firm sorting externality. I provide the discussion in the following lemma.
Lemma 1. The following hold in the spatial economy:
1. When there is no city, firm, or worker heterogeneity, the social marginal value of a firm in city 𝑐 is𝜋˜ 𝑐 =

𝐷𝑐 𝜌𝑤 𝑤·𝜑 .
𝐽𝑐 𝛽 𝑤(4.4)

2. When there is neither firm nor worker heterogeneity, but there is city heterogeneity, the social marginal value ofa firm in city 𝑐 is 𝜌𝑤 𝑤𝐷𝑐∗∗¯¯
𝜋˜ 𝑐 =
𝜌𝑤 𝑊𝑐 − 𝑊 +
𝜑 .
(4.5)
𝐽𝑐
𝛽𝑤
3. When there is no worker heterogeneity, but there is firm and city heterogeneity, the social marginal value of a
type-𝑘 firm in city 𝑐 is

 𝜌𝑤 𝑤
𝐷 𝑘𝑐∗
𝜋˜ 𝑐 (𝑘) =(𝑊𝑘𝑐− 𝑊¯ 𝑐∗ ) + 𝜌𝑤 𝑊¯ 𝑐∗ − 𝑊¯ ∗ +𝜑 .
𝛽𝑤
𝐽𝑐 (𝑘)


(4.6)

Starting from equation (4.4), when there is no heterogeneity, the social value of firms is only thelove-of-variety preference part. This is because, without firm and city productivity heterogeneity, there is¯ 𝑐∗ = 𝑊¯ ∗,no difference in the marginal product of labor for a worker working in any firm in a city, i.e. 𝑊
so the planner is not concerned about the relocation of workers caused by firms’ location choices. The
optimal firm allocation is the one that equalizes firm sizes everywhere, which aligns with the laissez-faireequilibrium. The national labor stealing effect shows up when there is city productivity heterogeneity, as
33The business stealing effect is not present in this model. This is because all firms produce the same homogeneous goods andare price takers in the product market. Therefore, changes in output caused by firm location decisions have no net social value.
This is consistent with Corollary 1 in Mankiw and Whinston (1986). Moreover, equation (4.3) can be re-written as
𝜋˜ 𝑐 (𝑘) =Õ𝐷𝑎

𝑘𝑐 (𝑎)𝐽𝑐 (𝑘)



h
i 𝜌
1
1
𝑤 𝑤
¯˜ (𝑎) + 𝜌 𝑊¯˜ 𝑘𝑐 (𝑎) −𝑊
𝜑 (𝑎) + resid. terms(1 − 𝜌𝑤 ) 𝑊𝑐𝑤 ˜ (𝑎) +𝛽𝑤
1 + 𝛽 𝑤 /𝜌𝑤
1 + 𝛽 𝑤 /𝜌𝑤

to explicitly include wage markdown in the expression. The residual terms account for the changes in agglomeration spillovers by
re-locating workers.

20

shown in equation (4.5). In this case, the planner would encourage more firms to locate in more productive
cities, which attract more workers there and increase total output. This result is consistent with Gaubert(2018), who argues there is insufficient firm sorting into productive larger cities.
There is an additional local labor stealing effect when firm heterogeneity is introduced, as shown inequation (4.6). The planner now internalizes the fact that heterogeneous firms’ location choice also affects
local matching and that the marginal product of labor differs across firms. In this case, the planner does
not want firms to locate in cities where they can offer below-city-average wages. In other words, theplanner would discourage low-productivity firms from co-locating with high-productivity firms. This
externality is similar to the labor market pooling externality of firm sorting studied by Bilal (2023), whoargues that low-productivity firms overvalue co-locating with high-productivity firms for favorable hiringconditions. As discussed in Bilal (2023), this externality is a spatial analog of Acemoglu (2001) in a frictional
labor market with random search, where wages do not price vacancy filling rates. In my framework,
the externality arises because firms’ wage posting does not price its effect on labor market congestion.
Finally, back to equation (4.3), the introduction of worker heterogeneity and worker-firm complementarity
exacerbates the labor stealing externalities, as it is even more costly when a high-skilled worker matcheswith a low-productivity firm.
I will show in Section 6.2 that the utilitarian planner would further strengthen the co-location ofhigher-skilled workers and high-productivity firms compared to the laissez-faire allocation. The planner
achieves so by reallocating better workers and firms to high-productivity cities and reallocating worse ones
to low-productivity cities. Without worker-firm complementarity, the co-location motive for the planner ismuch weaker.
4.1.2

Efficiency conditions and the optimal policy

With the distinction between social and private values, I now move on to characterizing the efficiency
conditions. As in Fajgelbaum and Gaubert (2020), I obtain conditions over the expenditure distribution,{𝑥 𝑘𝑐 (𝑎)} and {𝑥 𝑐 (𝑘)}, that must hold in any efficient allocation, where I define 𝑥 𝑘𝑐 (𝑎) ≡ 𝑐 𝑘𝑐 (𝑎) + 𝑟 𝑐 ℎ 𝑘𝑐 (𝑎) and𝑥 𝑐 (𝑘) ≡ 𝑐 𝑐 (𝑘). In Appendix C, I compare the competitive equilibrium with the expenditure distribution{𝑥 𝑘𝑐 (𝑎)} and {𝑥 𝑐 (𝑘)} to the outcomes of the social planner’s problem, which leads to the following
proposition.
Proposition 2. The following should hold in an efficient allocation:𝑥 𝑘𝑐 (𝑎)=|{z}𝛽 𝑤 /𝜌𝑤
1 + 𝛽 𝑤 /𝜌𝑤hprivateconsumption cost

˜ 𝑘𝑐 (𝑎) −𝑊

𝒪𝑐𝑤 (𝑎)| {z }|{z}social marginal
product of labori+

1
1 + 𝛽 𝑤 /𝜌𝑤

opportunity cost𝜑 𝑤 (𝑎)

(4.7)

|{z}
Pareto weightfor 𝐷 𝑘𝑐 (𝑎) > 0 ∀𝑎, 𝑘, 𝑐:
𝑥 𝑐 (𝑘)|{z}

privateconsumption cost=𝛽𝑓
1 + 𝛽𝑓h𝜋˜ 𝑐 (𝑘)−𝒪 𝑓 (𝑘)|{z}|{z}social marginalvalue of firm

opportunity cost

𝑓

i

+

1
1 + 𝛽𝑓𝜑 𝑓 (𝑘)

(4.8)

|{z}
Pareto weightfor 𝐽𝑐 (𝑘) > 0 ∀𝑘, 𝑐. The opportunity cost terms, {𝒪𝑐𝑤 (𝑎)} and {𝒪𝑐 (𝑘)}, are related to the multipliers on the resource
21

constraint of each worker and firm type in the planner’s allocation. With given Pareto weights {𝜑 𝑤 (𝑎)} and {𝜑 𝑓 (𝑘)},if the planner’s problem is globally concave and (4.7) and (4.8) hold, then the associated competitive equilibrium isefficient.
The two conditions in the proposition above define the relationship between private consumption
and the spatial allocation of workers and entrepreneurs that must hold in any efficient allocation. Private
consumption in the efficiency conditions for workers and firms differs from their consumption in thelaissez-faire equilibrium in several ways. First, the efficient consumption allocations in (4.7) and (4.8)
depend on the social marginal value rather than the private counterparts to correct sorting externalities.
Second, efficient consumption allocations take into account the opportunity costs of allocating workers andfirms elsewhere, which are related to the Lagrange multipliers of the spatial allocation and local matching
constraints. Workers’ opportunity costs, 𝒪𝑐𝑤 , vary by the city that workers are located in, whereas firms’
opportunity costs, 𝒪 𝑓 , do not vary spatially. The former variation is driven by correlated idiosyncratic
preferences between firms within a city and different matching opportunities between cities.34 Third, theefficient consumption allocation increases less than one-for-one with the social marginal value for both
workers and firms. This is optimal for the planner due to the distributional concerns. Within one agent typewhom the planner values equally, the planner has incentives to redistribute towards those earning lower
income, who have higher marginal utility of consumption. Lastly, the efficient consumption allocation also
admits the Pareto weight, so higher-weighted agents will consume more.
Equipped with the efficiency conditions, I now design a set of tax instruments to implement the efficientspatial allocation, which is stated in the following proposition.
Proposition 3. The efficient allocation can be implemented by a set of proportional taxes, including worker income𝑓𝑤
taxes, {𝑡 𝑘𝑐(𝑎)}∀𝑎,𝑘,𝑐 , and firm profit taxes, {𝑡 𝑐 (𝑘)}∀𝑘,𝑐 , specified as:
𝛽 𝑤 /𝜌𝑤
1+𝛽 𝑤 /𝜌𝑤𝑤
𝑡 𝑘𝑐(𝑎) = −
𝛽𝑓1+𝛽 𝑓𝑓𝑡 𝑐 (𝑘) = −˜ 𝑘𝑐 (𝑎) + 𝑇𝑐𝑤 (𝑎) − 𝑊𝑘𝑐 (𝑎)𝑊
𝑊𝑘𝑐 (𝑎)𝜋˜ 𝑐 (𝑘) + 𝑇 𝑓 (𝑘) − 𝜋 𝑐 (𝑘)𝜋 𝑐 (𝑘)

,

,

∀𝑘, 𝑐

∀𝑎, 𝑘, 𝑐(4.9)(4.10)

˜ 𝑘𝑐 (𝑎), 𝜋˜ 𝑐 (𝑘) are workers’ and firms’ social marginal values defined in Proposition 2, and 𝑇𝑐𝑤 (𝑎) and 𝑇 𝑓 (𝑘)where 𝑊𝛽𝑓𝛽 /𝜌1
are defined as 𝑇𝑐𝑤 (𝑎) ≡ − 1+𝛽𝑤𝑤 /𝜌𝑤𝑤 𝒪𝑐𝑤 (𝑎) + 1+𝛽𝑤1 /𝜌𝑤 𝜑 𝑤 (𝑎) and 𝑇 𝑓 (𝑘) ≡ − 1+𝛽 𝑓 𝒪 𝑓 (𝑘) + 1+𝛽
𝜑 𝑓 (𝑘).
𝑓
The optimal taxes take care of both inefficiencies due to sorting externalities and distributional concerns.
I assume that firms take worker income taxes as given when choosing wages and that the land rents are𝑤
rebated to workers proportionally to the after-tax worker income, (1 − 𝑡 𝑘𝑐(𝑎)) · 𝑊𝑘𝑐 (𝑎). As a result, theoptimal wage offer does not change with the optimal policy, yet a worker’s total income changes.35
34See Appendix C for the expressions of the opportunity cost terms. One can perceive the opportunity cost as the price ofcongestion for allocating a marginal worker or firm. The planner understands that workers and entrepreneurs have idiosyncratic
preferences. Therefore, allocating more workers or firms to a city is associated with worse idiosyncratic preferences for themarginal worker or firm, which is viewed as a cost from the planner’s perspective.
35To put in context, Fajgelbaum and Gaubert (2020) use optimal transfers to achieve the efficient allocation. I instead recast thetransfers as proportional taxes taken as given by firms. The reason is that the transfer will affect the labor supply curves in a waythat changes firms’ optimal wage setting when they have the monopsony power.

22

4.2

Equilibrium uniquenessOne may be concerned that the model with two-sided sorting and local agglomeration may generate
multiple equilibria. Although formal proof is still a work in progress, I provide a heuristic discussion here on
how equilibrium uniqueness is affected by different model parameters. As common in spatial equilibrium
models, multiple equilibria arise if agglomeration forces are stronger than dispersion ones (e.g. Bayer
and Timmins (2005) and Allen and Arkolakis (2014)). Various dispersion forces in the model, including
heterogeneous location fundamentals, (𝐴 𝑐 , 𝑅 𝑐 ), housing market congestions (governed by 𝛾𝑐 , 𝜂, 𝛼), andlocation-specific idiosyncratic preferences (governed by 𝛽 𝑤 and 𝛽 𝑓 ), alleviate such concern. In addition,
as will be shown later, the agglomeration elasticity is empirically estimated to be very small, limiting the
incentive for agents to concentrate geographically.
However, there are two other reasons for multiplicity that are unique to this two-sided sorting framework.
First, given production complementarity (governed by the covariance of 𝜃 and 𝑧) and local matching, highskilled workers tend to follow where high-productivity firms locate, and vice versa for high-productivity
firms. Second, workers have love-of-variety preference for more local firms (governed by 𝛽 𝑤 /𝜌𝑤 ). Hence, allworkers tend to locate in cities with more firms, which expands labor supply and then attracts more firms.
Both mechanisms can lead to “mutual chasing” between firms and workers and thus multiple equilibria.
I conduct a numerical simulation exercise in Appendix D showing that multiple equilibria only occur
when 𝛽 𝑤 /𝜌𝑤 is small and 𝜃 for high-𝑧 firms is large. The intuition is as follows. The 𝛽 𝑤 /𝜌𝑤 parameter
governs both the love-of-variety preference and the extent of worker-firm assortative matching. Therefore,a large value of 𝛽 𝑤 /𝜌𝑤 implies that all workers benefit less from more local firms and high-skilled workers
are more likely to be matched with the most productive firm, regardless of the number of such firms in thecity. Both aspects diminish the tendency of workers to follow firms. Parameter 𝜃 for high-𝑧 firms governs
the complementarity of high workers and productive firms, of which a smaller value lowers the return ofmatching and of co-location with each other. The estimation results of a large 𝛽 𝑤 /𝜌𝑤 estimate around 6
and moderate 𝜃 for high-𝑧 firms imply a low likelihood for multiple equilibria. I also experiment withsolving the estimated model with different initial guesses - they all converge to the same equilibrium.

5

Empirical Implementation

5.1

Overview

The structural parameters to be estimated can be grouped into four blocks. First is the sorting elasticity
parameters block, including labor supply elasticity parameters {𝛽 𝑤 , 𝜌𝑤 } and the firm sorting elasticity
parameter 𝛽 𝑓 . Second is the productivity parameters block, including worker skill 𝑎, firm productivity
parameters {𝑧, 𝜃}, city exogenous productivity 𝐴, and the agglomeration elasticity 𝜇. Third is the amenity
parameters block, including skill-specific firm and city amenity parameters {𝑅 𝑐 (𝑎), 𝐺 𝑗 (𝑎)}. Last is the
housing supply parameters block, including the housing supply elasticity 𝛾𝑐 , the amount of land 𝐻¯ 𝑐0 , andhousing expenditure shares for workers and firms, {𝜂, 𝛼}.
The procedure for estimating the parameters is summarized as follows. The sorting elasticity parameters
block is estimated using the passthrough design following Lamadon et al. (2022). For the productivity
parameters, I use between-firm worker movers to identify worker skills from firm and city productivity,23and firms’ revealed location choices to identify the city productivity. I recover amenities by matching
worker sorting shares across firms and cities, controlling for (real) wage differences. I use the exogenous
variation of city population from immigration to identify the agglomeration elasticity. Finally, I estimate thehousing supply elasticity by tracing rent changes due to exogenous housing demand shocks and estimatecity-specific land supply by matching the levels of city rents. I calibrate the worker share of expenditure on
housing 𝜂 = 0.24 following Davis and Ortalo-Magné (2011),36 and the firm share on housing 𝛼 = 0.06 using
information on firms’ housing and wage bill expenditures.37
For the rest of the section, I first introduce additional assumptions that are useful for identification.
These assumptions include discretizing firms into clusters and adding time-varying productivity andpreference shocks onto the static model in Section 3. I then discuss the identification strategy of eachparameter block. I conclude this section by presenting the estimation results and discussing the model fit.

5.2

Additional assumptions

5.2.1

Discretization

I follow Bonhomme et al. (2019a) and restrict firm production technology (𝑧 𝑗 , 𝜃 𝑗 ) and skill-specificamenities G 𝑗 = {𝐺 𝑗 (𝑎)} 𝑎 to be drawn from a discrete distribution. I refer to each set of firms with the same{𝑧, 𝜃, G} as a firm cluster, indexed by 𝑘 ∈ {1, 2, 3, ..., 𝐾}. This classification of firms into clusters helps
mitigate limited mobility bias, which is prevalent in the AKM estimation using movers (Andrews et al.,2008; Bonhomme et al., 2023).
5.2.2

Stochastic processes

I introduce time-varying shocks to the static model to utilize the panel feature of the matched employeremployee dataset for identification. I restate key model variables with these shocks in Appendix E.1. I
introduce first workers’ idiosyncratic preference shocks and skill shocks, and then firm and city productivity
shocks, and lastly measurement errors on firm wage bills. I also impose an orthogonality condition on thetime-varying skill and productivity shocks, which is useful for identification.
Assumption 2. Workers’ idiosyncratic preference shocks are drawn from a Type-I Extreme Value Distribution withthe cumulative distribution function: Õ Õ 𝜌𝑤 

𝜖
𝑖𝑗𝑡
©
ª 

𝐹(−
𝜖→
𝑒 𝑥𝑝 −­® .
𝑖𝑡 ) = 𝑒 𝑥𝑝 −𝜌𝑤
 𝑐 𝑗∈𝒥𝑐𝑡

«
¬ 


(5.1)

This assumption follows recent structural labor literature on worker-firm sorting (Card et al., 2018;
Lamadon et al., 2022). Changes in workers’ preferences can lead to their movements across firms andcities. Note that although equation (5.1) adds the time dimension to equation (3.2), it does not restrict the
time-series properties of 𝜖 𝑖𝑗𝑡 .
36I also experiment with heterogeneous housing expenditure shares when conducting counterfactual analysis. In these cases, I
follow Eeckhout et al. (2014) to calibrate 𝜂 = 0.35 for low-skilled workers and 𝜂 = 0.22 for high-skilled workers.
37Specifically, I calculate the value of annual housing services as 𝑡𝑜𝑡𝑎𝑙_ℎ𝑜𝑢𝑠𝑖𝑛 𝑔_𝑠𝑒𝑟𝑣𝑖𝑐𝑒𝑠 = 𝑣𝑎𝑙𝑢𝑒_𝑜 𝑓 _𝑏𝑢𝑖𝑙𝑑𝑖𝑛 𝑔𝑠 ×(𝑑𝑒 𝑝𝑟𝑒 𝑐𝑖𝑎𝑡𝑖𝑜𝑛_𝑟 𝑎𝑡𝑒 + 𝑝𝑟𝑜𝑝𝑒𝑟𝑡 𝑦_𝑡𝑎𝑥_𝑟𝑎𝑡𝑒 + 𝑚𝑜𝑟𝑡 𝑔𝑎 𝑔𝑒_𝑟𝑎𝑡𝑒 − 𝑐𝑎𝑝𝑖𝑡𝑎𝑙_𝑔𝑎𝑖𝑛_𝑟𝑎𝑡𝑒) + 𝑟𝑒 𝑎𝑙_𝑒𝑠𝑡𝑎𝑡𝑒_𝑟𝑒𝑛𝑡𝑎𝑙. Then, I calculate
𝛼 =total_housing_services/(total_housing_services+total_wage_bill). Only the largest firms report the value of buildings and the realestate rental expenses in the NALMF data, so I use the subset of firms with non-zero total housing services to calibrate 𝛼.

24Assumption 3. The skill of a worker 𝑖 at time 𝑡, 𝑎 𝑖𝑡 , contains a permanent skill component 𝑎 𝑖 and a transient skill
shock 𝑎ˆ 𝑖𝑡 , where 𝑎ˆ 𝑖𝑡 follows a stationary mean-zero stochastic process that is independent of 𝑎 𝑖 . The transient shock
does not interact with firms’ skill-augmenting productivities, that is𝜃 𝑗 log 𝑎 𝑖𝑡 = 𝜃 𝑗 log 𝑎 𝑖 + log 𝑎ˆ 𝑖𝑡(5.2)

and workers’ preference for amenities only depends on the permanent worker skill 𝑎 𝑖 , that is
𝐺 𝑗 (𝑎 𝑖𝑡 ) = 𝐺 𝑗 (𝑎 𝑖 ), 𝑅 𝑐 (𝑎 𝑖𝑡 ) = 𝑅 𝑐 (𝑎 𝑖 ).

(5.3)

The introduction of transient worker skill shocks follows Lamadon et al. (2022) and is important for
identifying the effect of worker-firm interaction on earnings. Importantly, the transient skill shock does notinteract with the skill-augmenting productivity term or affect workers’ preference for non-wage amenities.
These restrictions imply the transient shocks generate earnings changes but do not affect workers’ sorting
decisions to cities and firms.
Assumption 4. The productivity of a firm 𝑗 and a city 𝑐 at time t, {𝑧 𝑗𝑡 , 𝐴 𝑐𝑡 }, both contain a permanent part {𝑧 𝑗 , 𝐴 𝑐 }and a transient shock { 𝑧ˆ 𝑗𝑡 , 𝐴ˆ 𝑐𝑡 }:log 𝑧 𝑗𝑡 = log 𝑧 𝑗 + log 𝑧ˆ 𝑗𝑡(5.4)
log 𝐴 𝑐𝑡 = log 𝐴 𝑐 + log 𝐴ˆ 𝑐𝑡(5.5)

where log 𝑧ˆ 𝑗𝑡 and log 𝐴ˆ 𝑐𝑡 follow first-order Markov processes with innovations that are i.i.d. across firms, cities andtime.
I allow for time-varying productivity shocks at both firm and city levels. Such dynamic processesof firm productivity follow the well-known works on production function estimation in the industrialorganization literature (e.g. Olley and Pakes (1996) and Doraszelski and Jaumandreu (2018)). Thesetime-varying productivity shocks generate wage bill shocks that are important for the passthrough design
to be discussed in Section 5.3. It is necessary to have both firm and city productivity shocks in order to
identify labor supply elasticities at both levels. Furthermore, I assume that the time-varying worker skill
shocks and firm and city productivity shocks are independent, as in Lamadon et al. (2022).
Assumption 5. The stochastic process for the transient worker skill shock 𝑎ˆ 𝑖𝑡 , firm productivity shock 𝑧ˆ 𝑗𝑡 and city
productivity shock 𝐴ˆ 𝑐𝑡 are independent of each other.
Finally, I introduce the measurement errors in observed firm wage bills.
Assumption 6. The observed wage bill of firm 𝑗 in the data 𝐸¤ 𝑗𝑡 are related to their counterparts in the model 𝐸 𝑗𝑡 witha measurement error 𝑒 𝑗𝑡 :log 𝐸 𝑗𝑡 = log 𝐸¤ 𝑗𝑡 + 𝑒 𝑗𝑡
(5.6)
where the measurement error for wage bill follows a 𝑀𝐴(𝑞) process given by 𝑒 𝑗𝑡 =across firms and time.

25

Í𝑞

𝑠=0

𝑒
𝛿 𝑠 𝑢 𝑗(𝑡−𝑠), and 𝑢 𝑗𝑡𝑒 is i.i.d.

5.3

Estimation Strategy

Step 1: Sorting elasticity parameters
Worker sorting elasticity parameters
I identify the workers sorting elasticity across firms, 𝛽 𝑤 /𝜌𝑤 , and the elasticity across cities, 𝛽 𝑤 , using
the passthrough design as in Kline et al. (2019) and Lamadon et al. (2022). This empirical design exploits
wage bill shocks at firm and city levels and identifies the elasticity parameters using earnings changes ofthe staying workers.
¯ 𝑐𝑡 as city-level mean firm wage bills and mean worker earnings, and log 𝐸¤̂ 𝑗𝑡 ≡I define 𝐸¯ 𝑐𝑡 and 𝑊
ˆ 𝑖𝑗𝑡 ≡ log 𝑊𝑖𝑗𝑡 − log 𝑊¯ 𝑐𝑡 as the residualized wage bill and earnings. As I show in
log 𝐸¤ 𝑗𝑡 − log 𝐸¤̄ 𝑐𝑡 and log 𝑊
Appendix E.2, changes in the mean variables isolate city-level shocks, and changes in residualized variables
1
isolate firm-level shocks. I define worker passthrough parameters as 𝛿 𝑤 ≡ 1+𝛽𝑤1 /𝜌𝑤 and 𝛿 𝑐 ≡ 1+𝛽. Parameter𝑤
𝛿 𝑤 is identified from the passthrough of residualized firm wage bill shocks to changes in residualized log
earnings for the stayers:!

ˆ 𝑖𝑗𝑡 = 𝛿 𝑤 Δ log 𝐸¤̂ 𝑗𝑡 + Δ 𝑎ˆ 𝑖𝑡 + 𝛿 𝑤
Δ log 𝑊𝜙ˆ 𝑗𝑐𝑡Δ𝑒 𝑗𝑡 − Δ log
.
𝜙ˆ 𝑐𝑡

(5.7)

The extent of passthrough is controlled by the firm-level labor supply elasticity 𝛽 𝑤 /𝜌𝑤 . A larger labor
supply elasticity implies that firms can adjust employment by smaller changes in wage offers, thus lessrent sharing for stayers from wage bill shocks. Moreover, the passthrough equation (5.7) requires using
the stayers sample to estimate, because the movers’ earnings changes are caused by both rent sharing andmovement across firms and/or cities.38
There are three residual terms in the net passthrough equation (5.7), which are the 𝑖.𝑖.𝑑. skill transient
shock Δ𝑎 𝑖𝑡 , the firm wage bill measurement error Δ𝑒 𝑗𝑡 , and changes in the relative wage bill shifter
Δ log( 𝜙ˆ 𝑗𝑐𝑡 /𝜙ˆ 𝑐𝑡 ). The last term is caused by changes in the set of firms in the city 𝑐, which affects the labor
supply curves through the wage index, W𝑐 (𝑎). The potential correlation of the wage bill shock with themeasurement error and with the relative wage bill shifter gives rise to two endogeneity concerns.
To deal with the first concern, I instrument the net wage bill shock log Δ𝐸¤̂ 𝑗𝑡 with its lags before year𝑡 − 𝑞 − 1, as in Lamadon et al. (2022). These lag shocks are correlated with the current shock as firm-levelproductivity shocks are persistent, and they are uncorrelated with contemporaneous measurement errors,
which are assumed to follow 𝑀𝐴(𝑞). To deal with the second concern, I use the control function approach
following Doraszelski and Jaumandreu (2018). Assuming that Δ log( 𝜙ˆ 𝑗𝑐𝑡 / 𝜙ˆ 𝑐𝑡 ) follows a first-order Markov
ˆ 𝑖𝑗𝑡−1 and Δ log 𝐸¤̂ 𝑗𝑡−1 . Inprocess, I can use control for it using one-period lagged variables, namely Δ log 𝑊
practice, I control for a cubic polynomial of these lags. See Appendix E.2 for more details.
Analogously, parameter 𝛿 𝑐 is estimated from the passthrough of city mean real wage bill shocks to

38Recall from Section 2.1 that the stayers sample include workers who are associated with the same firm for at least 7 years andfirms with at least 10 worker stayers.

26

changes in mean real log earnings, also for the stayers:

Δ log

¯ 𝑐𝑡
𝑊
𝜂

𝑟 𝑐𝑡

!
= 𝛿 𝑐 Δ log

𝐸¤̄ 𝑐𝑡
𝜂

𝑟 𝑐𝑡

!



+ 𝛿 𝑐 Δ𝑒 𝑐𝑡 − Δ log 𝜙ˆ 𝑐𝑡


(5.8)

where 𝑒 𝑐𝑡 is introduced as the measurement error of city-level mean firm wage bills, which is assumed tofollow a 𝑀𝐴(𝑞) process as 𝑒 𝑗𝑡 . It is worth pointing out that workers’ location choices are affected by real
wage, rather than nominal, changes. City-level productivity shocks are partly capitalized into housing
rents, which dampens population responses. Hence, estimating equation (5.8) using nominal terms, theempirical specification of Lamadon et al. (2022), will upward bias the estimate of the city-level labor supply
elasticity 𝛽 𝑤 .
I apply the same instrumental variable strategy as the firm-level passthrough equation (5.7) to address
endogeneity concerns that come from Δ𝑒 𝑐𝑡 and log 𝜙ˆ 𝑐𝑡 . One may be additionally concerned that thecity-level 𝑟𝑒 𝑎𝑙 wage bill shocks are associated with amenity changes through local skill share changes (e.g.
Diamond (2016)). In one specification that I run, I non-parametrically control for changes in shares ofhigh-skilled workers to proxy potential amenity changes.
Firm sorting elasticity parameter
Analogously, the firm sorting elasticity parameter 𝛽 𝑓 can be identified from the passthrough of city
total wage bill shocks to mean wage bill of staying firms in the city:
Δ log 𝐸¯ 𝑐𝑡 = 𝛿 𝑓 Δ log 𝐸¤ 𝑐𝑡 + 𝛿 𝑓

𝜙ˆ 𝑐𝑡
Δ𝑒 𝑐𝑡 − Δ log
Φ𝑐𝑡

!
(5.9)

1
where I define the firm passthrough parameter 𝛿 𝑓 = 1+𝛽. This passthrough equation for firms is estimated𝑓using a sample of firms that stay in the same city for at least 7 years and employ at least 10 workers eachyear. As with the passthrough regressions for workers, I also use lags of the total wage bill shocks before
year 𝑡 − 𝑞 − 1 as instruments to account for potential contemporaneous correlation of the total wage billshock and the measurement error, and the control function approach to account for endogenous effects
from changes in the set of local firms, captured by Δ log( 𝜙ˆ 𝑐𝑡 /Φ𝑐𝑡 ). See Appendix E.3 for more details.

This firm passthrough equation requires the number of firms to respond to local productivity shocksˆ
𝐴 𝑐𝑡 in each year. However, it is not necessary to have firm movers as we need for the worker passthroughequations. Suppose that there are random firm exits in all cities every year, which are replaced by new
entrant firms with the same productivity distribution who then make location decisions. The underlying
assumption for the firm passthrough equation is that there exists sufficient firm entry and exit such thatthe share of firms in each city satisfies equation (3.12) in all years.

Step 2: Productivity and amenity parameters
I now present the estimation strategy for the productivity and amenity parameters. At the heartof this strategy is a combination of the movers design of the AKM model (Abowd et al., 1999) and theidea of compensating differentials in the Rosen-Roback model (Rosen, 1974; Roback, 1982). The former
identifies worker skills from the city and firm components in the earnings equation; the latter identifies the27amenity and city productivity parameters that match the spatial distribution and matching patterns ofheterogeneous workers and firms. I utilize the clustering approach by Bonhomme et al. (2019a) to mitigate
limited mobility bias that is associated with the movers design.
The standard approach is to classify firms directly based on the empirical earnings distribution using astatistical clustering algorithm, e.g. k-means clustering. The inclusion of city productivity and the interestin identifying city and firm productivity separately complicates the clustering procedure. In this context,
firm productivity and location fundamentals both contribute to workers’ earnings. Hence, two firms thatare located in different cities and with the same earnings schedule may differ in firm productivity. A
correct classification that captures true firm heterogeneity thus requires controlling for the local factors infirms’ earnings distributions. To make progress, I design an iterative procedure that relies on guessing and𝜇
updating the city composite productivity, defined as A𝑐 ≡ 𝐴 𝑐 𝐿¯ 𝑐 , where 𝐿¯ 𝑐 is the average city population of
the sample period. In what follows, I describe each step of this procedure.
Worker and firm fixed effects¯ 𝑖𝑗𝑡 , by partialling out
In Appendix E.4, I construct a measure of adjusted log earnings, denoted by log 𝑊
time-varying firm-level and city-level shocks and the city-level earnings determinants. It can be shown¯ 𝑖𝑗𝑡 is affected only by permanent worker skills 𝑎, firm productivity
that the adjusted log earnings log 𝑊
parameters (𝑧, 𝜃), and the time-varying skill shock 𝑎ˆ 𝑖,𝑡 :¯ 𝑖𝑗𝑡 = log 𝜒 +log 𝑊log 𝑧 𝑗𝜃 𝑗 log 𝑎 𝑖

+

|{z}

| {z }

firm productivity

worker-firm interaction+ 𝑎ˆ 𝑖,𝑡 .

(5.10)

This equation follows the same empirical specification as in Bonhomme et al. (2019a). I classify firms into
𝐾 clusters using the k-means clustering algorithm, taking firms’ empirical distributions of the adjusted log¯ 𝑖𝑗𝑡 as inputs. Having grouped the firms into clusters, the moment condition for identifying
earnings log 𝑊
cluster-specific productivity parameters {𝑧 𝑘 , 𝜃𝑘 }∀𝑘 is:"E¯ 𝑖𝑗(𝑡+1)
log 𝑊
𝜃𝑘 ′

!

¯ 𝑖𝑗𝑡 log 𝑧 𝑘log 𝑊log 𝑧 𝑘′
−
−
−
𝜃𝑘 ′
𝜃𝑘
𝜃𝑘

!

#
| 𝑘 ≠ 𝑘 ′ = 0.

(5.11)

Equation (5.11) indicates that 𝑧 𝑘 and 𝜃𝑘 are identified with wage changes of between-cluster job movers,
regardless of whether the move is within or between cities. The identification assumption of equation(5.11) is that the worker transient skill shock, 𝑎ˆ 𝑖𝑡 , is orthogonal to the permanent skill 𝑎 𝑖 ; and this shock
does not interact with the skill-augmenting productivity 𝜃. Equation (5.11) gives 𝐾 × 𝐾 moments to
identify 2𝐾 parameters, two for each cluster. As discussed in Bonhomme et al. (2019a), identification of
the skill-augmenting productivity 𝜃 exploits differences in earnings changes of job movers in opposite
directions, i.e. mover from 𝑘 to 𝑘 ′ and from 𝑘 ′ to 𝑘, provided that they differ in skills:

E 𝑘 𝑘′ (𝑎) ≠ E 𝑘′ 𝑘 (𝑎).
I show in Figure I.8 that this asymmetry is empirically supported by data.39 With 𝑧 and 𝜃 identified,
39Bonhomme et al. (2019b) clarify that documenting symmetric earnings gains and losses is not sufficient to reject the existence

28

worker permanent skill 𝑎 𝑖 can be retrieved from equation (5.11).
Firm and city amenities
The amenity terms, 𝐺 𝑘 (𝑎) and 𝑅 𝑐 (𝑎), are identified as compensating differentials: holding wages (realwages) fixed, firms (cities) with better amenities are able to attract more workers.40 Hence, the amenities
can be inferred from observed wages (real wages) and the composition of workers across firms (cities).
Assuming that the amenities do not change over time, I show in Appendix E.5 that:𝜂𝑟¯𝑐

𝑅 𝑐 (𝑎) · 𝐺 𝑘 (𝑎) =𝛼𝛼−1A𝑐 𝑟 𝑐𝛽𝑤

𝜌𝑤

1· 𝐽¯𝑐 (𝑘) 𝜌𝑤 · Λ 𝑘𝑐 (𝑎) 𝛽𝑤 Λ𝑐 (𝑎) 𝛽𝑤· 𝑧 𝑘 𝑎 𝜃𝑘

(5.12)

where Λ 𝑘𝑐 (𝑎) is the average share of skill 𝑎 workers in cluster 𝑘 firms during the sample period, conditionalon living in city 𝑐; Λ𝑐 (𝑎) is the average share of skill 𝑎 workers in city 𝑐; and 𝐽¯𝑐 (𝑘) is the average number ofcluster 𝑘 firms in city 𝑐. All RHS terms of the equation can be calculated from data. Equation (5.12) thus
gives 𝐾 × 𝐶 moments to identify 𝐾 + 𝐶 amenity parameters, up to one normalization for each skill 𝑎.
City composite productivity
The next step is to estimate the city composite productivity A𝑐 . To do so, I exploit the revealed firm
location choices. Recall that entrepreneurs make location choices based on the optimal profits in all cities,
which we know from equation (3.9) can be written as:𝜋¯ 𝑐 (𝑘) = Ψ · A𝑐 𝑟¯𝑐

𝛼
𝛼−1



· (𝑧 𝑘 )1+𝛽𝑤 /𝜌𝑤 · 𝜙 𝑘𝑐 .

(5.13)

I show in Appendix E.6 that with the estimates of labor supply parameters {𝛽 𝑤 , 𝜌𝑤 }, worker skill 𝑎,firm production parameters {𝑧, 𝜃} and amenity parameters 𝐺 𝑘 (𝑎), I can construct 𝜙 𝑘𝑐 for all city-cluster
pairs. Having clustered all firms, I can construct the share of firms in each cluster 𝑘 located in each city 𝑐,denoted as 𝑝 𝑐 (𝑘), from the data. It follows that city composite productivity A𝑐 can be identified from thefirm sorting equation below

𝛽𝑓𝛼 A𝑐 𝑟¯𝑐𝛼−1 · 𝜙 𝑘𝑐
𝑝 𝑐 (𝑘) =
𝛽𝑓 .
𝛼 
Í 
𝛼−1
A𝑐′ 𝑟¯𝑐′ · 𝜙 𝑘𝑐′𝑐′

(5.14)The intuition is that controlling for the labor composite, a city with higher rent-adjusted composite
productivity should attract a larger share of firms. Therefore, holding all else constant, a city that attracts
more firms is revealed to be more productive. Note that firm productivity 𝑧 does not enter the equation
above since a firm can carry its productivity to whichever city it chooses. Therefore, this equation gives
𝐶 × 𝐾 moments in order to identify 𝐶 city composite productivity parameters, up to one normalization.
Discussions on the iterative procedure
It helps to discuss what economic forces in the model facilitate the convergence of the iterative procedure.
The logic is the following. Consider that in one iteration of the procedure, the city composite productivityof complementarity. See their Online Supplement Section S2 for more details.
40Recall that I assume firms in the same cluster share the same skill-specific amenity, namely 𝐺 𝑗 (𝑎) = 𝐺 𝑘(𝑗) (𝑎).

29

of city 𝑐 is guessed to be greater than its true value. With this guess, firm productivity 𝑧 𝑗 for local firms
would be estimated to be smaller than their true values, which can be seen from equation (5.10). The labormarket in city 𝑐 would seem to be less competitive, resulting in larger 𝜙ˆ 𝑘𝑐 in equation (5.13), and thus
seem to be more profitable. However, the shares of firms in city 𝑐, 𝑝 𝑐 (𝑘), are fixed in data, despite small
adjustments in firm clustering with the guess. To fit the firm sorting shares in equation (5.14), the city
composite productivity will be updated to be smaller at the end of this iteration. In sum, the iterative
procedure achieves convergence for a system of cities via proper allocation of earnings to city and firmcomponents, which is disciplined by revealed firms’ location choices in the data.
Note that separate identification of city and firm productivities does not depend on the discretization
assumption. In the absence of limited mobility bias, I would not need to either group firms into clusters orapply the iterative procedure.
Due to prevalent measurement errors in the data, it is challenging to estimate each city’s productivity
precisely, and even more so for smaller cities, using this procedure, which renders convergence of theiterative algorithm difficult. To deal with this statistical issue, I smooth city composite productivity
estimates against log city population using a third-order polynomial after each iteration, and iterate until
the smoothed estimates converge. This does not affect the model’s ability to account for the systematic
contribution of the city fundamental to the urban earnings premium, but undermines its ability to conduct a
structural variance decomposition exercise as smoothing city productivity against population mechanicallydecreases its variance.
Agglomeration elasticity and city productivity
I estimate the agglomeration elasticity 𝜇 by relating converged city composite productivity to city
population. Specifically, I run the following regression:log A𝑐 = 𝐴0 + 𝜇 log 𝐿¯ 𝑐 + 𝜖 𝐴𝑐(5.15)

where 𝐴0 is the intercept representing the normalization, and 𝜖 𝐴
𝑐 is the error term. City population ispositively correlated with unobserved city characteristics absorbed by the error term 𝜖 𝐴
𝑐 . Thus, an OLS
estimate of the parameter 𝜇 is biased. To obtain a causal estimate of 𝜇, I use an immigration-based
population shock as an instrument following Card (2001). City exogenous productivity can then be−𝜇recovered as 𝐴 𝑐 = A𝑐 · 𝐿¯ 𝑐 . See more details in Appendix E.7.

Step 3: Housing supply parameters
Lastly, I show how I estimate the housing supply parameters, with more details in Appendix E.8. The(inverse) housing supply elasticity can be estimated by relating changes in the housing rent to changes in
the housing expenditure:𝑟Δlog 𝑟 𝑐𝑡 = Γ𝑐 Δ log 𝐸𝐻𝑐𝑡 + Δ𝑒 𝑐𝑡(5.16)
𝛾

where Γ𝑐 ≡ 1+𝛾𝑐 𝑐 , 𝑟 𝑐𝑡 is the average housing rent of city 𝑐 in year 𝑡, and 𝐸𝐻𝑐𝑡 is the total housing expenditurein city 𝑐 in year 𝑡.41 The slope coefficient Γ𝑐 informs the housing supply elasticity: a high Γ𝑐 means that the
housing rent changes significantly to housing demand, which implies a low housing elasticity. Following
41I measure the average housing rent using the average monthly rent of two-bedroom units. See Appendix A for more details.

30

Saiz (2010), I allow the housing supply elasticity to be affected by the share of land unavailable for housingdevelopment in each city, denoted by 𝑈 𝑁 𝐴𝑉 𝐴𝐿 𝑐 , and parameterize Γ𝑐 as a function of this share, i.e.
Γ𝑐 = Γ + Γ𝐿 𝑈 𝑁 𝐴𝑉 𝐴𝐿 𝑐 . The definition of undevelopable land follows Saiz (2010), that is, land with a slope
higher than 15 degrees and land covered by water. I estimate the housing supply equation using five-yearcity-level changes between 2002 and 2007. I choose this period to evade the 2008-2009 housing collapse
during the Great Recession and the subsequent surge in foreign investment in the Canadian real estatemarket, both of which stemmed from factors beyond local housing demand shocks.
An OLS estimate of the above equation may yield biased estimates of Γ𝑐 as the changes in the housing
expenditure are correlated with time-varying local characteristics which also affect changes in the housing
rent. To deal with this endogeneity concern, I follow Diamond (2016) and instrument Δ log 𝐸𝐻𝑐 using a0shift-share Bartik instrument. Then, I choose 𝐻 𝑐 to fit the average housing rent of each city.

5.4

Estimation results

Sorting elasticity and housing supply parameters
I discuss here the estimation results of the sorting elasticity and housing supply elasticity parameters.
The estimated parameter values using the preferred specifications and calibrated housing parameters are
summarized in Table 3.
I report the passthrough estimates for workers in Table I.6. For the firm-level passthrough parameter,
the IV estimate in Column (2) is 0.13, which is about half of the OLS estimate in Column (1). Controlling
for lagged changes in log earnings and wage bill as a proxy for changes in labor demand competition (i.e.
Δ log( 𝜙ˆ 𝑗𝑐𝑡 /𝜙ˆ 𝑐𝑡 )), reported in Column (3), increases the estimate slightly to 0.14. This passthrough elasticity
indicates a firm-level labor supply elasticity of 6.1, within the range of estimates reported in the literature(e.g. Card et al. (2018); Lamadon et al. (2022)).42 For the city-level passthrough parameter, the OLS estimateof 0.28 in Column (1) and the IV estimate of 0.30 in Column (2) are quite similar.43 Controlling for changes inlabor competition, reported in Column (6), reduces the estimate to 0.25. This is because changes in log mean
real wage bills are negatively correlated with the changes in labor market competition (Δ log 𝜙ˆ 𝑐𝑡 ), which
enters negatively into the structural error term. Further controlling for changes in shares of high-skilledworkers, reported in Column (7), increases the estimate to 0.32. The reason is that unobserved amenitychanges are positively correlated with real wage bill changes and are negatively correlated with real wage
workers need to be paid to live in a city. The city-level labor supply elasticity implied by the estimatedin Column (7) is 2.1, which is within the range of 0.5-5 reported in the literature (e.g. Suárez Serrato andZidar (2016); Hornbeck and Moretti (2018); Notowidigdo (2020); Bilal (2023)).
I report the passthrough estimate for firms in Table I.8. The IV estimate (0.21) in Column (2) is muchsmaller than the OLS estimate (1.06) in Column (1), which suggests changes in total city wage bills arestrongly and positively correlated with their measurement errors. In Column (3), I control for changes
42Note that the sources of variation are different from mine in these two papers. Card et al. (2018) review estimates using
value-added per worker and Lamadon et al. (2022) used changes in value-added, whereas I use changes in wage bills. I also
estimated a restricted specification that imposes 𝜌𝑤 = 1, which implies that workers’ preference draws are uncorrelated withincities. The estimated passthrough elasticity is then 0.15, which is also consistent with the existing literature.
43I have also tried running city-level passthrough regressions using nominal changes in mean wages and mean wage bills. The
OLS estimate (0.23) and the IV estimate (0.26) are both smaller than the ones using real changes, which implies that using nominal
measures for the city-passthrough equation over-estimates the city-level labor supply elasticity.

31

Table 3: Summary of sorting elasticity and housing-related parameter estimates
Parameter

Description

Value

Method𝛽 𝑤 /𝜌𝑤

Firm-level labor supply elasticity

6.1

Equation (5.7)

𝛽𝑤City-level labor supply elasticity

2.1

Equation (5.8)

𝛽𝑓Firm sorting elasticity

5.6

Equation (5.9)

𝛼Share of housing in production function

0.06

Value of housing services/VA𝜂

Share of expenditure on housing

0.24

Davis and Ortalo-Magné (2011)

𝛾𝑐Inverse housing supply elasticity

0.81

Equation (5.16)

in labor competition, and the estimate further decreases the estimate to 0.15. The inferred firm sorting
elasticity of 5.6 from Column (3) is within the range of the estimates Gaubert (2018) reports for firms in
different tradable industries, while slightly higher than the corresponding estimates in Suárez Serrato andZidar (2016) and Fajgelbaum et al. (2019).
The estimation results of the housing supply elasticity Γ𝑐 are reported in Table I.11. The OLS estimate
in Column (1) is 0.53 and the IV estimate in Column (2) slightly decreases to 0.45, but it is no longer
statistically significant. This IV estimate of Γ𝑐 translates to a housing supply elasticity 1/𝛾𝑐 of 1.25, which is
between the average elasticity of 0.5 reported in Baum-Snow and Han (2023) and 1.5 reported in Saiz (2010).
I further interact changes in log housing expenditure with the share of undevelopable land in Column (3)but find a null effect from topography differences.
Productivity parameters
I report the estimates of the two firm productivity parameters by cluster in Table I.9. When estimating
the earnings equation (5.10), I impose normalization that log 𝑧 = 0 and 𝜃 = 1 for the lowest-paying firm
cluster. The estimation result reveals considerable variation of common productivity 𝑧 and skill-augmenting
productivity 𝜃 across firm clusters. The two productivity parameters almost perfectly correlate with eachother, with a correlation coefficient of 0.97, consistent with the empirical results in Lamadon et al. (2022). It
indicates that more productive firms are also more efficient at harnessing worker skills, which confirms theexistence of worker-firm production complementarity.
The estimation procedure generates a continuous distribution of worker skills. In practice, I rank
workers by their continuous skill estimates, bin them into 100 equal-size worker groups, and calculate theaverage worker skill for each group. To better account for the spatial sorting of top-skilled workers, whichis quantitatively important for the urban earnings premium, I further divide the top percentile group into
equal-sized 21 worker groups, resulting in a total of 120 worker groups.
I plot the estimates of city productivity 𝐴 on city population in Figure I.9. I find that larger cities
have limited exogenous productivity advantages on average.44 To discover the determinants of the
44The city productivity-population elasticity is estimated to be 0.001 (s.e. 0.014). One interesting finding is that the exogenous
city productivity has a "U-shape" relationship with city population. Many productive cities are in the northern part of Canada,
which have low natural amenities due to severe climate conditions.

32

local productive advantage, I correlate the city exogenous productivity estimates with a set of location
characteristics and report the results in Table I.12. The result suggests that places with warmer summers in
the east are more productive, and places in the north are more productive controlling for adverse climate
conditions. As reported in Table I.10, the agglomeration elasticity 𝜇 is estimated to be very small (0.0004)
and statistically insignificant, after controlling for worker and firm heterogeneity.45
Amenity parameters
Lastly, I plot the firm and city amenity estimates, {𝐺 𝑘 (𝑎), 𝑅 𝑐 (𝑎)}, in Figure I.10. I bin both cities andworkers into ten groups based on city population and worker skills. Panel (a) shows firm amenities, where
I normalize the amenity of firm cluster 1 to be 1 for each worker group. It shows that the high-productivity
firms have lower amenities, especially for high-skilled workers. It may be due to longer work hours,
inflexible schedules, and high work stress that come with higher firm wage premia. Panel (b) shows cityamenities, where I normalize the amenities to be 1 of the largest city group for each worker group. Larger
cities have higher amenities for all workers and are more appreciated by higher-skilled workers, which isconsistent with Diamond (2016). I also correlated city amenities with the location characteristics in Table
I.12, which shows that workers appreciate places with warm winters, breezy summers, safe streets, andmountainous topography.

5.5

Model fit

I now check the model fit. The model cannot fit the data perfectly in two respects. First, it cannot
match the worker sorting shares for each city-cluster bin, Γ 𝑘𝑐 (𝑎). Second, it cannot match the firm sorting
shares for each city, 𝑝 𝑐 (𝑘). To see this, note that the model is over-identified as I only use 𝑁𝑐 + 𝑁 𝑘 numberof amenity parameters {𝑅 𝑐 (𝑎), 𝐺 𝑘 (𝑎)} to fit 𝑁𝑐 × 𝑁 𝑘 sorting shares per worker skill 𝑎, and only 𝑁𝑐 city
productivity parameters 𝐴 𝑐 to fit 𝑁𝑐 × 𝑁 𝑘 firm sorting shares. As worker and firm sorting interact closelyin the model, failing to match sorting shares of either side could undermine the model’s ability to explain
the relationship between two-sided sorting and spatial inequality. Hence, it is important to check how themodel solution matches key sorting and inequality measures in the data.
I first check the model fit of worker and firm sorting shares across cities in Figure I.11. To visualize this,I plot the data shares and the model-fitted sorting shares of workers in each skill decile and of firms ineach cluster across five city groups.46 The five city groups are the five largest cities (Top 5) group and four
equal-number city groups ranked by city population. It can be seen that the model can replicate sorting
shares in the data well. One caveat is that the model slightly over-predicts the share of the top cluster
firms in the largest 5 cities. This is driven by within-cluster variation in firm productivity. In the data, thetop-cluster firms in the largest cities are in fact larger and more productive than the firms belonging to thesame cluster in other cities. In order to fit the cluster-city employment shares, the model has to overstate
the share of top-cluster firms located in the largest cities.
I further examine the model fit of worker-firm match shares within cities in Figure I.12, where I plot theshares of workers in each skill deciles matched to each firm cluster in the largest five cities and smaller cities.
45The agglomeration elasticity should be interpreted as the static benefit of being in larger cities, controlling for city fundamental
and firm heterogeneity. The small estimate does not rule out learning benefits in larger cities, which play out over the life cycle.
46I also regress the model-fitted sorting shares on the data sorting shares, 𝑠 𝑘𝑐 (𝑎) and 𝑠 𝑐 (𝑘). The 𝑅 2 are 0.994 and 0.988
respectively for workers and firms.

33

Figure 2: Model fit of the urban earnings premiumCity Mean Log Earnings

0.2

0.0

Data (Blue): Slope = 0.022 (0.008)
Model (Grey): Slope = 0.018 (0.007)

−0.2

30k

100 k

300 k

1m

City Population

Note: This figure compares the relationship of the city mean log earnings and city population generated by the model solution
against the data. I plot the weighted linear regression fit of the two versions and report the slope estimates with standard
errors. The gray dots and the line represent model fit and the blue ones represent the data. I connect the two dots of the samecity to facilitate comparison.

The comparison shows that the model can fit the within-city match shares well. It slightly overstates thedegree of assortative matching in the sense that it generates larger match shares of the most skilled workers
to the most productive firms and the larger shares of the least skilled workers to the least productive firms
compared to data.
Lastly, I check the model fit of the urban earnings premium – the key relationship of interest. In Figure
2, I plot the model version and the data version of the city mean log earnings versus city population. This
comparison again confirms the model’s ability to fit the data: it generates an urban earnings premium of
0.018, which is marginally smaller than the data estimate of 0.022. It can also be seen that the model fitslarge cities better than smaller cities.

5.6

Discussions

Understanding worker skill: sorting and learning
With a static model, I do not take a stand on the origin of worker skill, which could originate fromdifferent worker innate abilities, education levels, and human capital accumulation from work experiences.
Baum-Snow and Pavan (2013) and De La Roca and Puga (2017) argue that the city-size wage premium is
primarily driven by the faster human capital accumulation of workers in big cities, which is more beneficial
for highly educated workers.47 In fact, both papers find non-significant worker sorting within educationgroups according to initial worker abilities. The goal of this paper, however, is not to distinguish between
47The Mincer-type regression that I run to construct residualized log earnings can only control for average returns fromexperience, but not heterogeneous returns from different city sizes.

34static sorting and dynamic learning. Instead, it aims to characterize worker and firm heterogeneity acrosscities and evaluate spatial policies while holding the skill and productivity distributions fixed.
As a validation, in Figure I.13 I plot the model-implied city high-skilled worker shares against collegeeducated worker shares. I define high-skilled workers as the ones with skill in the top three deciles of theskill distribution, which roughly matches the college-educated share of 28.5% in the 2016 Census. The
figure reveals a significant correlation between the two shares, which validates the worker skill estimatesusing the fixed effect approach.
Endogenous labor market power
Recent studies suggest that large cities have more competitive labor markets, which results in smaller
wage markdown and higher worker earnings (Hirsch et al., 2022; Bamford, 2021). For tractability purposes, I
assume away endogenous labor market power in the model. Having this feature will complicate the location
choices of workers and firms, as they are additionally affected by endogenous markdowns. Quantitatively,
the contribution of average city markdowns on the urban premium is captured by city productivity term
𝐴 𝑐 - all else equal, less competitive labor markets should attract more firms. As I will soon show, thequantitative importance of local characteristics is small relative to worker and firm heterogeneity, implying
a limited role of variable wage markdown. However, I cannot rule out the possibility that firms of different
sizes enjoy different labor market power, which could potentially bias the firm productivity estimates. In
addition, I estimate the firm-level passthrough parameter separately for the largest five cities and smaller
cities. As shown in Table I.7, the difference in this passthrough parameter estimates by city size is notstatistically significant. The table also includes passthrough estimates separately for high- and low-skilledworkers, which are not significantly different either.
Multi-location firms
There has been a rise in interest in understanding multi-location firms’ location choices (e.g. Oberfield
et al. (2020); Jiang (2023); Kleinman (2022)), which is beyond the scope of this paper. One way tointerpret multi-location firms in this model is that they are firms of multiple managers who differ in theirindividual abilities and have comparative advantages in different locations. Each manager chooses her
own location to operate based on her characteristics. One advantage of this approach is that I can recovereach establishment’s productivity non-parametrically with no restrictions on the relationship of different
establishments’ productivity within the same firm, which allows me to decompose spatial wage inequality
more flexibly. With the estimated model, I decompose the between-establishment productivity varianceinto a between-firm variance component and a within-firm variance component. The between-firm part
accounts for 89.7% of the total variance, with the rest explained by the within-firm part. This decomposition
result implies that the productivities of different production units within a firm differ but share common
firm-level productivity components.

6

Quantitative Analysis

I implement the following quantitative exercises using the estimated model in this section. First, I
perform a structural decomposition of the urban earnings premium and quantify the role of relevant model
parameters in generating equilibrium sorting. Second, I implement the optimal spatial policy presented

35

Table 4: Structural decomposition of the urban earnings premium
Earnings components:

Mean log earnings
City

WorkerFirm

Interaction

(1)

(2)

(3)

(4)

(5)

Log Population

0.021∗∗(0.008)0.001(0.006)0.014∗(0.005)0.006(0.005)−0.000(0.001)% Explained

100.0%

6.6%

66.8%

26.8%

-0.2%

Num. obs.
R2

66
0.100

66
0.071

66
0.023

66
0.010

66
0.000

Note: This table displays the decomposition results of city-size regressions of city mean city log earnings, based on equation(6.1). The productivity parameters are estimated using the iterative estimation procedure described in Section 5.3. All
regressions are weighted by population. ∗ p<0.1; ∗∗ p<0.05; ∗∗∗ p<0.01.

in Section 4. Third, I evaluate place-based subsidies that are often considered by policymakers. Lastly, I
analyze how the rise of remote work, which relaxes the co-location constraint on firm-worker matches,can potentially affect the location choices of workers and firms and the spatial wage structure. I conduct
more counterfactual analyses in Appendix H, which include loosening housing regulations in high-earning
Canadian cities and implementing universal basic income (UBI).48

6.1

Decomposition of the urban earnings premiumWith the estimation results of the productivity parameters, I can now structurally decompose city meanlog earnings into city, firm, worker, and interaction components as follows:𝜇𝛼/(𝛼−1)log E𝑐 (𝑊𝑖𝑗𝑡 ) = log 𝜒 + log 𝐴 𝑐 · 𝐿 𝑐𝑡 · 𝑟 𝑐𝑡|

{zcity characteristics+ 𝜃¯ · E𝑐 log 𝑎 𝑖 − log 𝑎¯ + E𝑐 log 𝑧 𝑗 + 𝜃 𝑗 log 𝑎¯



} |

{z

}

|

{z

worker sorting}

firm sorting

+ E𝑐

|



𝜃 𝑗(𝑖,𝑡) − 𝜃¯ · log 𝑎 𝑖 − log 𝑎¯





{z

}

.

interaction effect(6.1)
The presence of skill-augmenting productivity gives rise to an interaction component in the decomposition equation, which quantifies the contribution of assortative matching through the skill-augmenting
productivity to the city mean log earnings. Correspondingly, the worker sorting component is expressed
as mean city worker skill (relative to the national average) multiplied by the average skill-augmenting
productivity, and the firm part includes firm skill-augmenting productivity multiplied by the national
average worker skill.
In order to quantify the contribution of each component to the urban earnings premium, I regress thecity mean log earnings and each component of the RHS on log city population, with the results shown in

48In the counterfactual of loosening housing regulations, I show that the increase of total output is much larger if I ignore twosided heterogeneity, in which case high-earnings cities are estimated to have high exogenous productivities. In the counterfactualof UBI, I show that workers will move to cheaper yet less productive cities, especially for low-skilled workers.

36

Table 5: Shapley decomposition of the urban earnings premium and spatial sorting measures
Urban Premium

Spatial Sorting

Co-location

𝛽𝑤

Worker𝛽𝑎

Firm𝛽𝑧

𝑐𝑜𝑣( 𝑎¯ 𝑐 , 𝑧¯ 𝑐 )City prod. characteristics:
City prod. 𝐴 𝑐
Agglomeration 𝜇
Housing share in prod. 𝛼

17.0%
13.2%
25.9%
-22.1%-17.8%-19.7%-2.5%
4.4%-26.8%-30.8%
-4.1%
8.2%

-4.6%
-4.7%
-0.4%
0.5%

Amenities:
City amenity 𝑅 𝑐 (𝑎)Firm amenity 𝐺 𝑘 (𝑎)

42.4%
71.4%
-29.1%

113.5%
124.5%-11.0%-62.9%
121.0%-183.9%

60.4%
58.9%
1.5%

Skill-augmenting prod. 𝜃:

40.6%

4.2%

189.6%

44.2%

Note: This table displays the Shapley value decomposition results of four equilibrium outcomes. The shares in the row named
city prod. characteristics sum up the shares of the three parameters below, and the shares in the row named amenities sum up
the shares of the parameters below. See Section 6.1.1 for a detailed description of the method.

Table 4.49 This result is the first of its kind to provide a full decomposition of the urban earnings premium.
The table shows that worker and firm sorting explain 66.8% and 26.8% of the urban earnings premium,respectively.50 The exogenous productive advantage and agglomeration benefits of larger cities are partly
capitalized into higher housing rents; as a result, city characteristics altogether explain about 6.6%. Theinteraction component contributes none to the urban premium, which seems to suggest that worker-firmcomplementarity plays no role in spatial inequality.51 However, I will show soon that such complementarity
is crucial for the co-location phenomenon and the resulting spatial wage structure. I also present the resultsof a variance decomposition for within-city earnings inequality in Table I.13. It shows that greater earnings
dispersions within larger cities are primarily associated with greater worker skill variances and worker-firm
match covariances, consistent with the reduced-form results reported in Table I.5.
6.1.1

Understanding spatial sorting using a Shapley value approach

The statistical decomposition that I present in the previous section is performed using equilibrium
sorting outcomes. It does not, however, inform the reason why heterogeneous workers and firms choose
locations in the way shown in the data. To shed light on this, I now study how much different model
parameters quantitatively contribute to spatial sorting and the urban earnings premium.
49The city-size regressions of three of the four components are statistically insignificant. This is partly caused by noisy estimatesof the city productivity parameters and the small number of cities in the sample.
50In principle, both structural and reduced-form estimation of the earnings equation should have the same worker skill
estimates, which are identified using worker movers in both cases. Therefore, the contribution of worker sorting to the urban
earnings premium should be the same. However, the statistical discrepancies caused by a different clustering procedure in
structural estimation (see section 5.3) generate a slightly smaller worker sorting share in the structural decomposition.
51Using the same empirical specification, Bonhomme et al. (2019a) and Lamadon et al. (2022) both find that the interaction
effect explains little of the variance and mean of individual log earning. This result is surprising given the coexistence of strong
positive assortative matching and a positive correlation of 𝑧 and 𝜃. I illustrate the reason behind the coexistence in Figure I.14. As
shown in Panel (a), 𝑧 governs the level of the earnings profile, and 𝜃 governs the curvature of the earnings profile. With a highlabor supply elasticity of 6.1, the variation in 𝜃 can generate considerable positive assortative matching, However, by comparing
Panels (a) and (b), one can see that the magnitude of the interaction effect is much smaller than the level effect.

37

The sorting and urban premium outcomes in the model are generated by variations in the following
parameters. First are the parameters that enter through the city component in the earnings equation,
including city productivity 𝐴 𝑐 , the agglomeration elasticity 𝜇, and the share of housing input in production
function 𝛼. These parameters affect the spatial distributions of both earnings and population. Second are theskill-specific amenity parameters, including city amenities 𝑅 𝑐 (𝑎) and firm amenities 𝐺 𝑘 (𝑎). The amenities
affect utility for workers and labor supply for firms in each city. Third are the firm skill-augmenting
parameters 𝜃𝑘 , which affect the incentive for heterogeneous workers and firms to match with each otherand to co-locate in the same cities. Removing the variations in all these parameters would completely erase
city-size earnings and sorting gradients, though there still exists a variation in city sizes caused by thedifference in exogenous land 𝐻 𝑐 . I do not choose to remove the variation in exogenous city land endowment
in order to preserve a meaningful city-size distribution. Also, given my interest in quantifying how different
parameters contribute to spatial outcomes through their impacts on the sorting of heterogeneous workers
and firms, I do not include worker skill 𝑎 and firm heterogeneity 𝑧 in the set of parameters.
The aforementioned parameters all contribute to the equilibrium outcomes interdependently. Eliminating the variation in one set of parameters 𝜔 also eliminates the covariance of this parameter with otherparameters. Therefore, the corresponding change in the equilibrium outcome that arises from eliminating 𝜔
cannot be attributed to 𝜔 alone. To quantify the contribution of each parameter to the equilibrium outcomes,
I apply the Shapley value approach. Specifically, I simulate counterfactual economies by eliminating all
combinations of the sources of variation listed above and then compute the Shapley value for each source ofvariation in terms of its effect on the inequality outcomes. Intuitively, this provides a measure of an averagechange in the equilibrium outcome when a source of variation is eliminated, under all combinations of
the remaining sources of variation. I consider four equilibrium outcomes, including the urban earnings
premium 𝛽 𝑤 , the worker and firm sorting gradients 𝛽 𝑎 and 𝛽 𝑧 , and the population-weighted covariance ofcity mean worker skill and mean firm productivity 𝑐𝑜𝑣( 𝑎¯ 𝑐 , 𝑧¯ 𝑐 ).52 More details on implementing the Shapley
value approach can be found in Appendix G.
I report the results in Table 5. It shows that 17.0% of the urban earnings premium 𝛽 𝑤 is explainedby city characteristics, which is close to the statistical decomposition result in Table 2. City exogenous
productivity 𝐴 𝑐 and the agglomeration elasticity 𝜇 each contribute positively by 13.2% and 25.9%, whereas
the housing share parameter 𝛼 contributes negatively by -22.1%. The negative contribution of 𝛼 meansthat 𝛽 𝑤 will increase by 22.1% if 𝛼 = 0. This is because firms in larger yet more expensive cities tend torent less housing to operate, which decreases the marginal product of labor and thus earnings. The two
sets of amenity parameters collectively explain 42.3% of the urban premium, where city amenity 𝑅 𝑐 (𝑎)explains 71.4% and firm amenity 𝐺 𝑘 (𝑎) explains -29.1%. As discussed above, larger cities offer relatively
greater amenities for high-skilled workers, but more productive firms have relatively worse amenities forhigh-skilled workers. These heterogeneous amenities affect sorting and thus the urban premium. Lastly,
heterogeneity in skill-augmenting productivity 𝜃 contributes another 40.6% of the urban earnings premium,by affecting the co-location incentive of high-skilled workers and high-productivity firms. Related to thestructural decomposition result above, although the production complementarity does not contribute to
the urban earnings premium via the interaction part, it matters crucially for how heterogeneous workers
and firms sort across cities.
52More precisely, 𝛽 𝑤 , 𝛽 𝑎 and 𝛽 𝑧 are the regression coefficients of city mean log earnings, mean worker skill, and mean firm
productivity on log city population.

38

For the spatial sorting outcomes, the worker skill gradient 𝛽 𝑎 is almost entirely explained by skill-biased
amenities in larger cities. This is consistent with prior empirical findings that real wages do not increasecity sizes more for high-skilled workers (e.g. Diamond (2016) and Card et al. (2023)), so worker sorting
heavily depends on compensating differentials. The variation in 𝜃 explains little. In contrast, the variationin 𝜃 contributes significantly to the firm sorting gradient 𝛽 𝑧 , which is offset by the negative contribution offirm amenities 𝐺 𝑘 (𝑎). The city characteristics parameters do not affect spatial sorting per se, but they affectthe sorting gradients through their impact on the city population distribution. It can be concluded that theextent to which firms’ spatial sorting is affected by workers is much greater than the extent to which workers’
spatial sorting is affected by firms. Lastly, the decomposition result of the co-location outcome 𝑐𝑜𝑣( 𝑎¯ 𝑐 , 𝑧¯ 𝑐 ),of which 60.4% is explained by amenities and 44.6% is explained by production complementarity, again
confirms the intuition discussed above.

6.2

Optimal spatial policy

In this Section, I present the counterfactual result of implementing the optimal spatial policy. Recall
𝑤from Proposition 3 that the optimal spatial policy comprises a set of tax instruments, {𝑡 𝑘𝑐(𝑎)}∀𝑘,𝑐,𝑎 for𝑓workers and {𝑡 𝑐 (𝑘)}∀𝑘,𝑐 for firms. The aim is to maximize social welfare by 1) taxing or subsidizing agentsfor them to internalize the sorting externalities, 2) redistributing within types to reduce gaps in the marginalutility of consumption, and 3) redistributing between types depending on welfare weights. The sorting
externalities include the labor market stealing and love-of-variety spillovers for firms and the agglomeration
spillovers for workers, though the latter is of limited quantitative importance given a tiny estimate of theagglomeration elasticity 𝜇. In what follows, I present the results of a utilitarian government that sets
𝜑 𝑤 (𝑎) = 1, ∀𝑎 and 𝜑 𝑓 (𝑘) = 1, ∀𝑘. I discuss the results using alternative welfare weights later. Moreover,this should be considered as a first-best long-run optimal policy as I assume that the government can fully
observe worker skills and firm production technologies, and I abstract from short-run moving costs ofworkers and firms. I assume that the social welfare function is sufficiently concave so that there is a uniqueequilibrium when implementing the policy. See Fajgelbaum and Gaubert (2020) for a formal treatment ofequilibrium uniqueness of optimal spatial policies.
Sorting efficiency and spatial reallocation. In Figure 3, I plot the changes in the number of firms
and workers against city population of the efficient equilibrium relative to the laissez-faire equilibrium.
To illustrate changes in the sorting pattern, I separately plot the changes for high- and low-productivity
firms in Panel (a), and the changes for high- and low-skilled workers in Panel (c). Panels (b) and (d) show
the changes in total number of firms and workers. I define workers with skill in the top three deciles as
high-skilled workers and the remaining ones as low-skilled workers. Analogously, I define firms in the top
three firm clusters, ranked by 𝑧, as high-productivity firms and the remaining ones as low-productivity
firms.
As shown in Panel (a) of Figure 3, the most salient outcome of the optimal policy is that it allocatesmore high-productivity firms into larger and more skilled cities, while moving low-productivity firms
away from these places. With the optimal profit taxes, firms internalize their negative labor market
stealing and positive love-of-variety externalities. For low-productivity firms, the negative labor market
stealing externality is greater in large cities as they compete for high-skilled workers with high-productivity

39

Figure 3: Changes in the spatial allocation of workers and firms: optimal policy versus laissez-faireequilibrium(b) Total number of firms(a) Number of high-prod. and low-prod. firms
80High−prod. firms (Blue): Slope = 5.57 (3.21)
Low−prod. firms (Grey): Slope = −8.63 (3.82)

Slope = −4.93 (2.12)

Change in the Number of Firms (%)

Change in the Number of Firms (%)

150

100

50

0

−50

60

40

20

0

−20

−40

30k

100 k

300 k

1m

30k

City Population

100 k

300 k

1m

City Population(c) High-skilled and low-skilled population(d) Total population
50

Change in City Population (%)

Change in the Number of Workers (%)

Slope = −0.28 (1.31)
High−skilled workers (Blue): Slope = 2.37 (1.47)
Low−skilled workers (Grey): Slope = −2.36 (3.08)

100

50

0

25

0

−25
−50
30k

100 k

300 k

30k

1m

100 k

300 k

1m

City Population

City Population

Note: These figures display changes in the spatial allocation of firms and workers caused by the optimal policy against city
population in the laissez-faire equilibrium. I define firms in the top three firm clusters as high-productive firms and theremaining ones as low-productive firms, and workers with skill in the top three deciles as high-skilled workers and theremaining ones as low-skilled workers. Population-weighted OLS regression coefficients and standard errors are reported.

firms, and the positive love-of-variety is smaller in large cities as they employ fewer workers.53 For thehigh-productivity firms, they also incur negative labor market stealing externality in large cities. However,such social costs are smaller compared to their social benefits as they complement high-skilled workers.
The high-productivity firms also employ more workers and generate greater love-of-variety benefits inlarger cities. Moreover, the increase of high-productivity firms in larger cities can attract more high-skilledworkers from other places, which is efficient from the planner’s perspective. In sum, the total number offirms in larger cities declines as a result of the optimal policy, yet average firm productivity increases. For
53It can be seen from equation (4.3) that the love-of-variety externality is proportional to a firm’s employment size when all thewelfare weights are equal to one.

40

Figure 4: Changes in city mean worker and firm FEs and match shares of between workers and firms:
optimal policy versus laissez-faire equilibrium(a) Changes in 𝑎¯ 𝑐 and 𝑧¯ 𝑐(b) Changes in worker-firm match shares

Change in City Mean Worker Skill

1.2

0.8

0.4

0.0

−0.4

0.0

0.4

Change in City Mean Firm Prod.

Note: Panel (a) displays the relationship between city-level changes in mean worker skill and mean firm productivity after
implementing the optimal policy. Panel (b) displayed changes in the share of workers of each skill decile matched with eachfirm cluster.

smaller cities, the optimal policy instead allocates more but low-productivity firms there. This result is
consistent with Bilal (2023) in that it is optimal to reallocate low-productivity firms to smaller cities, and isconsistent with Gaubert (2018) in that the optimal policy strengthens firm spatial sorting.
Panel (c) of Figure 3 shows no significant spatial reallocation of workers for either skill towards larger
cities. As a result, population and high-skilled worker share changes do not strongly correlate withoriginal city sizes. This null correlation is expected as the optimal policy makes workers internalize their
agglomeration spillovers, but this spillover elasticity 𝜇 is estimated to be very small. As I will show soon,
the government implements spatial transfers from larger cities to smaller ones, which further weakens
worker sorting into large cities. However, there is still significant reallocation between cities of different
sizes: mid-size cities tend to grow significantly, whereas the largest and the smallest ones shrink on average.
Moreover, there is also a large variation in changes in high-skilled worker shares across cities.
In Figure 4, I investigate changes in assortative co-location and matching caused by the optimal policy.
Panel (a) of Figure 4 relates changes in the city mean worker skill, 𝑎¯ 𝑐 , to changes in the city mean firm
productivity, 𝑧¯ 𝑐 . It is evident that the optimal policy greatly enhances the co-location of high-productivity
firms and high-skilled workers. Together with Figure I.16, I show that the policy increases both mean
worker skill and firm productivity for high-productivity cities and decreases both for low-productivity
places. The population-weighted covariance of 𝑎¯ 𝑐 and 𝑧¯ 𝑐 increases by 64.9% and the rank correlation ofΔ 𝑎¯ 𝑐 and Δ¯𝑧 𝑐 is 0.88. Panel (b) of Figure 4 shows the changes in match shares of heterogeneous firms andworkers of the economy, where workers are binned into ten skill decile groups. This figure shows thechange of the two. By incentivizing the co-location of high-productivity firms and high-skilled workers, theoverall assortativeness of worker-firm matching increases considerably. In particular, the share of top decile
workers matched to the most productive firms increases by 50 percentage points. Meanwhile, low-skilled41Figure 5: Mean city log earnings: optimal policy versus laissez-faire equilibrium

CE (Grey): Slope = 0.018 (0.007)

City Mean Log Earnings

0.2

SP (Blue): Slope = −0.001 (0.01)

0.0

−0.2

−0.4
30k

100 k

300 k

1m

City Population
Note: This figure displays two scatterplots of mean city log earnings versus city population in the efficient equilibrium and in
the laissez-faire equilibrium. Under utilitarian welfare weights, the government implements transfers from firms to workers,
which I take out proportionally from worker earnings in constructing the figure. The urban earnings premia estimates andtheir standard errors are reported.

workers are more likely to be matched to low-productivity firms.
To sum up, Figures 3 and 4 reveal that the optimal policy significantly increases assortative co-locationand matching of workers and firms. Such spatial allocation decreases the inefficient labor market stealing
effect and exploits production complementarity to a much greater extent relative to the laissez-faireeconomy. As a result, the total output of the economy increases by 9.6%. The output gain of this first-best
policy is of a similar magnitude to the gain from the counterfactual policy in Hsieh and Moretti (2019).
They show that U.S. GDP would increase by 8.9% if the housing supply regulation only in New York,San Jose, and San Francisco were at the level of the median U.S. city. Without further actions, however,intensified spatial sorting would exacerbate spatial inequality and have negative impacts on social welfare.
I show next that the optimal policy mitigates this issue via spatial transfers.
Spatial equality and transfers. I visualize spatial redistribution of the optimal policy in Figure I.15,
where I plot net transfers as a share of total income against city population for workers and firms. It showsthat the optimal policy redistributes resources from larger cities to smaller ones. In addition, the magnitudeof the transfers is much greater for workers than for firms. Some cities receive worker transfers that are
more than 100% of the total labor earnings and some give out transfers by more than 50%. Lastly, I compare
the urban earnings premium of the two allocations in Figure 5. The urban earnings premium is entirely
eliminated with the optimal spatial policy, despite a greater extent of spatial sorting. National-wide meanearnings undoubtedly increase, which comes from more efficient sorting.54
Social welfare. The optimal policy increases consumption-equivalent welfare by 47.4%. The large
54The utilitarian government also implements transfers from entrepreneurs to workers. I take out such transfers proportionallyfrom worker earnings in Figure 5 to focus on the impact of changes in sorting and transfers between workers.

42

welfare increase is largely driven by the equity motive as the utilitarian government weighs all agentsequally. In the laissez-faire equilibrium, the marginal utility of consumption for low-income is much higher
than for high-income agents. Even holding total output fixed, transfers toward low-income agents generateconsiderable welfare gains. Such massive reallocation may not be realistic. To isolate the efficiency gains, I
follow Berger et al. (2022b) to redesign lump-sum transfers such that all workers and entrepreneurs enjoy
equal welfare gains while keeping sorting and matching allocations unchanged. This exercise gives a
consumption-equivalent welfare increase of 6.5%, which is of a similar magnitude to the 4.0% welfare gainfrom the optimal spatial policy in Fajgelbaum and Gaubert (2020).55
As we have seen, the optimal policy redistributes towards workers in lower-income places. Davis andGregory (2021) suggest removing the within-type redistribution motive of optimal spatial policies in spatial
equilibrium models, as the degree of such redistribution relies heavily on the parametric assumption of thepreference shock distribution. I implement a version of the optimal policy without this motive. Specifically,
I design type-city-specific taxes so that workers and firms are compensated according to their social values
in Proposition 2. Implementing this policy results in a welfare increase of 4.9%. The qualitative patterns ofspatial reallocation of firms and workers are similar to the results discussed before, as shown in Figure I.17.
6.2.1

Discussion

The role of production complementarity. To highlight the role of production complementarity, I¯ ∀𝑗.
implement the corresponding optimal spatial policy in a counterfactual economy where I set 𝜃 𝑗 = 𝜃,This removes the positive correlation between firm productivity 𝑧 and skill-augmenting productivity
𝜃, thus shutting down the firm-worker production complementarity. In this counterfactual economy,
the optimal policy generates less co-location of high-productivity firms and high-skilled workers. As
a result, the total output increases by only 5.1%, about half of the increase in the benchmark economy.
The consumption-equivalent total welfare gain also drops from 47.4% to 45.7%, with the efficiency gains
reduced from 6.5% to 4.8%.
The role of two-sided heterogeneity. It is important to account for both worker and firm heterogeneity
for the optimal policy design. To show this, I solve for two optimal equilibria when the government
overlooks either worker or firm heterogeneity. There are several important differences. First, the total welfare
gains coming from the optimal policy considering only one-sided heterogeneity are much smaller. The
welfare gains are 17.4% in the case with only worker heterogeneity and 6.7% with only firm heterogeneity.
Total output increases by 0.5% in the case with only worker heterogeneity and decreases by 3.1% with only
firm heterogeneity.
Second, the optimal spatial allocations of workers and firms vary dramatically, as shown in Figure
I.18. When the government does not consider firm heterogeneity, it would reallocate more firms intolarge cities. This is optimal because it would help attract more workers to these productive locations, as
implied by equation (4.5). In contrast, the optimal policy considering two-sided heterogeneity decreases
the total number of firms in large cities but increases the number of high-productivity firms there. When
55The 6.5% welfare gain includes gains from correcting the three types of sorting externalities and from within-type redistribution.
I show next that shutting down within-type redistribution will lead to a welfare increase of 4.9%, implying a 1.6% gain comesfrom the redistribution channel. I also show that counterfactually changing the number of firms in each city in the laissez-faireequilibrium generates a welfare gain of 0.3%, which arises from the love-of-variety effect. These results suggest that correcting thelabor market stealing externality plays the largest role in the welfare gain. However, attributing the total gains to each source ischallenging since they are intertwined and cannot be distinctly separated.

43

the government does not consider worker heterogeneity, the optimal policy still increases the number ofhigh-productivity firms in larger cities. But the benefit from doing so is much smaller in the absence of thegains from assortative worker-firm matching. As a result, workers relocate from larger to smaller cities andtotal output decreases.
Alternative welfare weights. The extent to which the government redistributes among different agents
depends crucially on the welfare weights. As a robustness check, I implement the optimal spatial policy
using two alternative sets of welfare weights. First, I calibrate welfare weights so that all agents enjoy equal
welfare gains under the optimal policy, which I term as the equal-gain weights. This involves iteratively
solving the efficient allocation given a set of weights and updating the weights towards equalizing welfare
gains by different agents.56 Second, I also use Negishi weights where the weights are set to the average
income of each agent type in the competitive equilibrium. The welfare gains are 5.7% and 5.2% respectively
for the equal-gain weights and the Negishi weights. This suggests that the efficiency gains from the optimal
spatial policy are robust to alternative welfare weight specifications.

6.3

Place-based subsidies

I use the model to evaluate two types of place-based policies that are often considered by policymakers:
the first is a local wage subsidy to high-productivity firms; the second is a wage subsidy to low-wage places
to decrease spatial inequality. In both cases, I assume the subsidies are financed by a flat proportional labor
income tax on all workers in the economy.
6.3.1

High-productivity firm subsidies in Toronto

I simulate an economy where firms in the most productive cluster receive a 5% wage subsidy if they
locate in Toronto. This counterfactual policy mimics the bid for Amazon HQ2 made by the city of Toronto
government. The amount of the subsidy constitutes 0.3% of the total GDP. Moreover, I conduct this policy
under different model scenarios to highlight the importance of considering heterogeneity and mobility ofboth workers and firms for policy evaluation. The comparison of these counterfactual economies and thebenchmark economy is shown in Table 6, where Column (1) is the full model, Column (2) is the model withno worker heterogeneity, Columns (3)-(5) restrict the mobility of either firms or workers or both.
Starting from the full model in Column (1), the subsidy generates significant distributional effects. On
the one hand, it increases the number of high-productivity firms in Toronto by 30.1% and high-skilledworkers in Toronto by 0.6%. On the other hand, the numbers of low-productivity firms and low-skilledworkers decrease by 7.7% and 0.5%, respectively. This is because low-skilled workers benefit little from
more high-productivity firms locally, and low-productivity firms shrink in employment as the subsidy
expands the employment of high-productivity ones. Meanwhile, they all have to face a 2.8% increase in the
housing rent in Toronto, which induces them to leave. As a result, the total population and number offirms in Toronto decrease by 0.8% and 2.3% respectively. By attracting more productive agents to the same
city, the total output of the economy increases by 0.8%. However, this output gain comes at a cost of anincrease in spatial inequality, measured by the variance of the city mean log earnings and the city Gini
index, and a decrease in total welfare, which is more severe for low-skilled workers.57
56Calibrating the equal-gain weights for all 120 worker groups and firm clusters is computationally infeasible. In practice, I bin
workers into 20 groups and calibrate the equal-gain weights for 20 worker groups and 10 firm clusters.
57Qian and Tan (2021) find that the entry of skill-intensive firms benefits local high-skilled workers but hurts low-skilled

44

Table 6: Counterfactual analysis: subsidizing productive firms in Toronto
Limited Re-sorting
Full modelNo worker het.

No-resorting

Only firm

Only worker

(1)

(2)

(3)

(4)

(5)

Var. city log earnings

14.5%

-0.1%

1.8%

6.2%

2.5%

City Gini index

19.7%

0.5%

2.6%

11.7%

3.2%

Total output

0.8%

0.2%

0.3%

0.7%

0.3%

Total welfare

-0.4%

-0.1%

-0.2%

-0.4%

-0.2%

High-skilled welfare

-0.2%

–

-0.1%

-0.2%

-0.1%

Low-skilled welfare

-0.5%

–

-0.2%

-0.5%

-0.2%

Pop. in Toronto

-2.3%

0.4%

–

–

0.0%

High-skilled pop.

0.6%

–

–

–

0.5%

Low-skilled pop.

-3.8%

–

–

–

-0.3%

# Firms in Toronto

-0.8%

2.0%

–

0.8%

–

# high-prod. firms

30.1%

7.9%

–

25.4%

–

# low-prod. firms

-7.7%

1.0%

–

-4.6%

–

Housing rent in Toronto

2.8%

0.8%

0.7%

2.7%

0.9%

% Changes inIn the model with no worker heterogeneity, both aggregate and distributional effects of the subsidy
are much smaller. The subsidy has an effect of attracting more firms and workers into Toronto, reflectedin the increases in the number of firms by 2.0% and in population by 0.4%. Compared to the full model,
the increase in high-productivity firms is much smaller, and some low-productivity firms also follow
workers to locate in Toronto. This expansion drives up the housing rent in Toronto by 0.8%. However,absent worker heterogeneity and thus firm-worker complementarity, the production benefit of attracting
high-productivity firms into large cities is much smaller. The total output increases by only 0.2%. Spatial
inequality and total welfare both change little.
Results of the limited re-sorting model scenarios highlight the interdependence of firm and worker
sorting. Without spatial re-sorting, shown in Column (3), the subsidy only serves to expand the employmentof subsidized high-productivity firms in Toronto at the cost of other local firms, while other cities areunaffected. Hence, the economy-wide impact in this scenario is limited. With only one-sided re-sorting,shown in Columns (4) and (5), the mobility response of firms and workers are both weaker than the fullmodel, and so are the changes in total output, welfare, and spatial inequality. In conclusion, two-sided
sorting strengthens the co-location of high-productivity firms and high-skilled workers and magnifies theaggregate and distributional effects of the subsidy policy.
I perform several robustness checks of the counterfactual results by incorporating endogenous amenities,
free entry, and heterogeneous housing expenditure shares into the full model. The results are shown inColumns (1)-(3) of Table I.15. Endogenous amenities increase the extent to which high-skilled workers
sort to Toronto after the subsidy. Free entry increases the total number of firms, which is beneficial toworkers through the love-of-variety channel. Introducing non-homothetic preference for housing also
workers.

45

Table 7: Counterfactual analysis: subsidizing low-wage cities
Limited Heterogeneity

Limited Re-sorting% Changes in

Full
Model
(1)

No firmhet.
(2)

No worker
het.
(3)

Noresorting
(4)

Only
firm
(5)

Only
worker(6)

Var. city log earnings-28.0%-22.2%-16.3%-30.1%-30.1%-28.8%

City Gini index-11.6%-12.2%-9.6%-13.0%-13.0%-12.2%

Total output

-0.3%

-0.5%

-0.3%

0.0%

0.0%

-0.2%

Total welfare

-0.1%

-0.2%

-0.1%

0.2%

0.2%

0.1%

High-skilled welfare

-0.1%

-0.2%

–

0.2%

0.2%

0.0%

Low-skilled welfare

0.0%

-0.1%

–

0.3%

0.3%

0.1%

Pop. in subsidized cities

20.9%

20.0%

21.0%

–

–

14.0%

High-skilled pop.

21.0%

20.0%

–

–

–

14.1%

Low-skilled pop.

20.8%

20.0%

–

–

–

13.9%

# Firms in subsidized cities

24.3%

22.6%

24.7%

–

6.6%

–

# high-prod. firms

25.0%

–

24.5%

–

6.8%

–

# low-prod. firms

24.2%

–

24.8%

–

6.6%

–

increases skill sorting into Toronto as high-skilled workers are less sensitive to housing price increases.
The increase in the total output is higher in this case accordingly. Nonetheless, these additional model
ingredients change the quantitative result by little.
6.3.2

Low-wage city subsidies

In Table 7, I show counterfactual results of a 10% wage subsidy in the 25 lowest-paying cities, accountingfor 12% of the total population. As before, I simulate the policy under different model scenarios, where
Column (1) shows the full model, Columns (2)-(3) show the limited heterogeneity models, and Columns(4)-(6) show limited-resorting models. I first focus on the full model, shown in Column (1). The subsidy
that amounts to 1% of total output goes a long way in reducing spatial inequality: the variance of city log
earnings decreases by 28.0% and the city Gini index decreases by 11.6%. The redistribution occurs at a costof a 0.3% decrease in the total output, as the subsidy increases economic activities in low-productivity cities.
The population in the subsidized cities increases by 20.9% and the number of firms increases by 24.3%.
Furthermore, there is no variation in the response of workers with different skills and of firms with different
productivity. The policy also hurts the welfare of high-skilled workers slightly to help the lower-skilledworkers in distressed cities. The model scenarios with limited heterogeneity have both qualitatively andquantitatively similar results to the full model. This suggests that when a policy does not specifically target
particular worker or firm subgroups, neglecting one-sided heterogeneity does not substantially affect policy
evaluation.
The trade-off between equity gains and efficiency costs of subsidizing distressed places has been
discussed by Gaubert et al. (2021c). The takeaway from the two-sided sorting model is that the efficiency
costs of such subsidies may be higher with interdependent location choices of workers and firms. This can

46

be seen by comparing Columns (4)-(6) with Column (1). All the limited-resorting model scenarios generatesmaller output decreases and positive welfare changes in contrast to the full model. This is because without
fully accounting for the location choice interaction, the policy that decreases spatial inequality would seemto induce less movement to low-wage cities, which results in smaller efficiency costs to total output.
I perform the robustness checks and present the results in Columns (4)-(6) in Table I.15. As before, thequantitative results with the model extensions are similar. The two marked differences are the increase in
the total number of firms with free entry and a smaller increase in the low-skilled population in low-wage
cities with heterogeneous housing expenditure shares.

6.4

The rise of remote work

Lastly, I apply the model to quantitatively investigate the spatial impact of the rise of remote work.
Althoff et al. (2022) show that the transition into remote work in the U.S. since the COVID-19 pandemic
has shifted the workforce from bigger cities to smaller ones, which has significant distributional welfare
consequences across workers. Deng et al. (2020) estimate that 39% of Canadian workers hold jobs that canbe done at home, using the methodology developed by Dingel and Neiman (2020). The ability to work fromhome is biased towards high-skilled workers: the potential shares are 60% and 29% for college-educatedand non-college-educated workers, respectively. Essentially, remote work de-couples the workplace andresidence place of workers. Workers can choose to live in one city while working for a firm in another city.
In the longer run, firms may also respond by changing locations, as labor supply is no longer constrained
to the city they live in. Therefore, this rising work arrangement has the potential to weaken the co-location
motive and to spatially disperse economic activities.
I evaluate such impacts through the lens of the two-sided sorting model. I simulate an economy where
25% of workers who can potentially work from home become remote workers, that is, 15% for high-skilledworkers and 7% for low-skilled workers. These workers can choose to work for firms either in the citywhere they reside or in other places. I assume that workers contribute to the agglomeration spillovers in
the cities where they live rather than the cities where their firms are located. The remote workers only take
into consideration city amenities and living costs when choosing where to reside. Accordingly, firms canhire both onsite workers from the local labor market and remote workers from elsewhere. See more details
in Appendix F.3. I analyze this phenomenon with two model scenarios. The first is a short-run model
where the firms’ locations are fixed; the second is a long-run where firms can also adjust their locations in
response to changes in labor supply conditions.
I show the counterfactual results in Table 8. The most striking result is that workers move from large
cities to smaller ones with the possibility of remote work. In the short run, the population in the largest fivecities decreases by 2.2%, with a larger 3.8% decrease in the high-skilled population. Remote workers movetowards small and cheaper cities. On the one hand, this lowers population concentration in large cities. On
the other hand, the move-in of higher-skilled workers increases mean earnings in smaller cities. As a result,the variance of city mean log earnings drops significantly by 19.2%. Another benefit is an 8.1% increase in
the total output. This is because remote work reallocates workers from low-productivity firms towards
high-productivity ones. The population decreases in larger cities also lower housing rents, which allow
firms in these places to rent more commercial space and expand production. In the long run, firms also
respond by moving out from larger cities to smaller ones, which causes a greater population decline of47

Table 8: Counterfactual analysis: remote work
Short-runLong-run(1)(2)

Var city log earnings-19.2%-15.4%

Total output

8.1%

9.4%

Population in top 5 cities

-2.2%

-2.7%

High-skilled pop.

-3.8%

-4.3%

Low-skilled pop.

-1.4%

-1.9%

# firms in top 5 cities

0.0%

-8.0%

# high-prod. firms

0.0%-15.9%# low-prod. firms

0.0%

-6.2%

2.7% in larger cities. However, spatial inequality decreases less in the long run by 15.4%. Co-movements offirms and on-site workers, in the long run, give rise to new high-paying mid-size cities, like Austin in the
U.S. Total output increases more by 9.4% in the long run, as firms optimize their location choices. The
comparison of short-run and long-run results again underscores the importance of the location choiceinterdependence between workers and firms.58 I also show in Table I.14 that with the rise of remote work,
cities with low housing rents and better amenities for high-skilled workers tend to see growth in both
population and average earnings.

7

Conclusion

The economic fortune of a city is tightly linked to the types of workers and firms that it can attract. In
many countries, high-skilled workers and high-productivity firms have been increasingly concentrated
in a handful of successful cities, exacerbating the economic inequality between regions. Uncovering theinterplay of workers’ and firms’ location decisions is thus important for understanding spatial inequalityand designing place-based policies to help places that have fallen behind.
In this paper, I build a spatial equilibrium model with a system of cities and mobile heterogeneous
workers and firms. I structurally estimate the model using Canadian matched employer-employee data.
I show that worker and firm sorting both play important roles in shaping spatial inequality and that
production complementarity is crucial to explain the co-location of high-skilled workers and productive
firms. I use the model to evaluate widely considered place-based policies. By comparing the full model tolimited re-sorting model scenarios, I emphasize that accounting for location choice interdependence ofworkers and firms is important for place-based policy evaluation.
The model informs novel sources of sorting externality, that is, firms do not internalize their labormarket stealing from other firms and love-of-variety preference for more local firms by workers. I design
an optimal spatial policy to achieve efficient sorting and equitable spatial redistribution. I show that the
optimal policy can substantially increase social welfare and the total output of the economy. This is done
via strengthened co-location of high-skilled workers and high-productivity firms, and spatial redistribution
58The short-run and long-run changes in population and the number of firms for five groups of cities ranked by population areplotted in Figure I.19.

48

towards low-paying cities.
Finally, there are notable limitations to the static equilibrium approach. On the worker side, better
learning opportunities are an important advantage of moving to big cities in the early life stage. The
quantitative assessment of counterfactual policies does not consider the effects on the dynamic skill
formation that is tied to individual location history. On the firm side, many entrepreneurs develop theirideas in big cities and then move to smaller ones for cheaper production inputs. Therefore, the model
understates the role of big cities as learning centers and innovation hubs in the spatial economy. The static
framework also assumes no moving costs, which is important for evaluating the transition dynamics ofspatial policies. Future work can extend the static framework to incorporate these important dimensions.

49

References
Abowd, J. M., F. Kramarz, and D. N. Margolis (1999): “High Wage Workers and High Wage Firms,”
Econometrica, 67, 251–333.
Acemoglu, D. (2001): “Good Jobs versus Bad Jobs,” Journal of Labor Economics, 19, 1–21.
Albouy, D., A. Chernoff, C. Lutz, and C. Warman (2019): “Local Labor Markets in Canada and the UnitedStates,” Journal of Labor Economics, 37, S533–S594.
Allen, T. and C. Arkolakis (2014): “Trade and the Topography of the Spatial Economy,” Quarterly Journal of
Economics, 129, 1085–1140.
Almagro, M. and T. Dominguez-Iino (2022): “Location Sorting and Endogenous Amenities: Evidence from
Amsterdam,” Available at SSRN 4279562.
Althoff, L., F. Eckert, S. Ganapati, and C. Walsh (2022): “The Geography of Remote Work,” Regional
Science and Urban Economics, 93, 103770.
Andrews, M. J., L. Gill, T. Schank, and R. Upward (2008): “High Wage Workers and Low Wage firms:
Negative Assortative Matching or Limited Mobility Bias?” Journal of the Royal Statistical Society: Series A(Statistics in Society), 171, 673–697.
Austin, B., E. Glaeser, and L. Summers (2018): “Jobs for the Heartland: Place-Based Policies in 21st-Century
America,” Brookings Papers on Economic Activity, 151–232.
Bamford, I. (2021): “Monopsony Power, Spatial Equilibrium, and Minimum Wages,” Working Paper.
Bartik, T. J. (2020): “Using Place-Based Jobs Policies to Help Distressed Communities,” Journal of Economic
Perspectives, 34, 99–127.
Bauluz, L., P. Bukowski, M. Fransham, A. Lee, M. López Forero, F. Novokmet, S. Breau, N. Lee, C. Malgouyres,
M. Schularick, et al. (2023): “Spatial Wage Inequality in North America and Western Europe: Changes
Between and Within Local Labour Markets 1975-2019,” Kiel working paper.
Baum-Snow, N. and L. Han (2023): “The Microgeography of Housing Supply,” Working paper.
Baum-Snow, N. and R. Pavan (2012): “Understanding the City Size Wage Gap,” Review of Economic Studies,79, 88–127.
——— (2013): “Inequality and City Size,” Review of Economics and Statistics, 95, 1535–1548.
Bayer, P. and C. Timmins (2005): “On the Equilibrium Properties of Locational Sorting Models,” Journal of
Urban Economics, 57, 462–477.
Behrens, K., G. Duranton, and F. Robert-Nicoud (2014): “Productive Cities: Sorting, Selection, andAgglomeration,” Journal of Political Economy, 122, 507–553.
Behrens, K. and F. Robert-Nicoud (2015): “Agglomeration Theory with Heterogeneous Agents,” Handbookof Regional and Urban Economics, 5, 171–245.
50

Berger, D., K. Herkenhoff, and S. Mongey (2022a): “Labor Market Power,” American Economic Review, 112,
1147–93.
Berger, D. W., K. F. Herkenhoff, and S. Mongey (2022b): “Minimum Wages, Efficiency and Welfare,”Working Paper 29662, National Bureau of Economic Research.
Bilal, A. (2023): “The Geography of Unemployment,” Quarterly Journal of Economics, 138, 1507–1576.
Bonhomme, S., K. Holzheu, T. Lamadon, E. Manresa, M. Mogstad, and B. Setzler (2023): “How Much
Should We Trust Estimates of Firm Effects and Worker Sorting?” Journal of Labor Economics, 41, 291–322.
Bonhomme, S., T. Lamadon, and E. Manresa (2019a): “A Distributional Framework for Matched Employer
Employee Data,” Econometrica, 87, 699–739.
——— (2019b): “Supplement to "A Distributional Framework for Matched Employer Employee Data",”
Econometrica, 87, 699–739.
Borusyak, K., P. Hull, and X. Jaravel (2022): “Quasi-Experimental Shift-Share Research Designs,” Review
of Economic Studies, 89, 181–213.
Card, D. (2001): “Immigrant Inflows, Native Outflows, and the Local Labor Market Impacts of Higher
Immigration,” Journal of Labor Economics, 19, 22–64.
Card, D., A. R. Cardoso, J. Heining, and P. Kline (2018): “Firms and Labor Market Inequality: Evidence
and Some Theory,” Journal of Labor Economics, 36, S13–S70.
Card, D., J. Heining, and P. Kline (2013): “Workplace Heterogeneity and the Rise of West German Wage
Inequality,” Quarterly Journal of Economics, 128, 967–1015.
Card, D., J. Rothstein, and M. Yi (2023): “Location, Location, Location,” Working Paper 31587, National
Bureau of Economic Research.
Combes, P.-P., G. Duranton, and L. Gobillon (2008): “Spatial Wage Disparities: Sorting Matters!” Journal of
Urban Economics, 63, 723–742.
Combes, P.-P., G. Duranton, L. Gobillon, D. Puga, and S. Roux (2012): “The Productivity Advantages ofLarge Cities: Distinguishing Agglomeration from Firm Selection,” Econometrica, 80, 2543–2594.
Costinot, A. (2009): “An Elementary Theory of Comparative Advantage,” Econometrica, 77, 1165–1192.
Costinot, A. and J. Vogel (2015): “Beyond Ricardo: Assignment Models in International Trade,” Annual
Reviews of Economics, 7, 31–62.
Dauth, W., S. Findeisen, E. Moretti, and J. Suedekum (2022): “Matching in Cities,” Journal of the European
Economic Association, 20, 1478–1521.
Davis, D. R. and J. I. Dingel (2019): “A Spatial Knowledge Economy,” American Economic Review, 109, 153–70.
——— (2020): “The Comparative Advantage of Cities,” Journal of International Economics, 123, 103291.

51

Davis, M. and J. M. Gregory (2021): “Place-Based Redistribution in Location Choice Models,” Working
Paper 29045, National Bureau of Economic Research.
Davis, M. A. and F. Ortalo-Magné (2011): “Household Expenditures, Wages, Rents,” Review of Economic
Dynamics, 14, 248–261.
De La Roca, J. and D. Puga (2017): “Learning by Working in Big Cities,” Review of Economic Studies, 84,
106–142.
Deng, Z., R. Nirussette, and D. Messacar (2020): “Running the Economy Remotely: Potential for Working
from Home during and after COVID-19,” StatCan COVID 19: data to insights for a better Canada
45-28-0001.
Diamond, P. A. (1982): “Aggregate Demand Management in Search Equilibrium,” Journal of Political Economy,
90, 881–894.
Diamond, R. (2016): “The Determinants and Welfare Implications of US Workers’ Diverging Location
Choices by Skill: 1980-2000,” American Economic Review, 106, 479–524.
Diamond, R. and C. Gaubert (2022): “Spatial Sorting and Inequality,” Annual Review of Economics, 14,795–819.
Dingel, J. I. and B. Neiman (2020): “How Many Jobs Can be Done at Home?” Journal of Public Economics,
189, 104235.
Dixit, A. K. and J. E. Stiglitz (1977): “Monopolistic Competition and Optimum Product Diversity,” The
American Economic Review, 67, 297–308.
Doraszelski, U. and J. Jaumandreu (2018): “Measuring the Bias of Technological Change,” Journal of Political
Economy, 126, 1027–1084.
Duranton, G. and D. Puga (2004): “Micro-Foundations of Urban Agglomeration Economies,” Handbook ofRegional and Urban Economics, 4, 2063–2117.
Duranton, G. and A. J. Venables (2018): “Place-Based Policies for Development,” Working Paper 24562,
National Bureau of Economic Research.
Eeckhout, J., R. Pinheiro, and K. Schmidheiny (2014): “Spatial Sorting,” Journal of Political Economy, 122,
554–620.
Ehrlich, M. V. and H. G. Overman (2020): “Place-Based Policies and Spatial Disparities across European
Cities,” Journal of Economic Perspectives, 34, 128–149.
Fajgelbaum, P. D. and C. Gaubert (2020): “Optimal Spatial Policies, Geography, and Sorting,” Quarterly
Journal of Economics, 135, 959–1036.
Fajgelbaum, P. D., E. Morales, J. C. Suárez Serrato, and O. Zidar (2019): “State Taxes and Spatial
Misallocation,” Review of Economic Studies, 86, 333–376.

52

Forslid, R. and T. Okubo (2014): “Spatial Sorting with Heterogeneous Firms and Heterogeneous Sectors,”
Regional Science and Urban Economics, 46, 42–56.
Gaubert, C. (2018): “Firm Sorting and Agglomeration,” American Economic Review, 108, 3117–53.
Gaubert, C., P. Kline, D. Vergara, and D. Yagan (2021a): “Trends in US Spatial Inequality: Concentrating
Affluence and a Democratization of Poverty,” AEA Papers and Proceedings, 111, 520–25.
Gaubert, C., P. M. Kline, and D. Yagan (2021b): “Place-Based Redistribution,” Working Paper 28337,
National Bureau of Economic Research.
——— (2021c): “Place-Based Redistribution,” Working Paper 28337, National Bureau of Economic Research.
Glaeser, E. L. (2008): Cities, Agglomeration, and Spatial Equilibrium, Oxford University Press.
Glaeser, E. L. and J. D. Gottlieb (2008): “The Economics of Place-Making Policies,” Brookings Papers on
Economic Activity, 2008, 155–239.
Gould, E. D. (2007): “Cities, Workers, and Wages: A Structural Analysis of the Urban Wage Premium,”
Review of Economic Studies, 74, 477–506.
Greenstone, M., R. Hornbeck, and E. Moretti (2010): “Identifying Agglomeration Spillovers: Evidence
from Winners and Losers of Large Plant Openings,” Journal of Political Economy, 118, 536–598.
Guvenen, F., F. Karahan, S. Ozkan, and J. Song (2021): “What Do Data on Millions of US Workers Reveal
about Lifecycle Earnings Dynamics?” Econometrica, 89, 2303–2339.
Helsley, R. W. and W. C. Strange (1990): “Matching and Agglomeration Economies in a System of Cities,”
Regional Science and Urban Economics, 20, 189–212.
Henkel, M., T. Seidel, and J. Suedekum (2021): “Fiscal Transfers in the Spatial Economy,” American Economic
Journal: Economic Policy, 13, 433–68.
Hirsch, B., E. J. Jahn, A. Manning, and M. Oberfichtner (2022): “The Urban Wage Premium in Imperfect
Labor Markets,” Journal of Human Resources, 57, S111–S136.
Hoelzlein, M. (2023): “Two-sided Sorting and Spatial Inequality in Cities,” Working paper.
Hornbeck, R. and E. Moretti (2018): “Who Benefits From Productivity Growth? Direct and Indirect
Effects of Local TFP Growth on Wages, Rents, and Inequality,” Working Paper 24661, National Bureau of
Economic Research.
Hsieh, C.-T. and E. Moretti (2019): “Housing Constraints and Spatial Misallocation,” American Economic
Journal: Macroeconomics, 11, 1–39.
Huneeus, F., K. Kroft, and K. Lim (2021): “Earnings Inequality in Production Networks,” Working Paper
28424, National Bureau of Economic Research.
Jiang, X. (2023): “Information and Communication Technology and Firm Geographic Rxpansion,” CESifo
Working Paper 10452.
53

Kleinman, B. (2022): “Wage Inequality and the Spatial Expansion of Firms,” Working paper.
Kline, P. and E. Moretti (2013): “Place Based Policies with Unemployment,” American Economic Review,
103, 238–43.
Kline, P., N. Petkova, H. Williams, and O. Zidar (2019): “Who Profits from Patents? Rent-Sharing at
Innovative Firms,” Quarterly Journal of Economics, 134, 1343–1404.
Kline, P., R. Saggio, and M. Sølvsten (2020): “Leave-Out Estimation of Variance Components,” Econometrica,
88, 1859–1898.
Lamadon, T., M. Mogstad, and B. Setzler (2022): “Imperfect Competition, Compensating Differentials,
and Rent Sharing in the US Labor Market,” American Economic Review, 112, 169–212.
Lindenlaub, I., R. Oh, and M. Peters (2022): “Firm Sorting and Spatial Inequality,” Working Paper 30637,
National Bureau of Economic Research.
Mankiw, N. G. and M. D. Whinston (1986): “Free Entry and Social Inefficiency,” The RAND Journal of
Economics, 17, 48–58.
Manning, A. (2021): “Monopsony in labor markets: A review,” ILR Review, 74, 3–26.
Marshall, A. (1890): Principles of Economics, London: MacMillan Press.
Moretti, E. (2012): The New Geography of Jobs, Houghton Mifflin Harcourt.
——— (2013): “Real Wage Inequality,” American Economic Journal: Applied Economics, 5, 65–103.
Moretti, E. and D. J. Wilson (2017): “The Effect of State Taxes on the Geographical Location of Top Earners:
Evidence from Star Scientists,” American Economic Review, 107, 1858–1903.
Neumark, D. and H. Simpson (2015): “Place-Based Policies,” Handbook of Regional and Urban Economics, 5,1197–1287.
Notowidigdo, M. J. (2020): “The Incidence of Local Labor Demand Shocks,” Journal of Labor Economics, 38,
687–725.
Oberfield, E., E. Rossi-Hansberg, P.-D. Sarte, and N. Trachter (2020): “Plants in Space,” Working Paper
27303, National Bureau of Economic Research.
Olley, G. S. and A. Pakes (1996): “The Dynamics of Productivity in the Telecommunications Equipment
Industry,” Econometrica, 64, 1263–1297.
Porcher, C., H. Rubinton, and C. Santamaría (2023): “JUE insight: The Role of Establishment Size in theCity-Size Earnings Premium,” Journal of Urban Economics, 136, 103556.
Qian, F. and R. Tan (2021): “he Effects of High-skilled Firm Entry on Incumbent Residents,” Working Paper
21-039, Stanford Institute for Economic Policy Research (SIEPR).
Roback, J. (1982): “Wages, Rents, and the Quality of Life,” Journal of Political Economy, 90, 1257–1278.

54

Rosen, S. (1974): “Hedonic Prices and Implicit Markets: Product Differentiation in Pure Competition,”
Journal of Political Economy, 82, 34–55.
Rossi-Hansberg, E., P.-D. Sarte, and F. Schwartzman (2019): “Cognitive Hubs and Spatial Redistribution,”
Working Paper 26267, National Bureau of Economic Research.
Saiz, A. (2010): “The Geographic Determinants of Housing Supply,” Quarterly Journal of Economics, 125,
1253–1296.
Setzler, B. and F. Tintelnot (2021): “The Effects of Foreign Multinationals on Workers and Firms in the
United States,” Quarterly Journal of Economics, 136, 1943–1991.
Slattery, C. and O. Zidar (2020): “Evaluating state and local business incentives,” Journal of Economic
Perspectives, 34, 90–118.
Song, J., D. J. Price, F. Guvenen, N. Bloom, and T. Von Wachter (2019): “Firming Up Inequality,” Quarterly
Journal of Economics, 134, 1–50.
Sorkin, I. (2018): “Ranking Firms Using Revealed Preference,” Quarterly Journal of Economics, 133, 1331–1393.
Suárez Serrato, J. C. and O. Zidar (2016): “Who Benefits from State Corporate Tax Cuts? A Local Labor
Markets Approach with Heterogeneous Firms,” American Economic Review, 106, 2582–2624.
Suárez Serrato, J. C. and O. M. Zidar (2023): “Who Benefits from State Corporate Tax Cuts? A Local Labor
Market Approach with Heterogeneous Firms: Further Results,” Working Paper 31206, National Bureau
of Economic Research.

55

Appendix A

Data Appendix

In this Section, I describe the data sources, variable construction, and sample selection rules for theempirical analysis of the paper.

A.1

Canadian Employer-Employee Dynamic Database (CEEDD)

The main data source for the analysis is the Canadian Employer-Employee Dynamic Database (CEEDD),
which is a set of linkable administrative tax files. These files include T1 Personal Master File (T1-PMF),
T1 Family File (T1-FF), the National Accounts Longitudinal Microdata File (NALMF), the Statement of
Remuneration Paid Files (T4), and the Longitudinal Immigration Database (IMDB). These datasets cover
the period from 2001-2017.
T1 files. Individual characteristics are obtained from T1-PMF and T1-FF. These two files are based on
information reported in the Income Tax and Benefit Return form (T1), which is required to submit for all
Canadians annually. Specifically, I observe each individual’s age, gender, marital status, and residence
location from T1-PMF, and the number of children from T1-FF. Each individual has a unique longitudinal
identifier based on the Social Insurance Number (SIN). There is an important caveat in using the location
information in CEEDD. In T1-PMF, the location information in the file of year t is based on the reported
postal code in year t+1. This is because individuals file their taxes with a one-year lag, which also applies
to firms. To address this, I use each individual’s location information in the T1-PMF file of year t-1 as her
location in year t. This implies that I do not have location information for year 2001, the first year of thecoverage. Hence, I only use data from 2002 to 2017.
NALMF. Firm information is obtained from NALMF, which is a longitudinal database of Canadianenterprises linking the Business Register (BR), the Statements of Remuneration Paid (T4), the Payroll
Account Deductions (PD7), and the Corporate Income Tax Returns (T2) for incorporated firms and the
Financial Declaration and Business Declaration form (T1FD-BD) for unincorporated firms. A firm is defined
as a tax and accounting entity that files income tax returns and/or payroll remittances to the Canada
Revenue Agency (CRA). The NALMF dataset covers firm location, industry (4-digit NAICS), firm size,
payroll, and other balance sheet information. I drop firms with missing industry information and exclude
from the baseline sample firms in industries including agriculture (NAICS 11), mining (NAICS 21), utilities(NAICS 22), education (NAICS 61), hospitals (NAICS 62), non-profit organizations (NAICS 813) and public
administrations (NAICS 92).
As discussed in the main text, the NALMF dataset only records the headquarters location for firmsthat operate in more than one locations and includes a multi-location flag. For the multi-location firms, I
partition them into firm-city units based on their employee’s residence location and refer to them as firms
throughout the empirical analysis. I also treat firms who have moved across cities as different firms before
and after the move, as such relocations are often associated with changes in the production process, labordemand, and wage policies as discussed in Duranton and Puga (2004).
T4 files. Annual earnings information and the employee-employer linkage are from the Statementsof Renumeration Paid (T4). The T4 files provide job-level earnings information with individual and firm
identifiers, where a job is defined as a worker-firm pairing. A worker can have more than one T4 records ina year if she works for more than one firms. For multiple job holders, I keep the job that offers the largest

56

earnings of the year and call it the main job. In addition, I drop workers with annual earnings from themain job lower than a threshold, which is the equivalence of working 40 hours per week for 13 weeks paidat half of the minimum hourly wage.
IMDB. The IMDB files record information on immigrants from 1980. For each immigrant, it records
gender, country of birth, the landing year in Canada, the landing age, and the destination location. I use
the IMDB files to construct the immigration-based labor supply instrument (Card, 2001).

A.2

Other Data Sources

Other data sources used in the analysis are introduced as follows.
CPI. I use the Consumer Price Index of all items from StatsCan (Table 18-10-0006-01) to convert all
monetary values in 2002 Canadian dollars.
Housing rent. I obtain the housing rent data from the Canada Mortgage and Housing Corporation(StatsCan Table 34-10-0133-01), which covers average monthly rents for CMAs and CAs with no fewer than
a population of 10,000 by each type of unit (including bachelor units and one-bedroom to three-bedroom
units). I use the average monthly rent of two-bedroom units as the measure of housing cost. Moretti(2013) uses the average monthly rent of two or three-bedroom units. I only use two-bedroom units as 1) I
don’t have data on the number of units rented by each type and 2) the rent data has better coverage of
two-bedroom units than three-bedroom ones.
Minimum wage. In Canada, the minimum wage for employees not in federal administrations is set
by each province and territory. I obtain a history of minimum wage data from each provincial-levelgovernment’s website. Then, I define and construct the annual national minimum wage by picking thelowest minimum wage of the provinces and territories for each year. I use this to calculate the minimum
earnings threshold for the baseline sample.
The share of undevelopable land. I follow Saiz (2010) to define undevelopable land as land with aslope over 15 degrees and land covered by water. To calculate land slope, I obtain elevation data from the
CanVec Elevation Features product, which is maintained by Natural Resources Canada (NRCan). I use thefinest 1:50K version of the product to calculate the land slope at the highest resolution. I obtain geographic
boundaries of cities and water bodies (lake and river polygons) from StatsCan’s Census 2016 boundary files.
In addition, I also consider land areas covered by Ontario’s Greenbelt Plan as undevelopable land. The
Greenbelt Act, which became law in Feb 2005, was designed to curb urban sprawl into environmentallysensitive areas in Ontario. It prevents the re-zoning of agricultural land, heritage sites, and sensitive
ecological features for use in urban development. The boundary file for the Greenbelt designation is
obtained from Ontario GeoHub. I show the topography maps for the largest four Canadian cities in Figure
I.1.
Share of college graduates by city. I calculate the share of individuals with a college or a higher degree
for each city (CMA/CA) using the 2016 Population Census.
Other city characteristics. I collect other city characteristics that may be correlated with city fundamentals (productivity and amenities). These include geographic longitude and latitude from Google Maps,
weather information such as from average January and July temperature and average wind speed andthe air quality index (AQI) from Environment Canada, the provincial education quality index from the57

Conference Board of Canada, and the share of land covered by road and the crime severity index, bothfrom StatsCan.

Appendix B
B.1

Model Appendix

Firm’s problem

Firm 𝑗 in city 𝑐 chooses wage offers W 𝑗𝑐 = 𝑊𝑗𝑐 (𝑎) ∀𝑎 and the housing input ℎ 𝑗𝑐 to maximize profits:



∫ 𝑎¯
max
W 𝑗𝑐 ,ℎ 𝑗𝑐

𝜇𝐴 𝑐 𝐿 𝑐 · 𝑧 𝑗 · 𝑎 𝜃𝑗 · 𝐷 𝑗𝑐 (𝑎)𝑑𝑎

 1−𝛼

𝛼

· ℎ 𝑗𝑐 − 𝑟 𝑐 ℎ 𝑗𝑐 −

∫ 𝑎¯

𝑎
¯

𝑊𝑗𝑐 (𝑎)𝐷 𝑗𝑐 (𝑎) 𝑑𝑎

(B.1)

𝑎
¯

subject to 𝛽𝑤

𝐷 𝑗𝑐 (𝑎) = 𝐿 𝑐 (𝑎) ·𝑊𝑗𝑐 (𝑎)𝐺 𝑗𝑐 (𝑎) 𝜌𝑤

𝛽𝑤= 𝑊𝑗𝑐 (𝑎) 𝜌𝑤 · 𝜅 𝑗𝑐 (𝑎)W𝑐 (𝑎)(B.2)

𝛽𝑤

where 𝜅 𝑗𝑐 (𝑎) ≡ 𝐿 𝑐 (𝑎) · 𝐺 𝑗𝑐 (𝑎) 𝜌𝑤 · W−1
𝑐 (𝑎) is defined as a firm-specific labor supply shifter of each skill 𝑎. I
assume that firms are infinitesimal so any firm’s wage-setting decision cannot affect the local wage index.
Taking the derivative with respect to {𝑊𝑗𝑐 (𝑎)}∀𝑎 and ℎ 𝑗𝑐 , we have the following set of FOCs:
𝛽𝑤
𝛽𝑤
𝛽𝑤
𝜇
−1
𝑊𝑗𝑐 (𝑎) : (1 − 𝛼)
𝜅 𝑗𝑐 (𝑎)𝑄 𝑗𝑐 −𝛼 𝑊𝑗𝑐 (𝑎) 𝜌𝑤 · 𝐴 𝑐 𝐿 𝑐 𝑧 𝑗 𝑎 𝜃𝑗 · ℎ 𝑗𝑐 𝛼 − 1 +𝜅 𝑗𝑐 (𝑎) · 𝑊𝑗𝑐 (𝑎)𝛽𝑤 /𝜌𝑤 = 0
𝜌𝑤
𝜌𝑤





𝛼−1
ℎ 𝑗𝑐 : 𝛼𝑄 1−𝛼− 𝑟𝑐 = 0
𝑗𝑐 ℎ 𝑗𝑐

∫ 𝑎¯

(B.3)
(B.4)

𝜇

where 𝑄 𝑗𝑐 ≡ 𝑎 𝐴 𝑐 𝐿 𝑐 · 𝑧 𝑗 · 𝑎 𝜃𝑗 · 𝐷 𝑗𝑐 (𝑎)𝑑𝑎 is defined as the total efficiency unit of labor. We could obtain the
optimal wage ¯offers and housing inputs from the FOCs as:𝜇𝛼

𝑊𝑗𝑐 (𝑎) = 𝜒 · 𝐴 𝑐 𝐿 𝑐 𝑟 𝑐𝛼−1 · 𝑧 𝑗 · 𝑎 𝜃𝑗

(B.5)

1

ℎ 𝑗𝑐 = 𝛼 1−𝑎 𝑟 𝑐𝑎−1 · 𝑄 𝑗𝑐
1

𝛽 /𝜌

(B.6)

𝛼

where 𝜒 ≡ 1+𝛽𝑤𝑤 /𝜌𝑤𝑤 · (1 − 𝛼)𝛼 1−𝛼 . Equation (B.6) still contains the endogenous term 𝑄 𝑗𝑐 . Plugging equation(B.5) into the definition of 𝑄 𝑗𝑐 yields:
𝑄 𝑗𝑐 =
=

∫ 𝑎¯



𝑎
¯

𝜇

𝐴𝑐 𝐿𝑐 · 𝑧 𝑗 𝑎 𝜃𝑗

 1+𝛽𝑤 /𝜌𝑤 𝛼𝜒𝑟 𝑐 𝛼−1 𝛽𝑤 /𝜌𝑤

𝜅 𝑗𝑐 (𝑎) 𝑑𝑎
(B.7)

𝜇
𝐴𝑐 𝐿𝑐

   1+𝛽𝑤 /𝜌𝑤· 𝑧𝑗· 𝜙 𝑗𝑐where

𝛽𝑤

𝜙 𝑗𝑐 =

∫ 
𝑎

𝑎

𝜃𝑗

 1+𝛽𝑤 /𝜌𝑤

𝐺 𝑗 (𝑎) 𝜌𝑤

𝐿 𝑐 (𝑎) ·Í58
𝑗 ′ ∈𝒥𝑐𝑧 𝑗′ 𝑎

𝜃 𝑗′· 𝐺 𝑗′ (𝑎) 𝜌𝛽𝑤 𝑑𝑎𝑤

(B.8)

is a firm-specific term summarizing local labor market competitiveness and worker-firm complementarity.
Firm 𝑗’s wage bill is the sum of wages to all workers it employs
𝐸 𝑗𝑐 =

∫ 𝑎¯
𝑎
¯

𝑎

𝜇



   1+𝛽𝑤 /𝜌𝑤

𝑊𝑗𝑐 (𝑎)𝐷 𝑗𝑐 (𝑎) 𝑑𝑎 = 𝜒 𝐴 𝑐 𝐿 𝑐 𝑟 𝑐𝑎−1 · 𝑧 𝑗· 𝜙 𝑗𝑐 .

(B.9)

Then, plugging equations (B.6) and (B.9) back to (B.1) yields firm 𝑗’s optimal profits in city 𝑐:
𝜋 𝑐 (𝑗) = 𝑄 𝑗𝑐 1−𝛼 ℎ 𝑗𝑐 𝛼 − 𝑟 𝑐 ℎ 𝑗𝑐 − 𝐸 𝑗𝑐
𝛼

𝛼

𝑎

1

= 𝛼 1−𝛼 𝑟 𝑐𝛼−1 · 𝑄 𝑗𝑐 − 𝑟 𝑐 𝛼 1−𝛼 𝑟 𝑐𝛼−1 · 𝑄 𝑗𝑐 − 𝜒𝑟 𝑐𝑎−1 𝑄 𝑗𝑐
1

𝑎
𝛼−1



= Ψ · 𝐴𝑐 𝐿𝑐 𝜇 𝑟𝑐



· 𝑧𝑗

 1+𝛽𝑤 /𝜌𝑤(B.10)· 𝜙 𝑗𝑐𝛼where Ψ ≡ 1+𝛽𝑤1 /𝜌𝑤 · (1 − 𝛼)𝛼 1−𝛼 . It is obvious from equations (B.9) and (B.10) that the firm’s optimal profits
𝜋 𝑐 (𝑗) is proportional to its total efficiency unit of labor 𝑄 𝑗𝑐 and also to its total wage bill 𝐸 𝑗𝑐 .

B.2

The housing market

A housing developer of a city combines land 𝐻 𝑐 , which is exogenously given for each city, with thefinal good 𝑌𝑐 to produce housing. The developer chooses final good inputs to maximize profits:
1

max 𝑟 𝑐 · 𝐻 𝑐 𝑌𝑐 1+𝛾𝑐 − 𝑌𝑐 .

(B.11)𝑌𝑐

The FOC of this profit-maximizing problem is:𝛾1− 𝑐𝑟 𝑐 · 𝐻 𝑐 𝑌𝑐 1+𝛾𝑐 − 1 = 0,
1 + 𝛾𝑐from which we can solve for 𝑌𝑐 =11+𝛾𝑐 𝑟 𝑐 𝐻 𝑐(B.12)

𝑐
 1+𝛾
𝛾
𝑐

. Then the housing supply curve can be derived as:
1𝛾

𝐻𝑐𝑆 (𝑟 𝑐 ) = 𝐻 𝑐 · 𝑟 𝑐 𝑐
0(B.13)(1+𝛾𝑐 )/𝛾𝑐0where 𝐻 𝑐 = (1 + 𝛾𝑐 )−1/𝛾𝑐 · 𝐻 𝑐. Housing is demanded by both workers and firms in the city. By theproperties of workers’ preference and firms’ production technology, workers spend a constant share 𝜂of their total income 𝜏𝑊 on housing, and firms expense a constant share 𝛼 of their production costs on
housing. Total housing demand for a city can thus be derived as a constant share of the total wage bill:
𝐻𝑐𝐷 (𝑟 𝑐 ) =𝜂𝑟𝑐∫ 𝑎¯ Õ𝑎¯𝑗∈𝒥𝑐

𝛼 1 + 𝛽 𝑤 /𝜌𝑤 1
𝜏𝑊𝑗𝑐 (𝑎)𝐷 𝑗𝑐 (𝑎) 𝑑𝑎 +1 − 𝛼 𝛽 𝑤 /𝜌𝑤 𝑟 𝑐∫ 𝑎¯ Õ𝑎¯𝑗∈𝒥𝑐

𝑊𝑗𝑐 (𝑎)𝐷 𝑗𝑐 (𝑎) 𝑑𝑎(B.14)

𝛼 1 + 𝛽 𝑤 /𝜌𝑤 𝐸 𝑐= 𝜏𝜂 +,
1 − 𝛼 𝛽 𝑤 /𝜌𝑤
𝑟𝑐





where I define 𝐸 𝑐 as the total wage bill of city 𝑐. The housing market clears for city 𝑐 when demand equals

59supply, namely
𝐻𝑐𝐷 (𝑟 𝑐 ) = 𝐻𝑐𝑆 (𝑟 𝑐 ).

(B.15)

I assume that the housing developer owns the land and the housing rent is priced competitively. The
housing developers’ profits are aggregated to a national portfolio and then rebated to workers. The amountof the rebate each worker obtains is proportional to her wages. Specifically, the rebate follows the expression
below
Õ
Õ
Õ 𝛾𝑐
(𝜏 − 1)𝑊𝑖 =𝑟 𝑐 𝐻𝑐 .
(B.16)(𝑟 𝑐 𝐻𝑐 − 𝑌𝑐 ) =1 + 𝛾𝑐𝑐𝑐𝑖

It is also useful to specify the final good market clearing condition here. The homogeneous final good is
supplied by firms and demanded by workers and entrepreneurs for consumption, and housing developers
for housing production. The market clearing condition is given byÕÕ∫𝑐Appendix C
C.1

𝑗

𝑎

(1 − 𝜂) · 𝐷 𝑗𝑐 (𝑎) 𝜏𝑊𝑗𝑐 (𝑎) 𝑑𝑎 +ÕÕ𝑐𝜋 𝑐 (𝑗) +

Õ

𝑌𝑐 =

𝑐

𝑗

ÕÕ
𝑐

𝛼
𝑄 1−𝛼
𝑗𝑐 ℎ 𝑗𝑐 .

(B.17)

𝑗

Efficiency

Social planner’s problem

Assume the planner aims to maximize the social welfare function of the economy, which is specified as

𝒲=

𝑁𝑤
Õ

𝑤

𝜑 (𝑎) · 𝐿 (𝑎) 𝑈 (𝑎) +

𝑎=1

𝑁𝑓
Õ

𝜑 𝑓 (𝑘) · 𝐽 (𝑘) Π (𝑘)

(C.1)

𝑘=1

where 𝜑 𝑤 (𝑎) and 𝜑 𝑓 (𝑘) are the welfare weights for skill 𝑎 workers and type 𝑘 entrepreneurs. As explainedin the main text, I assume there are discrete types of workers and firms in formulating the social planner’s
problem. Utility of each type of agent is given by!

Õ
1
𝑈(𝑎) =· log
𝑈 𝑐 (𝑎)𝛽𝑤 + 𝐶¯𝑤
𝛽𝑤
𝑐

(C.2)

!

Õ
1
log
𝑐 𝑐 (𝑘)𝛽 𝑓 + 𝐶¯ 𝑓Π (𝑘) =
𝛽𝑓
𝑐

(C.3)

where

"
𝑈 𝑐 (𝑎) = 𝑅 𝑐 (𝑎)Õ𝐽𝑐 (𝑘) 𝐺 𝑘 (𝑎) · 𝑐 𝑘𝑐 (𝑎)1−𝜂𝜂ℎ 𝑘𝑐 (𝑎)# 𝛽𝑤 /𝜌𝑤 𝜌𝑤 /𝛽𝑤
(C.4)

𝑘

and 𝐶¯𝑤 and 𝐶¯ 𝑓 are unrecoverable constants.
The planner chooses the following to maximize equation (C.1): 1) the amount of the final good andhousing allocated to skill 𝑎 workers working for a cluster 𝑘 firm and city 𝑐, 𝑐 𝑘𝑐 (𝑎) and ℎ 𝑘𝑐 (𝑎); 2) the amountof the final good allocated to type 𝑘 entrepreneurs in city 𝑐, 𝑐 𝑐 (𝑘); 3) the amount of the housing allocatedto cluster 𝑘 firms in city 𝑐 for production, ℎ 𝑐 (𝑘); 4) the total number of skill 𝑎 workers in cluster 𝑘 firms
60

located in city 𝑐, 𝐷 𝑘𝑐 (𝑎); 5) the number of cluster 𝑘 firms located in city 𝑐, 𝐽𝑐 (𝑘) and 6) the amount of final
good used to produce housing for each city 𝑐, 𝐼 𝑐 .
The planner is subject to the following constraints. First, there are the spatial mobility and local labormatching constraints of workers and firms. I assume that the planner recognizes that workers and firms
have idiosyncratic shocks but cannot directly observe these shocks. For workers, there are within-city andbetween-city allocation constraints

𝐷 𝑘𝑐 (𝑎) 𝐽𝑐 (𝑘) · 𝑅 𝑐 (𝑎) 𝐺 𝑘 (𝑎) · 𝑐 𝑘𝑐 (𝑎)=𝐿 𝑐 (𝑎)𝑈 𝑐 (𝑎)𝛽𝑤 /𝜌𝑤

1−𝜂𝜂ℎ 𝑘𝑐 (𝑎) 𝛽𝑤 /𝜌𝑤, ∀𝑐, 𝑘, 𝑎

(C.5)

𝑈 𝑐 (𝑎)𝛽𝑤
𝐿 𝑐 (𝑎)=Í, ∀𝑐, 𝑎.
𝛽𝑤
𝐿 (𝑎)𝑐 𝑈 𝑐 (𝑎)(C.6)

Combining (C.5) and (C.6), we can express 𝐷 𝑘𝑐 (𝑎) as a fraction of 𝐿 (𝑎)−1 𝛽 /𝜌
Õ𝐷 𝑘𝑐 (𝑎)1−𝜂
𝜂 𝑤 𝑤
𝛽 𝑤 −𝛽 𝑤 /𝜌𝑤
𝛽𝑤= 𝐽𝑐 (𝑘) · 𝑐 𝑘𝑐 (𝑎)ℎ 𝑘𝑐 (𝑎)· 𝑈 𝑐 (𝑎)·𝑈 𝑐 (𝑎), ∀𝑐, 𝑘, 𝑎.
𝐿 (𝑎)
𝑐

!

(C.7)

For firms, the spatial mobility constraints are:𝑐 𝑐 (𝑘)𝛽 𝑓
𝐽𝑐 (𝑘)=Í, ∀𝑐, 𝑘.
𝛽𝑓
𝐽 (𝑘)𝑐 𝑐 𝑐 (𝑘)(C.8)

Second, there are worker and firm allocation constraints:

ÕÕ𝑐

𝐷 𝑘𝑐 (𝑎) = 𝐿 (𝑎)(C.9)

𝐽𝑐 (𝑘) = 𝐽 (𝑘)(C.10)𝑘Õ
𝑐which are automatically satisfied given (C.7) and (C.8).
Third, the planner is subject to a set of resource constraints. These include the resource constraint of the
final good for the whole economy:

ÕÕÕ
𝑐

𝑘

𝐷 𝑘𝑐 (𝑎) 𝑐 𝑘𝑐 (𝑎)+

𝑎

ÕÕ
𝑐

𝑘

𝐽𝑐 (𝑘) 𝑐 𝑐 (𝑘)+

Õ

𝑌𝑐 ≤

𝑐

ÕÕ
𝑐

𝑘

𝐽𝑐 (𝑘)

Õ 𝐷 (𝑎)𝑘𝑐
𝑎𝐽𝑐 (𝑘)! 1−𝛼𝑓𝑐 (𝑘, 𝑎)ℎ 𝑐 (𝑘)𝛼 (C.11)

𝜇where to simplify notation I denote 𝑓𝑐 (𝑘, 𝑎) = 𝐴 𝑐 𝐿 𝑐 · 𝑧 𝑘 𝑎 𝜃𝑘 , and the resource constraint of housing for each
city
ÕÕ
Õ
𝐷 𝑘𝑐 (𝑎) ℎ 𝑘𝑐 (𝑎) +𝐽𝑐 (𝑘) ℎ 𝑐 (𝑘) ≤ 𝐻 𝑐 𝑌𝑐 1/(1+𝛾𝑐 ) , ∀𝑐.
(C.12)𝑘𝑎𝑘Lastly, the planner faces the non-negativity constraints for all consumption and housing allocations to61

workers and firms:

C.2

𝑐 𝑘𝑐 (𝑎) ≥ 0, ℎ 𝑘𝑐 (𝑎) ≥ 0(C.13)𝑐 𝑐 (𝑘) ≥ 0, ℎ 𝑐 (𝑘) ≥ 0.

(C.14)

Solving the social planner’s problem

The Lagrange function of the social planner’s problem isℒ=Õ𝜑 𝑤 (𝑎) 𝐿 (𝑎) 𝑈 (𝑎) +𝑎Õ𝜑 𝑓 (𝑘) 𝐽 (𝑘) Π (𝑘)

𝑘

"
−

ÕÕÕ
𝑐

𝑘

∗
𝑊𝑘𝑐
(𝑎) 𝐷 𝑘𝑐 (𝑎)𝑎𝐷 𝑘𝑐 (𝑎)
log
𝐿 (𝑎)





! −1 #
 𝛽𝑤 /𝜌𝑤Õ©
ª− log ­ 𝐽𝑐 (𝑘) · 𝑐 𝑘𝑐 (𝑎)1−𝜂 ℎ 𝑘𝑐 (𝑎)𝜂· 𝑈 𝑐 (𝑎)𝛽𝑤 −𝛽𝑤 /𝜌𝑤 ·𝑈 𝑐 (𝑎)𝛽𝑤®
𝑐«¬! −1 ÕÕÕ𝐽𝑐 (𝑘)©
ª− log ­ 𝑐 𝑐 (𝑘)𝛽 𝑓 ·−𝜋∗𝑐 (𝑘) 𝐽𝑐 (𝑘) log
𝑐 𝑐 (𝑘)𝛽 𝑓
®
𝐽 (𝑘)


𝑐
𝑐
𝑘
«
¬

#
"
Õ
ÕÕ
Õ
𝑅 ∗𝑐

−

𝐽𝑐 (𝑘)ℎ 𝑐 (𝑘) − 𝐻 𝑐 𝐼 𝑐 1/(1+𝛾𝑐 )𝐷 𝑘𝑐 (𝑎)ℎ 𝑘𝑐 (𝑎) +

𝑐

𝑘

𝑎

𝑘

"
− 𝑃∗

ÕÕÕ
𝑐

𝑘

𝐷 𝑘𝑐 (𝑎)𝑐 𝑘𝑐 (𝑎) +

𝑎

ÕÕ
𝑐

𝐽𝑐 (𝑘)𝑐 𝑐 (𝑘) +

Õ

𝑌𝑐 −

𝑐

𝑘

ÕÕ
𝑐

𝐽𝑐 (𝑘)

Õ 𝐷 (𝑎)𝑘𝑐
𝑎𝑘

𝐽𝑐 (𝑘)! 1−𝛼𝑓𝑐 (𝑘, 𝑎)− ...

#ℎ 𝑐 (𝑘)𝛼(C.15)∗
where 𝑊𝑘𝑐(𝑎) is the multiplier for the worker allocation constraint (C.7); 𝜋∗𝑐 (𝑘) is the multiplier for the firm
allocation constraint (C.8); 𝑃 ∗ is the multiplier for the resource constraint of the final good (C.11); 𝑅 ∗𝑐 is
the multiplier for local housing constraints (C.12) for each city 𝑐. I omit the terms for the non-negativity
constraints in the Lagrange function and focus on the internal solution of the problem. The first-orderconditions of the planner’s problem are derived below.

First, for the ones associated with the final good and housing allocated to workers, 𝑐 𝑘𝑐 (𝑎) and ℎ 𝑘𝑐 (𝑎),we have∗(𝑎) 𝐷 𝑘𝑐 (𝑎)𝜕 log 𝑈 𝑐 (𝑎)𝛽 𝑤 (1 − 𝜂)𝑊𝑘𝑐
𝛽𝑤 Õ ∗
𝜕𝑈 (𝑎)++ 𝛽𝑤 −
𝑊𝑘′ 𝑐 (𝑎) 𝐷 𝑘′ 𝑐 (𝑎) ·+𝜕𝑐 𝑘𝑐 (𝑎) : 𝜑 (𝑎) 𝐿 (𝑎)𝜌𝑤𝑐 𝑘𝑐 (𝑎)𝜕𝑐 𝑘𝑐 (𝑎) 𝜌𝑤
𝜕𝑐 𝑘𝑐 (𝑎)
′
𝑤

𝑘

ÕÕ
𝑐′

𝑊𝑘∗′ 𝑐′ (𝑎) 𝐷 𝑘′ 𝑐′ (𝑎) ·

𝑘′

𝜕 log

Í

𝛽𝑤
𝑐 𝑈 𝑐 (𝑎)𝜕𝑐 𝑘𝑐 (𝑎)

 −1
− 𝑃 ∗ 𝐷 𝑘𝑐 (𝑎) = 0(C.16)62∗(𝑎) 𝐷 𝑘𝑐 (𝑎)𝜕 log 𝑈 𝑐 (𝑎)𝛽 𝑤 𝜂𝑊𝑘𝑐
𝛽𝑤 Õ ∗
𝜕𝑈 (𝑎)
𝜕ℎ 𝑘𝑐 (𝑎) : 𝜑 (𝑎) 𝐿 (𝑎)++ 𝛽𝑤 −
𝑊𝑘′ 𝑐 (𝑎) 𝐷 𝑘′ 𝑐 (𝑎) ·+𝜌𝑤ℎ 𝑘𝑐 (𝑎)𝜕ℎ 𝑘𝑐 (𝑎) 𝜌𝑤
𝜕ℎ 𝑘𝑐 (𝑎)
′
𝑤

𝑘

ÕÕ
𝑐′

𝑊𝑘∗′ 𝑐′ (𝑎) 𝐷 𝑘′ 𝑐′ (𝑎) ·

𝜕 log

Í

𝛽𝑤
𝑐 𝑈 𝑐 (𝑎) −1− 𝑅∗𝑐 𝐷 𝑘𝑐 (𝑎) = 0.

𝜕ℎ 𝑘𝑐 (𝑎)𝑘′

(C.17)
Then, for the ones associated with the final good and commercial floor space allocated to firms, 𝑐 𝑐 (𝑘)and ℎ 𝑘𝑐 (𝑘), we have𝜕𝑐 𝑐 (𝑘) : 𝜑 𝑓 (𝑘) 𝐽 (𝑘)Õ𝜕Π (𝑘)
1+𝜋∗𝑐′ (𝑘) 𝐽𝑐′ (𝑘)+ 𝛽 𝑓 𝜋∗𝑐 (𝑘) 𝐽𝑐 (𝑘)𝑐 𝑐 (𝑘)𝜕𝑐 𝑐 (𝑘)
𝑐′

𝜕 log

Í

𝛽𝑓
𝑐 𝑐 𝑐 (𝑘)𝜕𝑐 𝑐 (𝑘) −1− 𝑃 ∗ 𝐽𝑐 (𝑘) = 0(C.18)

𝜕ℎ 𝑐 (𝑘) : 𝑅 ∗𝑐 − 𝑃 ∗ 𝛼

Õ 𝐷 (𝑎)𝑘𝑐
𝑎𝐽𝑐 (𝑘)! 1−𝛼𝑓𝑐 (𝑘, 𝑎)ℎ 𝑐 (𝑘)𝛼−1 = 0.

(C.19)

Also, for the ones with the worker allocation 𝐷 𝑘𝑐 (𝑎), we have∗𝜕𝐷 𝑘𝑐 (𝑎) : 𝑊𝑘𝑐(𝑎) + 𝑅 ∗𝑐 ℎ 𝑘𝑐 (𝑎) + 𝑃 ∗ 𝑐 𝑘𝑐 (𝑎) − 𝑃 ∗ (1 − 𝛼) · 𝛼

𝛼
1−𝛼

𝛼
∗ 𝛼−1

𝑅𝑐

"

#

𝜇 ÕÕ
𝑓𝑐 (𝑘, 𝑎) +𝐷 𝑘′ 𝑐 (𝑎 ′) 𝑓𝑐 (𝑘 ′ , 𝑎 ′) = 0
𝐿𝑐 ′ ′
𝑎𝑘(C.20)and the ones with the firm allocation 𝐽𝑐 (𝑘), we have𝜕𝐽𝑐 (𝑘) :Õ𝑎𝜑 𝑤 (𝑎) 𝐿 (𝑎)ÕÕ𝜕 log 𝑈 𝑐 (𝑎)𝜕𝑈 (𝑎) Õ ∗𝐷 𝑘𝑐 (𝑎)+𝑊𝑘𝑐 (𝑎)+ (𝛽 𝑤 − 𝛽 𝑤 /𝜌𝑤 )𝑊𝑘∗′ 𝑐 (𝑎) 𝐷 𝑘′ 𝑐 (𝑎)𝐽𝑐 (𝑘)
𝜕𝐽𝑐 (𝑘)𝜕𝐽𝑐 (𝑘)′𝑎𝑎𝑘−𝜕 log 𝑐 𝑈 𝑐 (𝑎)𝑊𝑘∗′ 𝑐′ (𝑎) 𝐷 𝑘′ 𝑐′ (𝑎)𝜕𝐽𝑐 (𝑘)
𝑎

Í

ÕÕÕ
𝑐′

𝑘′

𝛽𝑤

− 𝜋∗𝑐 (𝑘) − 𝑃 ∗ 𝑐 𝑐 (𝑘) = 0.
(C.21)

Finally, the first-order condition with respect to the final good used to produce housing in city 𝑐, 𝐼 𝑐 , is:𝛾

𝜕𝑌𝑐 : 𝑅 ∗𝑐 𝐻 𝑐

C.3

𝑐
1
1+𝛾
𝑌𝑐 𝑐 = 𝑃 ∗ , ∀𝑐.
1 + 𝛾𝑐(C.22)

Characterization of the social planner’s solution

Starting from equation (C.16), we can re-arrange this equation as
𝜑 𝑤 (𝑎) · (1 − 𝜂) = 𝑃 ∗ 𝑐 𝑘𝑐 (𝑎) −

Õ
𝛽
𝛽𝑤
𝐷 𝑘′ 𝑐 (𝑎)𝑤∗(1 − 𝜂)𝑊𝑘𝑐−𝛽 𝑤+(1 − 𝜂) 𝑊𝑘∗′ 𝑐 (𝑎)
(𝑎) +
𝜌𝑤
𝜌𝑤
𝐿 𝑐 (𝑎)
′
𝑘

𝛽𝑤

ÕÕ
𝑐′

63

𝑘′

𝐷 𝑘′ 𝑐′ (𝑎).
(1 − 𝜂) 𝑊𝑘∗′ 𝑐′ (𝑎)𝐿 (𝑎)(C.23)

Similarly, we can rewrite equation (C.17) as
𝜑

𝑤

𝛽𝑤
∗
𝜂𝑊𝑘𝑐
(𝑎) +
(𝑎) · 𝜂 = 𝑅 ∗𝑐 ℎ 𝑘𝑐 (𝑎) −
𝜌𝑤



Õ
ÕÕ
𝛽𝑤
𝐷 𝑘′ 𝑐 (𝑎)𝐷 𝑘′ 𝑐′ (𝑎)𝜂𝑊𝑘∗′ 𝑐 (𝑎)
− 𝛽𝑤
+ 𝛽𝑤
𝜂𝑊𝑘∗′ 𝑐′ (𝑎). (C.24)𝜌𝑤
𝐿 𝑐 (𝑎)
𝐿 (𝑎)
′
′
𝑐

𝑗

𝑘

Combining the two equations above, we obtain

Õ
ÕÕ
𝛽𝑤
𝛽𝑤 ∗
𝐷 𝑘′ 𝑐′ (𝑎)𝐷 𝑘′ 𝑐 (𝑎)𝜑 (𝑎) −
− 𝛽𝑤
𝑊𝑘∗′ 𝑐 (𝑎)− 𝛽𝑤𝑊𝑘∗′ 𝑐′ (𝑎)= 𝑃 ∗ 𝑐 𝑘𝑐 (𝑎) + 𝑅 ∗𝑐 ℎ 𝑘𝑐 (𝑎) −𝑊𝑘𝑐 (𝑎) .
𝜌𝑤
𝜌
𝐿
𝐿
(𝑎)
(𝑎)
𝑤
𝑐
𝑐′ 𝑘′
𝑘′
(C.25)
and𝜂𝑃 ∗ 𝑐 𝑘𝑐 (𝑎) = (1 − 𝜂) 𝑅 ∗𝑐 ℎ 𝑘𝑐 (𝑎).
(C.26)𝑤



Then, from equation (C.20), we have∗𝑊𝑘𝑐(𝑎) = −𝑅 ∗𝑐 ℎ 𝑘𝑐 (𝑎) − 𝑃 ∗ 𝑐 𝑘𝑐 (𝑎) + 𝑃 ∗ (1 − 𝛼) · 𝛼

𝛼
1−𝛼

𝛼
∗ 𝛼−1

𝑅𝑐

"

#

𝜇 ÕÕ
𝑓𝑐 (𝑘, 𝑎) +𝐷 𝑘′ 𝑐 (𝑎 ′) 𝑓𝑐 (𝑘 ′ , 𝑎 ′) . (C.27)
𝐿𝑐 ′ ′
𝑘𝑎∗
Plugging 𝑊𝑘𝑐(𝑎) into equation (C.25) then leads to the condition for socially optimal worker expenditures𝑃 ∗ 𝑐 𝑘𝑐 (𝑎) + 𝑅 ∗𝑐 ℎ 𝑘𝑐 (𝑎) =
𝛽 𝑤 /𝜌𝑤 1
˜ 𝑘𝑐 (𝑎) − 𝒪𝑐𝑤 (𝑎) +𝑊
𝜑 𝑤 (𝑎)1 + 𝛽 𝑤 /𝜌𝑤
1 + 𝛽 𝑤 /𝜌𝑤(C.28)𝛼𝛼𝜇 Í Í˜ 𝑘𝑐 (𝑎) = 𝑃 ∗ (1 − 𝛼) · 𝛼 1−𝛼where I define 𝑊𝑅∗𝑐 𝛼−1 𝑓𝑐 (𝑘, 𝑎) + 𝐿𝑐 𝑘 𝑎 𝐷 𝑘𝑐 (𝑎) 𝑓𝑐 (𝑘, 𝑎) as the social value of skill
𝑎 worker in firm type 𝑘 and city 𝑐, which consist of her own marginal product of labor and the agglomerationÍÍ Í
𝐷 ′ 𝑐 (𝑎)𝐷 ′ 𝑐′ (𝑎)spillover for all workers in the city; 𝒪𝑐𝑤 (𝑎) = (1 − 𝜌𝑤 ) 𝑘′ 𝑊𝑘∗′ 𝑐 (𝑎) 𝐿𝑘𝑐 (𝑎)is the+ 𝜌𝑤 𝑐′ 𝑘′ 𝑊𝑘∗′ 𝑐′ (𝑎) 𝑘𝐿(𝑎)opportunity cost of a skill 𝑎 worker in city 𝑐, which is a weighted average of the worker’s average shadow valueÍÍ Í
𝐷 ′ 𝑐 (𝑎)𝐷 ′ 𝑐′ (𝑎)in city 𝑐, 𝑘′ 𝑊𝑘∗′ 𝑐 (𝑎) 𝐿𝑘𝑐 (𝑎), and the average shadow value in all cities, 𝑐′ 𝑘′ 𝑊𝑘∗′ 𝑐′ (𝑎) 𝑘𝐿(𝑎). As common in
the urban literature, workers do not internalize the agglomeration spillovers affected by their location choices,𝛽 /𝜌
which is part of the social value. To simplify notation, I define 𝑇𝑐𝑤 (𝑎) ≡ − 1+𝛽𝑤𝑤 /𝜌𝑤𝑤 𝒪𝑐𝑤 (𝑎) + 1+𝛽𝑤1 /𝜌𝑤 𝜑 𝑤 (𝑎) andrewrite the optimal condition ash𝑃 ∗ 𝑐 𝑘𝑐 (𝑎) + 𝑅 ∗𝑐 ℎ 𝑘𝑐 (𝑎) =i𝛽 𝑤 /𝜌𝑤
˜ 𝑘𝑐 (𝑎) + 𝑇𝑐𝑤 (𝑎).
𝑊
1 + 𝛽 𝑤 /𝜌𝑤(C.29)

We now obtain the same condition for firms. Start from equation (C.18), we have𝜑 𝑓 (𝑘) = 𝑃 ∗ 𝑐 𝑐 (𝑘) − 𝛽 𝑓 𝜋∗𝑐 (𝑘) + 𝛽 𝑓

Õ
𝑐′

64

𝜋∗𝑐′ (𝑘)𝐽𝑐′ (𝑘).
𝐽 (𝑘)(C.30)

Then, plugging 𝜋∗𝑐 (𝑘) from equation (C.21) into the previous equation yieldsÕ

𝜑 𝑤 (𝑎) 𝐿 (𝑎)𝑎ÕÕ
𝐷 𝑘𝑐 (𝑎) 1
𝜕𝑈 (𝑎) Õ ∗1+
𝑊𝑘𝑐 (𝑎) 𝐷 𝑘𝑐 (𝑎)𝑊𝑘∗′ 𝑐 (𝑎) 𝐷 𝑘′ 𝑐 (𝑎)− (1 − 𝜌𝑤 )−𝐽𝑐 (𝑘)
𝐿 𝑐 (𝑎) 𝐽𝑐 (𝑘)𝜕𝐽𝑐 (𝑘)
′
𝑎
𝑎
𝑘

𝜌𝑤

𝐷 𝑘𝑐 (𝑎) 1
𝑊𝑘∗′ 𝑐′ (𝑎) 𝐷 𝑘′ 𝑐′ (𝑎) ·− 𝜋∗𝑐 (𝑘) − 𝑃 ∗ 𝑐 𝑐 (𝑘) = 0.
𝐿
𝐽
(𝑎)
(𝑘)
𝑐
𝑐
𝑎

(C.31)

ÕÕÕ𝑐′𝑘′Further,"

1 + 𝛽 𝑓 𝑃 ∗ 𝑐 𝑐 (𝑘) + 𝛽 𝑓𝑐(1 − 𝛽 𝑐 · 𝜌𝑤 /𝛽 𝑤 )Õ𝜕𝑈 (𝑎) Õ ∗𝐽𝑐′ (𝑘)1− 𝜑 𝑓 (𝑘) = 𝛽 𝑓
𝜑 𝑤 (𝑎) 𝐿 (𝑎)−+𝑊𝑘𝑐 (𝑎) 𝐷 𝑘𝑐 (𝑎)𝜋∗𝑐′ (𝑘)𝐽 (𝑘)𝐽𝑐 (𝑘)
𝜕𝐽𝑐 (𝑘)′𝑎𝑎Õ

𝐷 𝑘𝑐 (𝑎) 1
𝑊𝑘∗′ 𝑐 (𝑎) 𝐷 𝑘′ 𝑐 (𝑎)− 𝛽 𝑐 · 𝜌𝑤 /𝛽 𝑤
𝐿 𝑐 (𝑎) 𝐽𝑐 (𝑘)
𝑎
𝑐′

ÕÕ
𝑘′

𝐷 𝑘𝑐 (𝑎) 1
𝑊𝑘∗′ 𝑐′ (𝑎) 𝐷 𝑘′ 𝑐′ (𝑎) ·𝐿 𝑐 (𝑎) 𝐽𝑐 (𝑘)
𝑎

ÕÕÕ
𝑘′

(C.32)
which, after some algebra, can be simplified as𝑃 ∗ 𝑐 𝑐 (𝑘) =𝛽𝑓



1 + 𝛽𝑓𝜋˜ 𝑐 (𝑘) − 𝒪 𝑓 (𝑘) +1
𝜑 𝑓 (𝑘).
1 + 𝛽𝑓(C.33)In the equation above, 𝜋˜ 𝑐 (𝑘) is the social value of a firm of type 𝑘 in city 𝑐, and 𝒪 𝑓 (𝑘) =the opportunity cost of a type -𝑘 firm. The social value 𝜋˜ 𝑐 (𝑘) can be expressed as
𝜋˜ 𝑐 (𝑘) =

Õ

∗
𝑊𝑘𝑐
(𝑎)

𝑎

|

Í

𝐽𝑐 (𝑘)∗𝑐 𝜋 𝑐 (𝑘) 𝐽(𝑘) isÕ𝐷 𝑘𝑐 (𝑎)¯ 𝑐∗ (𝑎) 𝐷 𝑘𝑐 (𝑎)− (1 − 𝜌𝑤 )𝑊
𝐽𝑐 (𝑘)𝐽𝑐 (𝑘)
𝑎

{z

}

|

{z

firm surplus}

local labor stealing− 𝜌𝑤

𝐷 𝑘𝑐 (𝑎) 𝜌𝑤+
𝑊¯ ∗ (𝑎)𝛽𝑤
𝐽𝑐 (𝑘)𝑎Õ|{znational labor stealing

} |

Õ
𝑎

𝐷 𝑘𝑐 (𝑎)𝜑 (𝑎)𝐽𝑐 (𝑘)(C.34)𝑤{z}

love-of-variety preference¯ 𝑐∗ (𝑎) ≡ Í 𝑘 𝑊 ∗ (𝑎) 𝐷𝑘𝑐 (𝑎) and 𝑊¯ ∗ (𝑎) ≡ Í𝑐 Í 𝑘 𝑊 ∗ (𝑎) 𝐷𝑘𝑐 (𝑎) are the average shadow value of thewhere 𝑊
𝐿 𝑐 (𝑎)𝐿(𝑎)𝑘𝑐𝑘𝑐skill-𝑎 workers in city 𝑐 and in all cities.
The expression of 𝜋˜ 𝑐 (𝑘) makes explicit the externalities that firms do not consider when making alocation decision: first, it competes for workers with other firms in the same city; second, it attracts workers
from other cities; third, it increases the utility of workers in the city via their love-of-variety preference
𝛽𝑓
1
for more workplace choices. As before, I define 𝑇 𝑓 (𝑘) ≡ − 1+𝛽 𝑓 𝒪 𝑓 (𝑘) + 1+𝛽
𝜑 𝑓 (𝑘) and rewrite the firm𝑓optimality condition as𝛽𝑓
𝑃 ∗ 𝑐 𝑐 (𝑘) =𝜋˜ 𝑐 (𝑘) + 𝑇 𝑓 (𝑘).
(C.35)
1 + 𝛽𝑓
An efficient allocation is given by allocations {𝑐 𝑘𝑐 (𝑎), ℎ 𝑘𝑐 (𝑎), 𝑐 𝑐 (𝑘), 𝐷 𝑘𝑐 (𝑎), 𝐿 𝑐 (𝑎), 𝐽𝑐 (𝑘), 𝑌𝑐 } and multipliers∗∗{𝑃 , 𝑅∗𝑐 , 𝑊𝑘𝑐(𝑎), 𝜋∗𝑐 (𝑘)} such that the first-order conditions (C.16)-(C.22), the spatial mobility constraints(C.5)-(C.8), and resources constraints (C.11)-(C.12) hold.

65

#

∗
Given competitive prices {𝑃, 𝑟 𝑐 , 𝑊𝑘𝑐 (𝑎), 𝜋 𝑐 (𝑘)} equal to multipliers {𝑃 ∗ , 𝑅∗𝑐 , 𝑊𝑘𝑐(𝑎), 𝜋∗𝑐 (𝑘)} and decentralized expenditure {𝑥 𝑘𝑐 (𝑎), 𝑥 𝑐 (𝑘)} equal to {𝑥 ∗𝑘𝑐 (𝑎), 𝑥 ∗𝑐 (𝑘)},59 equations (C.16)-(C.17) coincide with theutility maximization condition implied by (3.1), equation (C.19) coincide with the optimal housing input
condition (B.6), equations (C.5)-(C.8) coincide with optimality location and matching conditions (3.3)-(3.4)
and (3.12), equation (C.22) coincides with the optimality condition of the developer (B.12), equations (C.11)(C.12) coincide with market clearing conditions (B.15)-(B.17). Therefore, the system characterizing thecompetitive solution for {𝑐 𝑘𝑐 (𝑎), ℎ 𝑘𝑐 (𝑎), 𝑐 𝑐 (𝑘), 𝐷 𝑘𝑐 (𝑎), 𝐿 𝑐 (𝑎), 𝐽𝑐 (𝑘), 𝑌𝑐 } given the prices {𝑃, 𝑟 𝑐 , 𝑊𝑘𝑐 (𝑎), 𝜋 𝑐 (𝑘)}and the expenditures {𝑥 𝑘𝑐 (𝑎), 𝑥 𝑐 (𝑘)} is the same as the system characterizing the planner’s allocation for∗
those same quantities given the multipliers {𝑃 ∗ , 𝑅∗𝑐 , 𝑊𝑘𝑐(𝑎), 𝜋∗𝑐 (𝑘)} and expenditures {𝑥 𝑘𝑐 (𝑎), 𝑥 𝑐 (𝑘)}. As
a result, if the competitive equilibrium is efficient, when 𝑥 𝑘𝑐 (𝑎) = 𝑥 ∗𝑘𝑐 (𝑎) where 𝑥 ∗𝑘𝑐 (𝑎) is given by (C.28)
and 𝑥 𝑐 (𝑘) = 𝑥 ∗𝑐 (𝑘) where 𝑥 ∗𝑐 (𝑘) is given by (C.33). Conversely, if 𝑥 𝑘𝑐 (𝑎) = 𝑥 ∗𝑘𝑐 (𝑎) and 𝑥 𝑐 (𝑘) = 𝑥 ∗𝑐 (𝑘) for{𝑥 𝑘𝑐 (𝑎), 𝑥 𝑐 (𝑘)} defined in (4.7) and (4.8) given the multipliers that solve the planner’s problem, there is∗a solution for the competitive allocation such that {𝑃, 𝑅 𝑐 , 𝑊𝑘𝑐 (𝑎), 𝜋 𝑐 (𝑘)} = {𝑃 ∗ , 𝑅∗𝑐 , 𝑊𝑘𝑐(𝑎), 𝜋∗𝑐 (𝑘)}. If theplanning problem is concave then there is a unique solution to the system characterizing the planner’s∗
solution, in which case {𝑃, 𝑅 𝑐 , 𝑊𝑘𝑐 (𝑎), 𝜋 𝑐 (𝑘)} = {𝑃 ∗ , 𝑅∗𝑐 , 𝑊𝑘𝑐(𝑎), 𝜋∗𝑐 (𝑘)} is the only competitive equilibrium.

C.4

Optimal spatial policies

After characterizing the social planner’s solution and recognizing externalities that come from workers’
and firms’ location choices, I now design a set of optimal spatial policies to restore efficient spatial allocation.
𝑤
The optimal spatial policies consist of (1) a set of labor taxes {𝑡 𝑘𝑐(𝑎)}∀𝑎,𝑘,𝑐 that are specific to worker skill
𝑓𝑎, firm type 𝑘 and city 𝑐, and (2) a set of firm profit taxes {𝑡 𝑐 (𝑘)}∀𝑘,𝑐 that are specific to firm type 𝑘 andcity 𝑐. To restore efficient allocation, the labor and profit taxes have to reflect sorting externalities andredistribution motives. Specifically, set the labor taxes as
𝛽 𝑤 /𝜌𝑤
1+𝛽 𝑤 /𝜌𝑤𝑤
𝑡 𝑘𝑐(𝑎) = −

˜ 𝑘𝑐 (𝑎) + 𝑇𝑐𝑤 (𝑎) − 𝑊𝑘𝑐 (𝑎)𝑊
𝑊𝑘𝑐 (𝑎),∀𝑎, 𝑘, 𝑐and set the profit taxes as
𝛽𝑓
1+𝛽 𝑓
𝑓
𝑡 𝑐 (𝑘) = −𝜋˜ 𝑐 (𝑘) + 𝑇 𝑓 (𝑘) − 𝜋 𝑐 (𝑘)𝜋 𝑐 (𝑘),∀𝑘, 𝑐where {𝑊𝑘𝑐 (𝑎)}∀𝑎,𝑘,𝑐 and {𝜋 𝑐 (𝑘)}∀𝑘,𝑐 are wages and profits that workers and firms earn in a competitive
˜ 𝑘𝑐 (𝑎)}∀𝑎,𝑘,𝑐 is given byequilibrium, and {𝑊˜ 𝑘𝑐 (𝑎) =𝑊
1 + 𝛽 𝑤 /𝜌𝑤¯𝑐 ,𝑊𝑘𝑐 (𝑎) + 𝜇𝑊
𝛽 𝑤 /𝜌𝑤

∀𝑎, 𝑘, 𝑐and {𝜋˜ 𝑐 (𝑘)}∀𝑘,𝑐 is given by𝜋˜ 𝑐 (𝑘) =𝛽𝑓
1 + 𝛽𝑓

Õ 𝐷 (𝑎) 𝑘𝑐𝑎𝐽𝑐 (𝑘)

𝜌𝑤 𝑤
∗
𝜑 (𝑎)
𝑊𝑘𝑐
(𝑎) − (1 − 𝜌𝑤 ) 𝑊¯ 𝑐∗ (𝑎) − 𝜌𝑤 𝑊¯ ∗ (𝑎) +𝛽𝑤

59The price of the final good, 𝑃, is normalized to be one in the competitive equilibrium.

66



,

∀𝑘, 𝑐

∗
and {𝑊𝑘𝑐(𝑎)}∀𝑎,𝑘,𝑐 and {𝑅 𝑤𝑐 (𝑎)}∀𝑎,𝑐 are determined by the following system of equations

𝛽 𝑤 /𝜌𝑤
˜ 𝑘𝑐 (𝑎) − 𝑇𝑐𝑤 (𝑎) , ∀𝑎, 𝑘, 𝑐𝑊
1 + 𝛽 𝑤 /𝜌𝑤
𝛽 𝑤 /𝜌𝑤
1
𝜑 𝑤 (𝑎) ,𝑇𝑐𝑤 (𝑎) = −(1 − 𝜌𝑤 ) 𝑊¯ 𝑐∗ (𝑎) + 𝜌𝑤 𝑊¯ ∗ (𝑎) +1 + 𝛽 𝑤 /𝜌𝑤
1 + 𝛽 𝑤 /𝜌𝑤

∗
𝑊𝑘𝑐
(𝑎) =

∀𝑎, 𝑐

and {𝜋∗𝑐 (𝑘)}∀𝑘,𝑐 and {𝑅 𝑓 (𝑘)}∀𝑘 are determined by the following system of equations:1
𝜋˜ 𝑐 (𝑘) − 𝑇 𝑓 (𝑘) , ∀𝑘, 𝑐
1 + 𝛽𝑓𝛽𝑓
1
𝑇 𝑓 (𝑘) = −𝜋¯∗ (𝑘) +𝜑 𝑓 (𝑘) ,1 + 𝛽𝑓1 + 𝛽𝑓𝜋∗𝑐 (𝑘) =(C.36)∀𝑘.

(C.37)

I assume that the housing developers’ profits are rebated to workers, which is proportional to the𝑤after-tax labor income (1 − 𝜏𝑘𝑐(𝑎)) 𝑊𝑘𝑐 (𝑎). With the instruments and the rebate rule, the total after-tax
income of a worker with skill 𝑎 working for firm 𝑘 in city 𝑐 is𝑤
𝐼 𝑘𝑐(𝑎) = 𝜏𝑤
1 − 𝑡 𝑘𝑐(𝑎)

𝛽 𝑤 /𝜌𝑤
˜ 𝑘𝑐 (𝑎) + 𝑇𝑐𝑤 (𝑎)𝑊𝑘𝑐 (𝑎) = 𝜏𝑊
1 + 𝛽 𝑤 /𝜌𝑤

Then, the budget constraint for such a worker is
𝛽 𝑤 /𝜌𝑤
˜ 𝑘𝑐 (𝑎) + 𝑇𝑐𝑤 (𝑎) .
𝑃𝑐 𝑘𝑐 (𝑎) + 𝑟 𝑐 ℎ 𝑘𝑐 (𝑎) = 𝜏𝑊
1 + 𝛽 𝑤 /𝜌𝑤

(C.38)

The after-tax income of an entrepreneur operating firm 𝑘 in city 𝑐 is
𝑓



𝑓

𝛽𝑓



𝐼 𝑐 (𝑘) = 1 − 𝑡 𝑐 (𝑘) 𝜋 𝑘𝑐 (𝑎) =1 + 𝛽𝑓𝜋˜ 𝑐 (𝑘) + 𝑇 𝑓 (𝑘)(C.39)𝜋˜ 𝑐 (𝑘) + 𝑇 𝑓 (𝑘).

(C.40)and the budget constraint for such an entrepreneur is



𝑓

𝛽𝑓



𝑃𝑐 𝑐 (𝑘) = 1 − 𝑡 𝑐 (𝑘) 𝜋 𝑘𝑐 (𝑎) =1 + 𝛽𝑓

I now show that the government’s budget balances with the specified taxes, that is
−

ÕÕÕ
𝑐

𝐷 𝑘𝑐 (𝑎)𝑤
𝑡 𝑘𝑐(𝑎) 𝑊𝑘𝑐 (𝑎)



−

ÕÕ

𝑎

𝑘

𝑐

𝐽𝑐 (𝑘)

𝑓𝑡 𝑐 (𝑘) 𝜋 𝑐 (𝑘)=0(C.41) ÕÕ

𝐽𝑐 (𝑘) 𝜋 𝑐 (𝑘)−𝜋˜ 𝑐 (𝑘)𝑘or equivalently

ÕÕÕ
𝑐

𝑘

𝑎

ÕÕ

𝐷 𝑘𝑐 (𝑎) 𝑇𝑐𝑤 (𝑎)+𝑐𝑘

𝐽𝑐 (𝑘) 𝑇 𝑓 (𝑘) =

ÕÕÕ
𝑐

𝑘

𝑎



˜ 𝑘𝑐 (𝑎) +𝐷 𝑘𝑐 (𝑎) 𝑊𝑘𝑐 (𝑎)−𝑊

𝑐



𝑘

(C.42)67To show this, we can rewrite the transfer terms 𝑇𝑐𝑤 (𝑎) as:
˜ (𝑎) +˜ 𝑐 (𝑎) + 𝜌𝑤 𝑊
𝑇𝑐𝑤 (𝑎) = − (1 − 𝜌𝑤 ) 𝑊
𝛽 𝑤 /𝜌𝑤 1𝐼¯𝑤 (𝑎)(1 − 𝜌𝑤 ) 𝐼¯𝑐𝑤 (𝑎) + 𝜌𝑤 𝐼¯𝑤 (𝑎) +1 + 𝛽 𝑤 /𝜌𝑤
1 + 𝛽 𝑤 /𝜌𝑤

and 𝑇 𝑓 (𝑘) as
𝛽𝑓𝑓

𝑇 (𝑘) = −Õ 1 + 𝛽𝑓

1 + 𝛽𝑓𝛽𝑓𝑐

𝑓𝜋˜ 𝑐 (𝑘) − 𝐼 𝑐 (𝑘)𝐽𝑐 (𝑘)𝐽𝑐 (𝑘)
1 Õ 𝑓+
𝐼 𝑐 (𝑘).
𝐽 (𝑘) 1 + 𝛽 𝑓 𝑐
𝐽 (𝑘)Now, note that

ÕÕÕ 1
𝑐

𝜏

𝑎

𝑘

Defining 𝒯 ≡

ÕÕ 𝑓

𝑤
𝐼 𝑘𝑐
(𝑎)𝐷 𝑘𝑐 (𝑎) +𝐼 𝑐 (𝑘) 𝐽𝑐 (𝑘) =

𝑐

Í Í Í
𝑐

𝑘

ÕÕÕ
𝑐

𝑘

𝒯 =

𝑐

˜ 𝑐 (𝑎) + 𝜌𝑤 𝑊
˜ (𝑎) +
𝐷 𝑘𝑐 (𝑎) − (1 − 𝜌𝑤 ) 𝑊



𝑎

𝑘

𝐼¯𝑤 (𝑎)1+
1 + 𝛽 𝑤 /𝜌𝑤 𝜏−ÕÕ

1 + 𝛽𝑓𝑐𝑘𝑐𝜋 𝑐 (𝑘) 𝐽𝑐 (𝑘) .

𝑘

𝛽 𝑤 /𝜌𝑤
𝐼¯𝑤 (𝑎)𝐼¯𝑤 (𝑎)+ 𝜌𝑤(1 − 𝜌𝑤 ) 𝑐𝜏𝜏
1 + 𝛽 𝑤 /𝜌𝑤





#

"

𝛽𝑓

𝑎

ÕÕ

Í Í
𝑤
𝑓
𝑎 𝐷 𝑘𝑐 (𝑎) 𝑇𝑐 (𝑎) + 𝑐
𝑘 𝐽𝑐 (𝑘) 𝑇 (𝑘), we then have

"
ÕÕÕ

𝑘

𝑊𝑘𝑐 (𝑎) 𝐷 𝑘𝑐 (𝑎) +𝐽𝑐 (𝑘)

ÕÕ 1 + 𝛽𝑓
𝑐′

𝛽𝑓

𝑘′

𝐽𝑐′ (𝑘 ′)1 ¯𝑓𝑓+
𝜋˜ 𝑐′ (𝑘 ′) − 𝐼 𝑐 (𝑘)𝐼 (𝑘)′1 + 𝛽𝑓
𝐽 (𝑘 )#Õ Õ Õ 𝐼 𝑤 (𝑎)ÕÕ 𝑓𝐽𝑐′ (𝑘 ′)
𝑘𝑐
𝐽
+
𝐷
+
𝐼 𝑐 (𝑘) 𝐽𝑐 (𝑘)𝜋˜ 𝑐′ (𝑘 ′)
(𝑘)
(𝑎)
𝑐
𝑘𝑐
𝜏
𝐽 (𝑘 ′)
′
𝑐
𝑎
𝑐
"

=−

ÕÕÕ
𝑐

˜ 𝑘𝑐 (𝑎)𝐷 𝑘𝑐 (𝑎) −
𝑊

𝑎

𝑘

𝑐′

𝑘

𝑘

𝑘

"

=−

ÕÕÕ
𝑐

=

𝑎

Õ Õ𝑘Õ
𝑐

˜ 𝑘𝑐 (𝑎)𝐷 𝑘𝑐 (𝑎) −
𝑊

𝑘

𝑎

ÕÕÕ
ÕÕ
𝐽𝑐′ (𝑘 ′)𝐽𝑊𝐷+
𝜋 𝑐 (𝑘) 𝐽𝑐 (𝑘)+𝜋˜ 𝑐′ (𝑘 ′)
(𝑎)
(𝑎)
(𝑘)
𝑐
𝑘𝑐
𝑘𝑐
𝐽 (𝑘 ′)
′
𝑐
𝑎
𝑐

ÕÕ
𝑐′

𝑘

˜ 𝑘𝑐 (𝑎) 𝐷 𝑘𝑐 (𝑎) +𝑊𝑘𝑐 (𝑎) − 𝑊



#

ÕÕ

𝑘

ÕÕ
𝑐′

𝑘

(𝜋 𝑐 (𝑘) − 𝜋˜ 𝑐 (𝑘)) 𝐽𝑐 (𝑘) .

𝑘′Hence, I have proved the government budget balance given by equation (C.42). Then, if the planner’s
problem is globally concave, the equilibrium with the specified taxes implements the efficient allocation,
which is given by the following: The after-tax budget constraints for workers (C.38) are identical to the onesin the social planner’s problem (C.29). Land rents are redistributed proportional to after-tax income and do
not affect workers’ location or firm choices. The consumption choices of workers on the final good andhousing, implied by (3.1), are identical to the social planner’s conditions (C.16) and (C.17). The between-city
location choice and within-city firm choice conditions of workers, with the after-tax worker income (3.4)
and (3.3) are identical to the optimal worker allocation conditions in the social planner’s problem (C.6)
and (C.5). The after-tax budget constraints for entrepreneurs (C.39) are identical to the ones in the social
planner’s problem (C.35). The location choice condition for firms, given after-tax entrepreneur income,
implied by (3.12), is identical to the optimal firm allocation conditions in the social planner’s problem (C.8).
The first order condition for final good inputs used by the housing developers (B.12) is identical to the one68#

of the social planner (C.22). The local labor market clearing conditions are automatically satisfied given(C.5). The market clearing conditions for the final good and housing (B.17) and (B.15) are the same as theresource constraints in the planner’s problem (C.11) and (C.12).

Appendix D

UniquenessTo illustrate the role of 𝛽 𝑤 /𝜌𝑤 and 𝜃 on multiplicity, I conduct the following simulation exercise.
Consider a simple economy with two cities, 𝑐 ∈ {1, 2}, sharing the same exogenous productivity 𝐴 𝑐 ,amenities 𝑅 𝑐 , and housing supply parameters {𝛾𝑐 , 𝐻0𝑐 }. I set 𝛽 𝑓 = 3, 𝛼 = 0, 𝜂 = 0.3 and 𝜇 = 0. Furthermore,
suppose there are two types of workers varying in skill a = (0.2, 1) and two types of firms varying
in productivity z = (0, 0.5) and the complementarity parameter Θ = (1, 𝜃). I perform 3×3 simulation
experiments in which I set 𝛽 𝑤 /𝜌𝑤 ∈ {0.6, 1.1, 2} and 𝜃 ∈ {1, 1.5, 3}. The “chasing mechanism” is most
relevant for the pair of type 2 workers and type 2 firms. To isolate this relationship, I fix the location of type1 workers and type 1 firms to be equally distributed across the two cities and do not allow them to move.
Figure I.6 displays the result. In the figure, red lines are the best response curves of the share of type-2
workers in city 1 given the share of type-2 firms in city 1, and blue lines are the best response curves of theshare of type-2 firms in city 1 given the share of type-2 workers in city 1. The interaction of the red andblue curves thus are the Nash Equilibria. Two patterns can be drawn from the simulation results: multiple
equilibria are more likely to arise when 1) 𝛽 𝑤 /𝜌𝑤 is small and 2) 𝜃 is large. These simulation results are inline with the discussion in the main text. Given my empirically estimated a large 𝛽 𝑤 /𝜌𝑤 and a moderate
range of 𝜃, the possibility for multiple equilibria is limited with other dispersion forces introduced in themodel. I further experiment with solving the estimated model with different initial guesses and they all
converge to the same solution.

Appendix E
E.1

Identification Appendix

Time-varying terms

Here, I add the time-varying shocks and functional form assumptions specified in Section 5.2 to keyterms in the model. First, worker 𝑖’s wage in firm 𝑗, city 𝑐 and time 𝑡 becomes𝑎𝜃𝑗𝜇𝑊𝑖𝑗𝑡 = 𝜒 · 𝑟 𝑐𝑡𝑎−1 · 𝐴 𝑐 𝐴ˆ 𝑐𝑡 𝐿 𝑐𝑡 · 𝑧 𝑗 𝑧ˆ 𝑗𝑡 · 𝑎 𝑖 𝑎ˆ 𝑖𝑡 .

(E.1)

Firm 𝑗 ∈ 𝒥𝑐 ’s wage bill is𝑎𝜇1+𝛽 𝑤 /𝜌𝑤
𝐸 𝑗𝑐𝑡 = 𝜒 · 𝐴 𝑐 𝐴ˆ 𝑐𝑡 𝐿 𝑐𝑡 𝑟 𝑐𝑡𝛼−1 · 𝑧 𝑗 𝑧ˆ 𝑗𝑡· 𝜙 𝑗𝑐𝑡







(E.2)

and its optimal profit is



𝜇

𝑎



𝜋 𝑐𝑡 (𝑗) = Ψ · 𝐴 𝑐 𝐴ˆ 𝑐𝑡 𝐿 𝑐𝑡 𝑟 𝑐𝑡𝛼−1 · 𝑧 𝑗 𝑧ˆ 𝑗𝑡

69

 1+𝛽𝑤 /𝜌𝑤· 𝜙 𝑗𝑐𝑡(E.3)

where the labor composite term is
𝜙 𝑗𝑐𝑡 =

E.2

∫ 

𝑎 𝜃𝑗

 1+𝛽𝑤 /𝜌𝑤

𝐺 𝑗𝑐 (𝑎)𝛽𝑤 /𝜌𝑤

𝐿 𝑐𝑡 (𝑎) ·𝑎Í𝑗 ′ ∈ℐ𝑐𝑧 𝑗′ 𝑧ˆ 𝑗′ 𝑡 𝑎𝜃 𝑗′· 𝐺 𝑗′ 𝑐 (𝑎) 𝜌𝛽𝑤 𝑑𝑎.

(E.4)

𝑤

Worker sorting elasticities

˜ 𝑖𝑡 , 𝑊¯ 𝑐𝑡 and two wage bill terms 𝐸˜ 𝑗𝑡 and 𝐸¯ 𝑐𝑡 for
Here, I show how to obtain the two wage terms 𝑊
constructing the passthrough equations (5.7) and (5.8). Start with the time-varying wage equation given byequation (E.1):𝛼𝜇𝑊𝑖𝑗𝑡 (𝑎) = 𝜒 · 𝑟 𝑐𝑡𝛼−1 · 𝐴 𝑐 𝐴ˆ 𝑐𝑡 𝐿 𝑐𝑡 ·|{z

𝑧 𝑗 𝑧ˆ 𝑗𝑡}

city component

·

|{z}

𝜃𝑗

𝑎 𝑖 𝑎ˆ 𝑖𝑡

.

(E.5)

|{z}

firm component worker component

As can be easily seen, wage changes for the worker stayers can be due to 1) city-level shocks due tochanges in housing rent, agglomeration spillovers, and productivity shocks, 2) firm-level productivity
shocks, and 3) worker skill transient shocks. Recall that worker skill transient shocks are assumed to be¯ 𝑐𝑡 ofi.i.d. and uncorrelated with city and firm shocks. In what follows, I will use the average city wage 𝑊
˜ 𝑖𝑡 to isolate firm-level shocks. The mean
stayers to isolate the city-level shocks and the residualized wage 𝑊
and residualized wage bill terms are constructed for the same purposes. Formally, with equation (E.5) the
average wage for stayers is given by𝛼¯ 𝑐𝑡 = E𝑆(𝑖)=1 𝜒 · 𝑟 𝛼−1 · 𝐴 𝑐 𝐴ˆ 𝑐𝑡 𝐿𝜇 · 𝑧 𝑗 𝑧ˆ 𝑗𝑡 · 𝑎 𝜃𝑗 𝑎ˆ 𝑖𝑡
𝑊
𝑐𝑡
𝑐𝑡
𝑖

h

i
(E.6)

𝛼

𝜇
= 𝜒 · 𝑟 𝑐𝑡𝛼−1 · 𝐴 𝑐 𝐴ˆ 𝑐𝑡 𝐿 𝑐𝑡 · Ξ̄𝑐

h

𝜃𝑗

i

where Ξ̄𝑐 ≡ E𝑆(𝑖)=1 𝑧 𝑗 · 𝑎 𝑖 is defined as the city wage index of the stayers. It does not change over time
because the set of workers and firms in the stayer sample is fixed, and the firm productivity and worker
transient skill shocks average out cross-sectionally within a city, for which reason I omit these shocks inthe definition of Ξ̄ and other city-level aggregate variables from now on. The residualized wage is thus
constructed as:
ˆ 𝑖𝑗𝑡 = 𝑊𝑖𝑗𝑡 /𝑊¯ 𝑐𝑡 = (Ξ̄𝑐 )−1 · 𝑧 𝑗 𝑧ˆ 𝑗𝑡 · 𝑎 𝜃𝑗 𝑎ˆ 𝑖𝑡 .
𝑊
(E.7)
𝑖
˜ 𝑖𝑡 , 𝑊¯ 𝑐𝑡 . For the two wage bill terms, start withThis completes the construction of two wage terms 𝑊
firm wage bill from equations (E.2):
𝜇



𝛼



 1+𝛽𝑤 /𝜌𝑤𝜇 1+𝛽 /𝜌 ∫ 

𝐸 𝑗𝑐𝑡 = 𝜒 𝐴 𝑐 𝐴ˆ 𝑐𝑡 𝐿 𝑐𝑡 𝑟 𝑐𝑡𝛼−1 · 𝑧 𝑗 𝑧ˆ 𝑗𝑡𝛼= 𝜒𝑟 𝑐𝑡 𝛼−1 𝐴 𝑐 𝐴ˆ 𝑐𝑡 𝐿 𝑐𝑡 · 𝑧 𝑗 𝑧ˆ 𝑗𝑡

𝑤· 𝜙 𝑗𝑐𝑡

𝑤

𝑎

70

𝑎 𝜃𝑗

 1+𝛽𝑤 /𝜌𝑤(E.8)
𝑎ˆ 𝑖𝑡 𝜅ˆ 𝑗𝑐𝑡 (𝑎)𝑑𝑎where 𝜅ˆ 𝑗𝑐𝑡 (𝑎) is the firm-skill-time-specific labor supply curve shifter given by𝜅ˆ 𝑗𝑐𝑡 (𝑎) = 𝐿(𝑎) ·

Í

𝑐′

−𝜂
𝑅 𝑐 (𝑎)𝑟 𝑐𝑡

Í



Í

−𝜂
𝑅 𝑐′ (𝑎)𝑟 𝑐′ 𝑡

𝜇



𝛼

= 𝐴 𝑐 𝐴ˆ 𝑐𝑡 𝐿 𝑐𝑡 𝑟 𝑐𝑡 𝛼−1

𝑊𝑗𝑐𝑡 (𝑎)𝐺 𝑗𝑐 (𝑎)𝑗∈𝒥𝑐𝑡𝑗 ′ ∈𝒥𝑐′ 𝑡

 𝛽𝑤 −𝛽𝑤 /𝜌𝑤

𝑊

𝑗′ 𝑐′ 𝑡 𝛽𝑤 /𝜌𝑤  𝜌𝑤 /𝛽𝑤 𝛽𝑤(𝑎)𝐺 (𝑎)
𝑗′ 𝑐

 𝛽𝑤

𝐺 𝑗𝑐 (𝑎) 𝑃𝑤

 · 𝛽𝑤 /𝜌𝑤  𝜌𝑤 /𝛽𝑤 𝛽𝑤 Í ′𝑗 ∈𝒥𝑐𝑡 𝛽𝑤

𝑊𝑗′ 𝑐𝑡 (𝑎)𝐺 𝑗′ 𝑐 (𝑎) 𝜌𝑤

(E.9)

 𝛽𝑤

· (𝑟 𝑐𝑡 )−𝜂𝛽𝑤 𝐺 𝑗𝑐 (𝑎) 𝜌𝑤 · 𝜅ˆ 𝑐𝑡 (𝑎)and 𝜅ˆ 𝑐𝑡 (𝑎) is a city-skill-specific labor supply shifter given by𝐿(𝑎) · 𝑅 𝑐 (𝑎)𝜅ˆ 𝑐𝑡 (𝑎) =


Í

𝑐′

−𝜂
𝑅 𝑐′ (𝑎)𝑟 𝑐′ 𝑡Í

𝑗 ′ ∈𝒥𝑐′ 𝑡ÍΞ𝑐 · 𝑧 𝑗 𝑎𝑗∈𝒥𝑐𝑡

𝑊𝑗′ 𝑐′ 𝑡 (𝑎)𝐺 𝑗′ 𝑐 (𝑎)𝜃𝑗· 𝐺 𝑗𝑐 (𝑎) 𝛽𝑤 /𝜌𝑤  𝜌𝑤 /𝛽𝑤 𝛽𝑤

 𝛽𝑤 /𝜌𝑤  𝜌𝑤 /𝛽𝑤 𝛽𝑤 Í·𝑗 ′ ∈𝒥𝑐𝑡Ξ𝑐 · 𝑧 𝑗′ 𝑎𝜃 𝑗′

· 𝐺 𝑗′ 𝑐 (𝑎) 𝜌𝛽𝑤. (E.10)𝑤

This labor supply shifter deviates from the counterpart in Lamadon et al. (2022) in the sense that the setof firms in each city, 𝒥𝑐𝑡 , varies over time. As I will show soon, the changes in the composition of firms in
the city correlate with the city productivity shock and may cause bias of the passthrough parameter. With
the expression of 𝜅ˆ 𝑐𝑡 (𝑎), we can rewrite firm wage bill 𝐸 𝑗𝑐𝑡 as:

𝐸 𝑗𝑐𝑡 = 𝜒𝑟 𝑐𝑡

𝛼
𝛼−1



𝛼



𝛼
𝛼−1

𝜇
𝐴 𝑐 𝐴ˆ 𝑐𝑡 𝐿 𝑐𝑡 · 𝑧 𝑗 𝑧ˆ 𝑗𝑡𝜇= 𝜒𝑟 𝑐𝑡 𝛼−1 𝐴 𝑐 𝐴ˆ 𝑐𝑡 𝐿 𝑐𝑡 · 𝑧 𝑗 𝑧ˆ 𝑗𝑡= 𝜒𝑟 𝑐𝑡 1+𝛽𝑤 /𝜌𝑤 ∫ 𝑎 𝜃𝑗 1+𝛽𝑤 /𝜌𝑤𝑎 1+𝛽𝑤· 𝑧 𝑗 𝑧ˆ 𝑗𝑡

 1+𝛽𝑤 /𝜌𝑤𝑎ˆ 𝑖𝑡 𝜅 𝑗𝑐𝑡 (𝑎)𝑑𝑎· (𝑟 𝑐𝑡 )−𝜂𝛽𝑤

∫ 

𝑎 𝜃𝑗

 1+𝛽𝑤 /𝜌𝑤𝑎 1+𝛽𝑤𝜇
𝐴 𝑐 𝐴ˆ 𝑐𝑡 𝐿 𝑐𝑡 · 𝑧 𝑗 𝑧ˆ 𝑗𝑡·

𝑧 𝑗 𝑧ˆ 𝑗𝑡
𝜇 −𝛽 𝑤𝛼 1+𝛽𝑤 /𝜌𝑤

where I define 𝜙ˆ 𝑗𝑐𝑡 ≡ 𝜙 𝑗𝑐𝑡 · 𝑟 𝑐𝑡 𝛼−1 𝐴 𝑐 𝐴ˆ 𝑐𝑡 𝐿 𝑐𝑡

∫

 𝛽𝑤

𝐺 𝑗𝑐 (𝑎) 𝜌𝑤 · 𝜅ˆ 𝑐𝑡 (𝑎)𝑑𝑎 (E.11)· (𝑟 𝑐𝑡 )−𝜂𝛽𝑤 𝜙ˆ 𝑗𝑐𝑡𝑎 𝜃𝑗 1+𝛽𝑤 /𝜌𝑤

 𝛽𝑤

𝐺 𝑗𝑐 (𝑎) 𝜌𝑤 · 𝜅ˆ 𝑐𝑡 (𝑎)𝑑𝑎. Another time-varying
term to derive for the passthrough equations is the time-varying city average wage bill, 𝐸¯ 𝑐𝑡 , of the firms in=𝑎the stayers sample, which is the sum of wage bills, 𝐸 𝑗𝑐𝑡 , of these firms in city 𝑐:
𝐸¯ 𝑐𝑡 ==

1
|𝒥𝑐𝑆 |
1|𝒥𝑐𝑆 |

Õ

𝐸 𝑗𝑐𝑡

𝑗∈𝒥𝑐𝑆

Õ

𝜒

1+𝛽 𝑤 /𝜌𝑤𝛼𝜇
· 𝐴 𝑐 𝐴ˆ 𝑐𝑡 𝐿 𝑐𝑡 𝑟 𝑐𝑡𝛼−1· (𝑟 𝑐𝑡 )−𝜂𝛽𝑤 · 𝑧 𝑗 𝑧ˆ 𝑗𝑡

 1+𝛽𝑤 /𝜌𝑤· 𝜙ˆ 𝑗𝑐𝑡(E.12)𝑗∈𝒥𝑐𝑆𝛼𝜇𝜒 1+𝛽𝑤 /𝜌𝑤 · 𝐴 𝑐 𝐴ˆ 𝑐𝑡 𝐿 𝑐𝑡 𝑟 𝑐𝑡𝛼−1= 1+𝛽𝑤

 1+𝛽𝑤(𝑟 𝑐𝑡 )−𝜂𝛽𝑤· 𝜙ˆ 𝑐𝑡|𝒥𝑐𝑆 |

Í
1+𝛽 𝑤 /𝜌𝑤 ˆ
where I denote 𝒥𝑐𝑆 as the set of firms in the stayer sample of city 𝑐 and define 𝜙ˆ 𝑐𝑡 ≡ 𝑗∈𝒥𝑐𝑆 𝑧 𝑗· 𝜙 𝑗𝑐𝑡
as the city average wage bill shifter for firms in the stayer sample. We can then obtain the residualized firm
71

wage bill as:𝐸ˆ 𝑗𝑡 =𝐸 𝑗𝑡
 1+𝛽𝑤 /𝜌𝑤 𝜙ˆ 𝑗𝑐𝑡= |𝒥𝑐𝑆 | · 𝑧 𝑗 𝑧ˆ 𝑗𝑡
·
.
𝐸¯ 𝑐𝑡
𝜙ˆ 𝑐𝑡

(E.13)

I can now derive the passthrough equations (5.7) and (5.8) using (E.6), (E.7), (E.12) and (E.13). Taking
log and first differences of (E.7) and (E.13) and plugging in the measurement error 𝑒 𝑗𝑡 , we have the net
passthrough equation as:
ˆ 𝑖𝑗𝑡 = 𝛿 𝑤 Δ log 𝐸¤̂ 𝑗𝑡 + Δ 𝑎ˆ 𝑖𝑡 + 𝛿 𝑤
Δ log 𝑊𝜙ˆ 𝑗𝑐𝑡Δ𝑒 𝑗𝑡 − Δ log
𝜙ˆ 𝑐𝑡!
(E.14)

where 𝛿 𝑤 ≡ 1+𝛽𝑤1 /𝜌𝑤 . There are three residual terms in the net passthrough equation (E.14), that are changes
in the 𝑖.𝑖.𝑑. skill transient shock Δ𝑎 𝑖𝑡 , changes in the firm wage bill measurement error Δ𝑒 𝑗𝑡 , and changes in
the relative wage bill shifter Δ log( 𝜙ˆ 𝑗𝑐𝑡 / 𝜙ˆ 𝑐𝑡 ). The last term appears due to changes in the set of firms in thecity 𝑐, which affects competition for workers through the wage index, 𝑊𝑐 (𝑎), and thus the labor supply
curve faced by firms. The potential correlation of the net wage bill shock with the measurement error andwith the relative wage bill shifter gives rise to two endogeneity concerns.
To deal with the first concern, I follow Lamadon et al. (2022) to instrument the net wage bill shocklog Δ𝐸¤̂ 𝑗𝑡 with its lags before year 𝑡 − 𝑞 − 1. These lagged shocks are correlated with the current shock
because the productivity shock 𝑧ˆ 𝑗𝑡 , assumed to follow a Markov process, is persistent. In addition, changes
in the measurement error, Δ𝑒 𝑗𝑡 , depends only on measurement error shocks 𝑢 𝑗𝑡𝑒 in {𝑡 − 𝑞 − 1, .., 𝑡}. Thus,
lagged residualized firm wage bill shocks before year 𝑡 − 𝑞 − 1 are orthogonal to Δ𝑒 𝑗𝑡 , making them valid
instruments.
To deal with the second concern, I use the control function
approachfollowing Doraszelski and Jauman𝑁ˆ 𝑖𝑗𝑡−1 , log 𝐸¤̂ 𝑗𝑡−1 )+dreu (2018). Specifically, I assume log( 𝜙ˆ 𝑗𝑐𝑡 /𝜙ˆ 𝑐𝑡 ) = 𝐹 log( 𝜙ˆ 𝑗𝑐𝑡−1 /𝜙ˆ 𝑐𝑡−1 ) + 𝜖 𝑁 = 𝐻 𝑁 (log 𝑊𝑗𝑐𝑡

𝜖𝑁, where 𝜖 𝑁
is an 𝑖.𝑖.𝑑. innovation.
𝑗𝑐𝑡
𝑗𝑐𝑡

The first part of the equation relates the current relative shifterwith its lag, as all the shocks that generate changes in log( 𝜙ˆ 𝑗𝑐𝑡 /𝜙ˆ 𝑐𝑡 ) follow Markov processes; the secondˆ 𝑖𝑗𝑡−1 and log 𝐸¤̂ 𝑗𝑡−1 , using equation
half says the unobserved log(𝜙ˆ 𝑗𝑐𝑡−1 /𝜙ˆ 𝑐𝑡−1 ) can be inferred from log 𝑊(E.14) at 𝑡 − 1. When 𝐹 𝑁 (·) is a linear function,
the first difference of the relative shifter can be written

𝑁
ˆ
ˆ
ˆ
ˆ
ˆ 𝑖𝑗𝑡−1 , Δ log 𝐸¤̂ 𝑗𝑡−1 ) + Δ𝜖 𝑁 . In practice, I
as Δ log( 𝜙 𝑗𝑐𝑡 /𝜙 𝑐𝑡 ) = 𝐹 Δ log( 𝜙 𝑗𝑐𝑡−1 /𝜙 𝑐𝑡−1 ) + Δ𝜖 𝑁
= 𝐻 𝑁 (Δ log 𝑊
𝑗𝑐𝑡
𝑗𝑐𝑡
control for 𝐻 𝑁 (·, ·) using a cubic polynomial of the two lagged first-difference terms.
1
Similarly, using equations (E.6) and (E.12) and defining the city passthrough parameter 𝛿 𝑐 ≡ 1+𝛽,I𝑤
have the mean passthrough equation as:¯ 𝑐𝑡 = 𝛿 𝑐 Δ log 𝐸¤̄ 𝑐𝑡 + 𝛿 𝑐 𝜂𝛽 𝑤 Δ log 𝑟 𝑐𝑡 + 𝛿 𝑐 Δ𝑒 𝑐𝑡 − Δ log 𝜙ˆ 𝑐𝑡 ,Δ log 𝑊

(E.15)

which can be further re-arranged as:

Δ log

¯ 𝑐𝑡
𝑊
𝜂

𝑟 𝑐𝑡

!
= 𝛿 𝑐 Δ log

𝐸¤̄ 𝑐𝑡

!

𝜂

𝑟 𝑐𝑡





+ 𝛿 𝑐 Δ𝑒 𝑐𝑡 − Δ log 𝜙ˆ 𝑐𝑡 .

(E.16)

Therefore, the city-level labor supply elasticity is identified as the passthrough of real mean wage bill72

shocks to real mean wages. The change in log city-level wage bill shifter enters the equation as a structuralresidual, as long as the measurement error of 𝐸¤̄ 𝑐𝑡 . I assume that 𝑒 𝑐𝑡 also follows a 𝑀𝐴(𝑘)process, the same𝜂as 𝑒 𝑗𝑡 . Same as the identification of the net passthrough equation, I instrument Δ log 𝐸¤̄ 𝑐𝑡 /𝑟 using its𝑐𝑡¯ 𝑐𝑡−1 /𝑟 𝜂lags before year 𝑡 − 𝑞 − 1 and control for the two lagged first-differenced terms, Δ log 𝑊
and
𝑐𝑡−1





𝜂
Δ log 𝐸¤̄ 𝑐𝑡−1 /𝑟 𝑐𝑡−1 .



E.3



Firm sorting elasticity

The method of identifying the firm sorting elasticity 𝛽 𝑓 is similar to the worker elasticities. First, I havemean firm wage bill for stayers firms in city 𝑐, year 𝑡 from equation (E.12) as:𝛼𝜇𝜒 1+𝛽𝑤 /𝜌𝑤 𝐴 𝑐 𝐴ˆ 𝑐𝑡 𝐿 𝑐𝑡 𝑟 𝑐𝑡𝛼−1𝐸¯ 𝑐𝑡 =

 1+𝛽𝑤(𝑟 𝑐𝑡 )−𝜂𝛽𝑤|𝒥𝑐𝑆 |· 𝜙ˆ 𝑐𝑡 .

(E.17)

Then, I derive the total firm wage bill in city 𝑐, year 𝑡 by summing up total firm wage bills by cluster 𝑘:
𝐸 𝑐𝑡 =

Õ𝐽𝑘𝑐𝑡 · 𝐸¯ 𝑘𝑐𝑡𝑘 1+𝛽 𝑓
 1+𝛽𝑤 /𝜌𝑤
1
𝜇
−𝜂𝛽
𝑤
=
· 𝜒𝑟 𝑐𝑡 𝐴 𝑐 𝐴ˆ 𝑐𝑡 𝐿 𝑐𝑡 𝑧 𝑘· 𝜙ˆ 𝑘𝑐𝑡
𝐽𝑘 · Í 𝛽(𝑟 𝑐𝑡 )
¯ 𝑓𝑘
𝑐 𝐸 𝑘𝑐𝑡



Õ
𝛼
1
1+𝛽 𝑤 /𝜌𝑤 1+𝛽 𝑓𝜇 (1+𝛽 𝑓 )(1+𝛽 𝑤 /𝜌𝑤 )−𝜂𝛽 𝑤 (1+𝛽 𝑓 )𝛼−1ˆˆ𝐽𝑘 · Í 𝛽= 𝜒 · 𝑟 𝑐𝑡 𝐴 𝑐 𝐴 𝑐𝑡 𝐿 𝑐𝑡
𝜙 𝑘𝑐𝑡 𝑧 𝑘·(𝑟 𝑐𝑡 )
¯ 𝑓𝑘
𝑐 𝐸 𝑘𝑐𝑡
Õ 

𝛼
𝛼−1

𝛼

𝜇
= 𝜒 · 𝑟 𝑐𝑡𝛼−1 𝐴 𝑐 𝐴ˆ 𝑐𝑡 𝐿 𝑐𝑡where I define Φ̂𝑐𝑡 ≡Í ˆ𝑘 (1+𝛽 𝑓 )(1+𝛽𝑤 /𝜌𝑤 )
1+𝛽 𝑤 /𝜌𝑤 1+𝛽 𝑓

𝜙 𝑘𝑐𝑡 𝑧 𝑘

(E.18)(𝑟 𝑐𝑡 )−𝜂𝛽𝑤 (1+𝛽 𝑓 ) · Φ̂𝑐𝑡

𝐽𝑘 · Í 1 𝛽 𝑓 . The second line of the above equation makes uses of¯

𝑐 𝐸 𝑘𝑐𝑡

two properties of the model. First, firm profit is proportional to wage bill, as shown in equations (E.3) and(E.2). Hence, choosing a city based on profits is equivalent to choosing a city based on wage bills. Second,firms in the same cluster have the same probability of choosing a city.
Combining equations (E.17) and (E.18) and introducing a measurement error of 𝐸¯ 𝑐𝑡 , I can obtain thefollowing passthrough equation for firms:
Δ log 𝐸¤̄ 𝑐𝑡 = 𝛿 𝑓 Δ log 𝐸¤ 𝑐𝑡 + 𝛿 𝑓 Δ𝑒 𝑐𝑡 − Δ log

𝜙ˆ 𝑐𝑡

!
.

(E.19)

Φ̂𝑐𝑡

As before, there are endogeneity concerns due to potential correlation of Δ log 𝐸¤ 𝑐𝑡 with Δ𝑒 𝑐𝑡 and
Δ log( 𝜙ˆ 𝑐𝑡 /Φ̂𝑐𝑡 ). I follow the same strategy here as I have used for the worker passthrough equations, in that
I instrument Δ log 𝐸¤ 𝑐𝑡 with its lags before year 𝑡 − 𝑞 − 1 and control for the two lagged terms Δ log 𝐸¤̄ 𝑐𝑡−1
and Δ log 𝐸¤ 𝑐𝑡−1 .

73

E.4

Worker and firm fixed effects¯ 𝑖𝑗𝑡 (𝑎) for each individual, which relates only
I show here how I construct the adjusted log earnings log 𝑊
to the worker’s permanent skill 𝑎, transient skill shock 𝑎ˆ and firm’s productivity parameters (𝑧, 𝜃). I do soby partialling out the time-varying firm and city productivity shocks from log earnings log 𝑊𝑖𝑗𝑡 . First, toisolate the firm-productivity shock, I construct a cluster-level mean firm wage bill and cluster-residualized
firm wage bill as:60
𝐸¯ 𝑘𝑐𝑡 =1|𝒥𝑘𝑐𝑆 |

·

Õ

𝐸 𝑗𝑐𝑡

𝑗∈𝒥𝑘𝑐𝑆𝛼𝜇𝜒 1+𝛽𝑤 /𝜌𝑤 · 𝐴 𝑐 𝐴ˆ 𝑐𝑡 𝐿 𝑐𝑡 𝑟 𝑐𝑡𝛼−1=

 1+𝛽𝑤(𝑟 𝑐𝑡 )−𝜂𝛽𝑤 Õ𝒥𝑘𝑐𝑆𝛼𝜒 1+𝛽𝑤 /𝜌𝑤 · 𝐴 𝑐 𝐴ˆ 𝑐𝑡 𝐿 𝑐𝑡 𝑟 𝑐𝑡𝛼−1=

 1+𝛽𝑤(𝑟 𝑐𝑡 )−𝜂𝛽𝑤

𝒥𝑘𝑐𝑆

and

 1+𝛽𝑤 /𝜌𝑤· 𝜙ˆ 𝑗𝑐𝑡(𝑧 𝑘 )1+𝛽𝑤 /𝜌𝑤 · 𝜙ˆ 𝑘𝑐𝑡

𝐸 𝑗𝑐𝑡= (ˆ𝑧 𝑗𝑡 )1+𝛽𝑤 /𝜌𝑤 .
𝐸¯ 𝑘𝑐𝑡𝑘(𝑗)𝐸ˆ 𝑗𝑐𝑡 =(E.20)

𝑗∈𝒥𝑘𝑐𝑆𝜇

𝑧𝑗(E.21)

It can also be shown that the city-level productivity shock can be extracted from the mean city log¯ 𝑆 . Therefore, with equations (E.1), (E.21) and (E.6) and assuming that the firm
earnings of the stayers 𝑊
𝑐𝑡
and city productivity shocks have mean zero across years, we can show that¯ 𝑖𝑗𝑡 (𝑎) = log 𝑊𝑖𝑗𝑡 − 𝛿 𝑤 log 𝐸ˆ 𝑘 − log 𝐸¯ˆ 𝑘
log 𝑊
𝑗𝑐𝑡
𝑗𝑐















¯ 𝑆 − log 𝑊¯ 𝑐𝑆+ log 𝑊
𝑐𝑡



−

𝛼
log 𝑟 𝑐 − log A𝑐
𝛼−1(E.22)= log 𝑧 𝑗(𝑖,𝑡) + 𝜃 𝑗(𝑖,𝑡) log 𝑎 𝑖 + 𝑎ˆ 𝑖𝑡

E.5

Amenities

The amenities terms 𝑅 𝑐 (𝑎) and 𝐺 𝑗 (𝑎) do not change over time, so I use average worker shares acrosscities and firms and average wage indices to derive them. Using worker’s sorting probabilities specified inequation (3.3) and (3.4), we can obtain 𝛽𝑤

Λ 𝑘𝑐 (𝑎) =𝐽¯𝑐 (𝑘) 𝑧 𝑘 𝑎 𝜃𝑘 𝐺 𝑘 (𝑎) 𝜌𝑤

Í
𝑗 ′ ∈𝒥𝑐

𝜃′𝑗𝑧 𝑗′ 𝑎 𝐺 𝑘′ (𝑎) 𝜌𝛽𝑤(E.23)𝑤

60For the first iteration, I will cluster firms directly using observed log earnings log 𝑊𝑖𝑗𝑡 (𝑎). For other iterations, I will use theclassification from the previous iteration.

74"Λ𝑐 (𝑎) =𝛼−𝜂𝑅 𝑐 (𝑎)¯𝑟 𝑐 · A𝑐 𝑟 𝑐𝛼−1Í𝑧 𝑗 𝑎 𝜃𝑗 𝐺 𝑘 (𝑎)

𝑗∈𝒥𝑐

# 𝛽𝑤

 𝜌𝛽𝑤𝑤 𝜌𝑤 /𝛽𝑤(E.24)𝛽𝑤!
 𝜌𝛽𝑤 𝜌𝑤 /𝛽𝑤 
𝛼
Í 
Í
′
𝑤
𝜃
−𝜂
𝑗

𝑟 𝑐′ · A𝑐′ 𝑟 𝑐𝛼−1′
𝑐 ′ 𝑅 𝑐 ′ (𝑎)¯
𝑗 ′ ∈𝒥𝑐′ 𝑧 𝑗 ′ 𝑎 𝐺 𝑘 ′ (𝑎)






where Λ 𝑘𝑐 (𝑎) is the average share of skill-𝑎 workers in cluster-𝑘 firms, conditional on living in city 𝑐; Λ𝑐 (𝑎)is the average share of skill-𝑎 workers in city 𝑐; and 𝐽𝑘𝑐 is the average number of cluster-𝑘 firms in city𝑐. Within the same skill 𝑎, multiplying the amenity terms with any constant will not change workers’
allocation to cities and firms. Thus, I am allowed to impose a normalization for every worker skill 𝑎, that is𝛽𝜌𝑤 /𝛽 𝑤  𝑤
𝛽𝑤



Õ 
Õ
𝛼
𝜌𝑤 ª
−𝜂
©

𝑧 𝑗 𝑎 𝜃𝑗 𝐺 𝑘 (𝑎)𝑅 𝑐 (𝑎)¯𝑟 𝑐 · A𝑐 𝑟 𝑐𝛼−1 ­®
 = 1.


𝑐 
𝑗∈𝒥𝑐

«
¬



(E.25)

Plugging the normalization into the two sorting shares given by equations (E.23) and (E.24) gives:

Λ 𝑘𝑐 (𝑎)𝜌𝑤
𝛽𝑤

Λ𝑐 (𝑎)

1
𝛽𝑤

𝛼
−𝜂
©
= 𝑅 𝑐 (𝑎)¯𝑟 𝑐 · A𝑐 𝑟 𝑐𝛼−1 ­Õ𝜃𝑘𝑧 𝑘 𝑎 𝐺 𝑘 (𝑎)

 𝜌𝛽𝑤
𝑤

« 𝑗∈𝒥𝑐𝛽𝑤

𝐽¯𝑐 (𝑘) 𝜌𝑤 𝑧 𝑘 𝑎 𝜃𝑘 𝐺 𝑘 (𝑎)

· 

Í

𝑗∈𝒥𝑐

𝑧 𝑘 𝑎 𝜃𝑘 𝐺 𝑘 (𝑎) 𝜌𝛽𝑤 𝜌𝑤 /𝛽𝑤
𝑤(E.26)𝛽𝑤𝛼−𝜂𝜌𝑤 /𝛽 𝑤ª®
¬= 𝑟¯𝑐 · A𝑐 𝑟 𝑐𝛼−1 𝑧 𝑘 𝑎 𝜃𝑘 · 𝐽¯𝑐 (𝑘) 𝜌𝑤 · 𝑅 𝑐 (𝑎)𝐺 𝑘 (𝑎)and it can be rewritten as𝜂𝑅 𝑐 (𝑎) · 𝐺 𝑘 (𝑎) =

E.6

𝑟¯𝑐

𝛽𝑤

𝜌𝑤

1

· 𝐽¯𝑐 (𝑘) 𝜌𝑤 · Λ 𝑘𝑐 (𝑎) 𝛽𝑤 Λ𝑐 (𝑎) 𝛽𝑤 .

𝛼
𝛼−1A𝑐 𝑟 𝑐 𝑧 𝑘 𝑎 𝜃𝑘

(E.27)

City composite productivity
From equation (E.3), I can obtain a cluster-𝑘 firm’s average profits in city 𝑐 over time as



𝛼



𝜋¯ 𝑐 (𝑘) = Ψ · A𝑐 𝑟¯𝑐 𝛼−1 · (𝑧 𝑘 )1+𝛽𝑤 /𝜌𝑤 · 𝜙 𝑘𝑐
where
𝜙 𝑘𝑐 =

∫ 
𝑎

𝑎

𝜃𝑘

 1+𝛽𝑤 /𝜌𝑤

𝐺 𝑘 (𝑎)𝛽𝑤 /𝜌𝑤

𝐿 𝑐 (𝑎) ·Í𝑗 ′ ∈𝒥𝑐𝑧 𝑗′ 𝑎

𝜃 𝑗′· 𝐺 𝑗′ 𝑐 (𝑎)(E.28)

 𝜌𝛽𝑤 𝑑𝑎.

(E.29)𝑤

We can see that a cluster 𝑘 firm’s profit in city 𝑐 is determined by rent-adjusted city composite
𝛼productivity, A𝑐 𝑟¯𝑐𝛼−1 , firm productivity 𝑧 𝑘 and a labor composite term 𝜙 𝑘𝑐 , which summarizes the skillspecific labor supply conditions and labor market competitiveness by city. This labor composite term thus
informs the expected total efficiency unit of labor that the firm can hire in the city. With the estimates oflabor supply parameters (𝛽 𝑤 , 𝜌𝑤 ), worker skill 𝑎, firm production parameters (𝑧, 𝜃) and amenity parameters
𝐺 𝑘 (𝑎), I can construct 𝜙 𝑘𝑐 for each city-cluster pair. I can then plug equations (E.28) and (E.29) into (3.12),75

and obtain a relationship between average firm sorting shares over time 𝑝 𝑐 (𝑘), city productivity terms
A𝑐 𝑟¯/(𝛼−1) , and the labor composites 𝜙 𝑘𝑐 , which is given by:𝑝 𝑐 (𝑘) = Í𝜋¯ 𝑐 (𝑘)𝛽 𝑓𝑐′𝜋¯ 𝑐′ (𝑘)𝛽 𝑓𝛽𝑓
𝛼
A𝑐 𝑟¯𝑐 𝛼−1 · 𝜙 𝑘𝑐
=

𝛽𝑓 .
Í 
𝛼
𝛼−1
A𝑐′ 𝑟¯𝑐′· 𝜙 𝑘𝑐′𝑐′(E.30)The key intuition here is that firm productivity 𝑧 𝑘 does not affect its location decision as it can be carried
to all locations. I can calculate the sorting shares 𝑝 𝑐 (𝑘) from the data, once all firms are grouped into
clusters. The firm sorting elasticity 𝛽 𝑓 has been estimated in Section E.3. City average housing rents 𝑟¯𝑐 areobserved and the housing share 𝛼 is calibrated to be 0.06. Therefore, the equation above gives 𝐾 × 𝐶 firm
sorting equations to identify 𝐶 city composite productivity parameters, with one free normalization.

E.7

Agglomeration elasticity
Taking the log of the city composite productivity yields the estimating equation:log A𝑐 = 𝐴0 + 𝜇 log 𝐿¯ 𝑐 + 𝜖 𝐴𝑐(E.31)

where 𝐴0 is the intercept reflecting the normalization of exogenous city productivity parameters, and 𝜖 𝐴
𝑐is the error term that captures the exogenous city productivity 𝐴 𝑐 . An OLS estimate of the parameter 𝜇
is biased if city population is correlated with its exogenous productivity. To obtain a causal estimate, I
construct the immigration-based instrument as follows:
𝐼𝑉𝑐𝐿 =

Õ Í𝑡=2002 𝐼 𝑀 𝑀 𝑜,𝑐,𝑡𝑡=1980𝑜

𝐿 𝑐,2002· log 𝐼 𝑀ˆ𝑀 𝑜(E.32)

where 𝑜 denotes the origin country of immigrants, 𝐼 𝑀 𝑀 𝑜,𝑐,𝑡 is the number of immigrants from origin
country 𝑜, landing in city 𝑐 in year 𝑡, and 𝐼 𝑀ˆ𝑀 𝑜 is the total number of immigrants of origin country 𝑜arriving in Canada since 2002. This is a shift-share style instrument. Ideally, I would construct the shareterm as the city population share of immigrants from each origin country at a base year. However, the
IMDB data, as part of CEEDD, only has information on immigrants who landed in Canada since 1980.
Nevertheless, the ratio of accumulated counts of arriving immigrants since 1980 to city population in 2002
should be strongly correlated with the share of residing immigrants in each city and thus reflects each city’s
exposure to future immigration. This instrument is correlated with the endogenous variable as migrant
inflows increase city population. The identification assumption is that the total number of immigrants
by origin country 𝐼 𝑀ˆ𝑀 𝑜 , namely the shift terms in the shift-share instrument, is orthogonal to city-level
exogenous productivity (Borusyak et al., 2022).

76

E.8

Housing supply parameters

Equating housing supply with demand given by equations (B.13) and (B.14), we have the following
relationship, with 𝛾𝑐 as the inverse housing supply elasticity of city c:
1
0
𝛾
𝑆
𝐻𝑐𝑡
(𝑟 𝑐𝑡 ) = 𝐻 𝑐 · 𝑟 𝑐𝑡𝑐 =

𝛼 1 + 𝛽 𝑤 /𝜌𝑤 𝐸 𝑐𝑡
= 𝐻𝑐𝐷 (𝑟 𝑐𝑡 ) .
𝜏𝜂 +1 − 𝛼 𝛽 𝑤 /𝜌𝑤
𝑟 𝑐𝑡

(E.33)

0
Recall that 𝐻 𝑐 ≡ (1 + 𝛾𝑐 )−1/𝛾𝑐 · 𝐻¯ 𝑐 (1+𝛾𝑐 )/𝛾𝑐 is a city-specific parameter governing the level of housing
supply. Re-arranging the equation, we have:
1+𝛾𝑐
𝛾𝑐

𝑟 𝑐𝑡

1
𝛼 1 + 𝛽 𝑤 /𝜌𝑤
𝐸 𝑐𝑡 = 0 · 𝐸𝐻𝑐𝑡
= 0 · 𝜏𝜂 +1 − 𝛼 𝛽 𝑤 /𝜌𝑤
𝐻𝑐
𝐻𝑐
1





(E.34)

where I define 𝐸𝐻𝑐𝑡 as the total expenditure on housing in city 𝑐 in year 𝑡. Taking the log and the difference
over time, we have an estimating equation:𝑟Δlog 𝑟 𝑐𝑡 = Γ𝑐 Δ log 𝐸𝐻𝑐𝑡 + Δ𝑒 𝑐𝑡(E.35)

𝛾𝑟
where Γ ≡ 1+𝛾𝑐 𝑐 is the parameter of interest and 𝑒 𝑐𝑡
represents the measurement error of observed housing
rents. This equation relates changes in the housing rent to changes in the housing expenditure. Following
Saiz (2010), I assume that the housing supply elasticity is affected by the share of land unavailable forhousing development in each city, denoted as 𝑈 𝑁 𝐴𝑉 𝐴𝐿 𝑐 , and parameterize Γ𝑐 as a function of this share,
i.e. Γ𝑐 = Γ + Γ𝐿 𝑈 𝑁 𝐴𝑉 𝐴𝐿 𝑐 . The equation above then becomes𝑟Δlog 𝑟 𝑐𝑡 = (Γ + Γ𝐿 𝑈 𝑁 𝐴𝑉 𝐴𝐿 𝑐 ) Δ log 𝐸𝐻𝑐𝑡 + Δ𝑒 𝑐𝑡.

(E.36)

City-level housing rent and housing expenditure changes may be due to unobserved labor and housing
market shocks. To deal with the endogeneity concerns, I follow Diamond (2016) to instrument Δ log 𝐸𝐻𝑐𝑡
using a shift-share Bartik IV. Specifically, the instrument is constructed as:
𝐼𝑉𝑐𝐸𝐻 =

Õ 𝐿 𝑐,𝑖𝑛𝑑,2002
𝑖𝑛𝑑

𝐿 𝑐,2002

× Δ log 𝑤𝑎 𝑔𝑒 𝑖𝑛𝑑(E.37)

which is a base-year industry employment share weighted sum of national wage increases by industry.
0Γ𝑐
The inverse housing supply elasticity parameter can then be recovered as 𝛾𝑐 = 1−Γ. I choose 𝐻 𝑐 to fit𝑐the average housing rent of each city, according to equation (E.34). The identification assumption here isthat industrial-level wage changes in the entire country are orthogonal to city-level unobserved labor andhousing market shocks.

Appendix F
F.1

Model extensions

Endogenous amenity
Diamond (2016) shows that endogenous amenity is a key mechanism for the fact that high-skilled77

workers increasingly concentrate in high-wage, high-rent cities. I incorporate this mechanism in my modelin a reduced-form way following Fajgelbaum and Gaubert (2020). Suppose that skill-specific amenity 𝑅 𝑐 (𝑎)contains an exogenous part 𝑅¯ 𝑐 (𝑎) and an endogenous part determined by the local skill composition:
𝑅 𝑐 (𝑎) = 𝑅¯ 𝑐 (𝑎) · 𝐿 𝑐 (𝐻)𝛾𝐻𝐻 𝐿 𝑐 (𝐿)𝛾𝐿𝐻 , 𝑎 ∈ 𝐻(F.1)

𝑅 𝑐 (𝑎) = 𝑅¯ 𝑐 (𝑎) · 𝐿 𝑐 (𝐻)𝛾𝐻𝐿 𝐿 𝑐 (𝐿)𝛾𝐿𝐿 , 𝑎 ∈ 𝐿

where I define 𝐻 and 𝐿 as the high- and low-skilled groups depending on worker skill 𝑎, 𝐿 𝑐 (𝐻) and𝐿 𝑐 (𝐿) are the numbers of high- and low-skilled workers in city 𝑐, and the four 𝛾 parameters, 𝛾 𝑔 𝑔′ , are theamenity spillover elasticities from skill group 𝑔 to 𝑔 ′. In the quantitative model with this extension, I define
high-skilled workers as those with skill 𝑎 in the top three deciles, low-skilled workers as those with skill 𝑎in the bottom seven deciles, and calibrate these parameters following Fajgelbaum and Gaubert (2020) as
𝛾𝐻𝐻 = 0.77, 𝛾𝐿𝐻 = −1.24, 𝛾𝐻𝐿 = 0.18, 𝛾𝐿𝐿 = −0.43.

F.2

Free entry

I assume in the baseline model that there is a fixed measure of firms that make location decisions. The
model can be extended to have free entry of firms at the national level. Suppose each entrepreneur 𝑗 has topay a fixed cost 𝑐 𝑒 , denominated in the final good, to draw her production technology (𝑧, 𝜃) and amenities{𝐺(𝑎)}∀𝑎 from a known distribution ℋ . Then, the free entry condition can be written as equating the
expected utility of an entrepreneur if she enters the economy to the utility of consuming 𝑐 𝑒 units of the
final good:
"
!#

Õ
1
𝜋 𝑐 (𝑗)𝛽 𝑓
log
𝛽𝑓
𝑐

Eℋ (Π(𝑗)) = Eℋ

+ 𝐶¯ 𝑓 = log 𝑐 𝑒(F.2)

where 𝐶¯ 𝑓 is an unrecoverable constant from aggregating the Type-I Extreme Value distributed preference
shocks.

F.3

Remote work

Labor market. Assuming that a share of workers can work remotely - that is, they can choose to work
for a firm in city 𝑖 while living in 𝑖 ′. In other words, these remote workers can be matched to firms that areoutside their residence locations. The labor supply curve of such workers can be written as
𝑆 𝑅𝑗𝑐

𝑅

𝑊𝑗𝑐 (𝑎), 𝑎 = 𝐿 (𝑎) · Í Í𝑐𝑊𝑗𝑐 (𝑎) · 𝐺 𝑗𝑐 (𝑎)𝑗∈𝒥𝑐 𝛽𝑤 /𝜌𝑤

𝑊𝑗𝑐 (𝑎) · 𝐺 𝑗𝑐 (𝑎) 𝛽𝑤 /𝜌𝑤

where 𝐿𝑅 (𝑎) is the measure of skill-𝑎remote workers. The labor supply curve of on-site workers is𝑂𝑆𝑂
𝑗𝑐 𝑊𝑗𝑐 (𝑎), 𝑎 = 𝐿 𝑐 (𝑎) · Í

𝑊𝑗𝑐 (𝑎) · 𝐺 𝑗𝑐 (𝑎)



𝑗∈𝒥𝑐

 𝛽𝑤 /𝜌𝑤

𝑊𝑗𝑐 (𝑎) · 𝐺 𝑗𝑐 (𝑎) 𝛽𝑤 /𝜌𝑤

where 𝐿𝑂𝑐 (𝑎) is the measure of skill-𝑎on-site workers in city 𝑐. They post skill-specific wages to hire both
remote and on-site workers,
𝐷 𝑗𝑐 (𝑊 , 𝑎) = 𝑆 𝑅𝑗𝑐 (𝑊 , 𝑎) + 𝑆 𝑂
𝑗𝑐 (𝑊 , 𝑎)78

I assume that firms are infinitesimal in both on-site and remote labor markets. Consequently, firms
charge a constant markdown under the marginal product of labor from both remote and on-site workers.
Then, firms’ optimal profits can be re-written as:𝛼

𝜋 𝑗𝑐 = Ψ · 𝑟 𝑐𝛼−1 · 𝑄 𝑅𝑗𝑐 + 𝑄 𝑂
𝑗𝑐

where 𝑄 𝑅𝑗𝑐 and 𝑄 𝑂
are the total efficiency units of remote and on-site labor. I assume that remote workers
𝑗𝑐
contribute to the agglomeration spillovers in their residence city.
Location choice. On-site workers choose locations in the same way as equation (3.4). Remote workers
choose locations in only based on local amenities and costs of living𝐿𝑅𝑐 (𝑎) = 𝐿𝑅 (𝑎)

Í 
𝑐


−𝜂 𝛽 𝑤

𝑅 𝑐 (𝑎) 𝑟 𝑐−𝜂 𝛽 𝑤
𝑅 𝑐 (𝑎) 𝑟 𝑐.

In the short run, I assume that firms’ locations are fixed as in the benchmark equilibrium. In the longrun, firms can adjust their locations in response to the shifts in the labor market.

Appendix G

Shapley value

In the counterfactual exercises studied in Section 6.1.1, I use the Shapley value approach to decompose
the contribution of different sources of variation to equilibrium spatial sorting and inequality outcomes.
𝑁
Here, I formally discuss this approach. Let Ω = ∪𝑛=1
𝜔𝑛 denote a vector of estimated model parameters,
where each 𝜔𝑛 is a parameter that affects the equilibrium outcome of interest; let 𝑋(Ω) denote the valueof the equilibrium outcome 𝑋 using the parameter vector Ω. I compute values of equilibrium outcome
𝑋 using counterfactual values 𝜔ˆ 𝑛 and use these to evaluate the contribution of each parameter 𝜔𝑛 . Let
𝒩 = {1, 2, . . . , 𝑁 } and then let Ω̂𝑆 = {∪𝑛∈𝑆 𝜔ˆ 𝑛 } ∪ {∪𝑛∉𝑆 𝜔𝑛 } denote the parameter vector with counterfactual
values for the parameter subset 𝑆 ⊆ 𝑁. The Shapley value 𝑋𝑛 for parameter 𝜔𝑛 in relation to outcome 𝑋 is
defined as iÕ |𝑆|!(𝑁! − |𝑆|! − 1) h 
𝑋𝑛 =𝑋 Ω̂𝑆∪{𝑛} − 𝑋 Ω̂𝑆 .
𝑁!
𝑆⊆𝒩\{𝑛}𝑋𝑛
Then, the contribution of parameter 𝜔𝑛 to outcome 𝑋 is 𝑋(Ω), which by construction sum to one acrossall 𝑛 ∈ 𝒩.

When implementing the method, I set the counterfactual values as follows. For the city-characteristics
parameters, I set 𝐴ˆ 𝑐 = 1, 𝜇ˆ = 0, and 𝛼ˆ = 0 to eliminate variations that come from exogenous citycharacteristics
and endogenous
population and housing rents. For amenity parameters, I set 𝑅ˆ 𝑐 (𝑎) = 𝑅ˆ 𝑐 =
Í
Í Í
𝐿
(𝑎)𝑅
(𝑎)
𝐷 (𝑎)𝐺 (𝑎)𝑐𝑐𝑎and 𝐺ˆ 𝑘 (𝑎) = 𝐺ˆ 𝑘 = 𝑐 Í 𝑎Í 𝑘𝑐𝐷 (𝑎)𝑘 . Intuitively, these counterfactual values eliminate the variation
𝐿 𝑐 (𝑎)𝑐𝑎 𝑘𝑐
of city and firm amenities for different skilled workers, while preserving the average amenities of all cities
and firms. For the skill-augmenting
parameters, I set their counterfactual values as the weighted average ofÍ𝑘 𝐽(𝑘)𝜃 𝑘ˆˆÍ
all firms, i.e. 𝜃𝑘 = 𝜃 =
.
𝐽(𝑘)
𝑘

79

Appendix H
H.1

Additional Counterfactual Analysis

Housing supply regulation

Lastly, I conduct a counterfactual experiment where I increase the housing supply elasticity of the fivehighest-earning cities by 25%. Such policies have been advocated by the literature as an effective approachto promote housing affordability and reduce spatial misallocation (e.g. Hsieh and Moretti (2019)). The
result is shown in I.16. I evaluate this policy in four models, including the full model (Column (1)), themodel with no worker heterogeneity (Column (2)), the model with no firm heterogeneity (Column (3)), andthe model with neither worker nor firm heterogeneity (Column (4)). The three limited or no heterogeneity
models are re-estimated to fit the data, with the no heterogeneity model akin to the assumptions made in
Hsieh and Moretti (2019).
Total output rises in all four models as the policy can 1) induce movements of workers and firms into
more productive cities and 2) increase the supply of commercial floor spaces which are inputs for the
good-producing firms. Comparing the four columns, however, it can be seen that the full model predicts thesmallest output gains. This is because after accounting for worker and firm heterogeneity, the importanceof city fundamentals in driving the productive advantage of a region is small, as can be seen in Table 4.
Hence, the benefits from spatial reallocation are smaller than the benefits predicted by the simplified modelwith one-sided or no heterogeneity. The results of welfare changes align with this intuition, as well. This
comparison, once again, emphasizes the importance of accounting for the heterogeneity of workers andfirms when evaluating place-based policies.

H.2

Universal Basic Income (UBI)

There has been heated debate in the Canadian public policy sphere on the Universal Basic Income (UBI)
transfer program. It has been advocated as an effective policy tool to reduce poverty and income inequality.
There have been pilot programs implemented in various provinces, including Ontario and Quebec. I use
the model to study the spatial consequences of a UBI transfer of $1,000 Canadian dollars to all individuals,
which is about 2% of average earnings during the sample period. I assume that the transfers are financedby flat labor income taxes of all workers. The results are shown in Table I.17.
Two stark results stand out in Column (1). First, the UBI program goes a long way towards improvingsocial welfare, by transferring from high-skill workers to low-income workers. Second, an unintended
consequence of the program is that it will exacerbate spatial inequality with mobile workers and firms.
This is because the unconditional transfer increases the purchasing power by more in low-rent, yet
low-productive, cities. This income effect is stronger for low-skilled than high-skilled workers, thus
incentivizing more low-skilled workers to relocate to these places. It can be seen from the changes in lowand high-skilled populations in low-wage cities in the table. Moreover, low-productive firms spatiallyfollow low-skilled workers, which further worsens their employment opportunities. Such relocation causes
more spatial skill segregation and income inequality. The aggregate and distributional effects are muchsmaller in the model without worker heterogeneity, as shown in Column (2).
The spatial consequences of UBI are much muted in limited sorting model scenarios, as shown inColumns (3)-(4). Without worker mobility, the policy has little effect on spatial inequality, while delivering80its goal of decreasing income inequality. With only worker re-sorting, the spatial outcomes are also smaller
compared to the full model. Fewer workers re-locate to low-wage cities and spatial inequality increases byless. The additional modeling features, shown in Columns (6)-(8), do not change the results by much.

81

Appendix I

Additional Tables and Figures
Table I.1: Summary statistics
2002-2009

Sample2010-2017

Baseline

Stayers

MoversBaseline

Stayers

MoversNumber of Observations
Worker-Years (in 1,000)
Workers (in 1,000)
Firms (in 1,000)
Cities

47815
9862
1479
66

4693
587
12
66

27502
4698
1204
66

51475
10655
1588
66

7504
938
16
66

23572
4127
1250
66

Worker Characteristics
Mean Log. Earnings
Mean Age
Percent Male
Percent in Largest 5 cites

10.38
41.17
56.5%
56.1%

10.79
43.50
61.6%
58.8%

10.32
40.25
56.2%
56.9%

10.44
41.68
56.7%
56.7%

10.85
43.84
56.8%
62.6%

10.29
39.96
58.9%
56.8%

Firm characteristics
Mean Log Wage bill per Worker
Mean Log Wage bill
Log Firm Size

10.19
11.10
0.91

10.66
14.74
4.08

10.18
11.33
1.15

10.21
11.07
0.86

10.71
14.85
4.14

10.22
11.35
1.13

Note: This table displays the summary statistics for the baseline sample, stayers sample, and movers sample for 2002-2009 and2010–2017. See Section 2.1 for the selection criteria for the three samples. The numbers of observations for worker-years,
workers, and firms are rounded to the nearest thousand.

Table I.2: City-size regressions of mean and dispersion of log earnings: 2002-2009
Dependent variable:
Mean Log
Earnings

Var. Log
Earnings

90-50 Gap

50-10 Gap

(1)

(2)

(3)

(4)

Log Population

0.035∗∗∗(0.008)0.022∗∗∗(0.005)0.033∗∗∗(0.004)0.011∗∗(0.005)Constant−0.448∗∗∗(0.107)0.256∗∗∗(0.052)0.319∗∗∗(0.048)1.076∗∗∗(0.064)

66
0.217

66
0.238

66
0.541

66
0.054

Observations
R2

Note: This table displays the results of city-size regressions of city mean and dispersion measures of log earnings for 2002-2009.
Log earnings are residualized by a cubic polynomial of age, gender, marital status, and the number of children using a
Miner-type regression. I assume that the earnings profile is flag at age 40, following Card et al. (2013). The 90-50 gap is thedifference between the 90𝑡 ℎ and the 50𝑡 ℎ percentile of log earnings in the city, and the 50-50 gap is the difference between the
50𝑡 ℎ and the 10𝑡 ℎ percentile. Population is measured as the average number of full-time working individuals in each city in
2002-2009. All regressions are weighted by population. ∗ p<0.1; ∗∗ p<0.05; ∗∗∗ p<0.01.

Table I.3: Earnings variance decomposition at individual and city levels: 2010-2017
Individual level

City level

Value
(1)

Share
(2)

Value
(3)

Share
(4)

0.698

100%

0.0107100%

Var(Worker)

0.428

61.3%

0.0044

41.1%

Var(Firm)

0.037

5.3%

0.0014

13.1%

Var(Residual)

0.119

17.0%

0.0002

1.9%

0.114

16.3%

0.004743.9%

Log earnings or city mean log earnings
Variance Components

Covariance Components
2×Cov(Worker, Firm)

Note: This table displays the between-individual and between-city earnings variance decomposition results. Worker andfirm FEs are estimated by equation (2.2), with 𝑘 = 10 firm clusters. The variance of city mean log earnings is decomposed
according to: Var (𝐸 𝑐 [𝑤 𝑖𝑡 ]) = Var (𝑎 𝑐 ) + Var (𝑧 𝑐 ) + 2 × Cov (𝑧 𝑐 , 𝑧 𝑐 ). Columns (1) and (3) show the values of the variance terms,
and columns (2) and (4) show the percentage of each term with respect to the total variance.

Table I.4: Alternative decomposition of urban earnings premium: 2010-2017
Total

Mean Worker

Mean Firm

MeanInteraction

(1)

(2)

(3)

(4)

Log Population

0.022∗∗(0.008)0.015∗∗(0.005)0.006(0.004)0.001(0.001)% Explained

100.0%

68.7%

28.7%

2.6%

Observations
R2

66
0.106

66
0.145

66
0.046

66
0.032

Note: This table displays the decomposition results of city-size regressions of city mean log earnings in 2010–2017. The worker
and firm FEs are estimated using the empirical specification with worker-firm interaction: log 𝑤 𝑖𝑡 = 𝑧 𝑗(𝑖,𝑡) + 𝜃 𝑗(𝑖,𝑡) 𝑎 𝑖 + 𝜖 𝑖𝑡 . Meanhi

¯ 𝑖,𝑡 − 𝑎¯ ) . Columns
city log earnings can then be expressed as E𝑐 (log 𝑤 𝑖𝑡 ) = 𝜃¯ · E𝑐 (𝑎 𝑖 − 𝑎¯ ) + E𝑐 (𝑧 𝑗(𝑖,𝑡) + 𝜃 𝑗 𝑎¯ ) + E𝑐 (𝜃 𝑗(𝑖,𝑡) − 𝜃)(𝑎(2)–(4) represent city mean worker, firm, and match effects, which correspond to the three RHS terms of the decomposition
equation. Population is measured as the average number of full-time working individuals in each city for 2010-2017. All
regressions are weighted by population. ∗ p<0.1; ∗∗ p<0.05; ∗∗∗ p<0.01.

Table I.5: Alternative decomposition of the city-size gradient of within-city earnings variance: 2010-2017
Total

Var. Worker

Var. Firm

2× Covar

Var+Covar.
Interaction

(1)

(2)

(3)

(4)

(5)

Log Population

0.024∗∗(0.005)0.013∗∗(0.003)0.002∗∗(0.001)0.006∗∗∗(0.002)0.001(0.001)% Explained

100.0%

51.7%

8.2%

25.4%

3.2%

Observations
R2

66
0.238

66
0.181

66
0.080

66
0.153

66
0.013

Note: This table displays the decomposition results of city-size regressions of city-level variance in log earnings in 2010–2017. The
worker and firm FEs are estimated using the empirical specification with worker-firm interaction: log 𝑤 𝑖𝑡 = 𝑧 𝑗(𝑖,𝑡) +𝜃 𝑗(𝑖,𝑡) 𝑎 𝑖 + 𝜖 𝑖𝑡 .
¯ 𝑖 , 𝑧 𝑗(𝑖,𝑡) +Variance city log earnings can then be expressed as 𝑉 𝑎𝑟 𝑐 (log 𝑤 𝑖𝑡 ) = 𝜃¯ 2 · 𝑉 𝑎𝑟 𝑐 (𝑎 𝑖 ) + 𝑉 𝑎𝑟 𝑐 (𝑧 𝑗(𝑖,𝑡) + 𝜃 𝑗 𝑎¯ ) + 2 × 𝐶𝑜𝑣[𝜃𝑎𝜃 𝑗 𝑎¯ ] + Inter. Terms, where the last represents variance terms related to 𝜃. Columns (2)–(5) represent each of the four RHS
terms of the decomposition equation. Population is measured as the average number of full-time working individuals in eachcity for 2010-2017. All regressions are weighted by population. ∗ p<0.1; ∗∗ p<0.05; ∗∗∗ p<0.01.

Table I.6: Passthrough of wage bill shocks to workers
Firm PassthroughFirm wage bill shock

City Passthrough

OLS

IV

IV

OLS

IV

IV

IV

(1)

(2)

(3)

(4)

(5)

(6)

(7)

0.27∗∗∗(0.00)

0.13∗∗∗(0.02)

0.14∗∗∗(0.02)
0.28∗∗∗(0.00)

0.30∗∗∗(0.00)

0.25∗∗∗(0.00)

0.32∗∗∗(0.00)Yes

Yes

City real mean wage bill shock

Control for:Lag changes in wage and wage bill

Yes

Changes in skill shares
R2
Num. obs.
F statistic (First Stage)

Yes
0.01

0.01

0.10

0.31

0.31

0.41

0.42

2534400

2534400

2534400

2534400

2534400

2534400

2534400

4466.93924.5159646.2

148297.0

102495.5

Note: This table reports estimation results of passthrough of firm and city wage bill shocks to worker earnings by equation 5.7 and (5.8). These equations are estimated using
the 2010-2017 stayers sample. Columns (1) and (4) report the OLS estimates. Columns (2) and (5) report the IV estimates. The instruments are quadratic polynomials of
three- to five-period lagged changes in log residualized/mean wage bill and log residualized/mean worker earnings. Columns (3) and (6) further control for changes inlabor market competition by including a cubic polynomial of one-period lagged changes in log residualized/mean wage bill and log residualized/mean worker earnings in
the regressions. Column (7) controls for city-level changes in the share of high-skilled workers as a proxy for changes in endogenous amenities. The number of observations
is rounded to the nearest hundred. ∗ p<0.1; ∗∗ p<0.05; ∗∗∗ p<0.01.

86

Table I.7: Heterogeneous passthrough estimates
Firm PassthroughFirm wage bill shock

City PassthroughBig city

Small city

High-skilled

Low-skilled

Big city

Small city

High-skilled

Low-skilled

(1)

(2)

(3)

(4)

(5)

(6)

(7)

(8)

0.15∗∗∗(0.02)

0.12∗∗∗(0.02)

0.12∗∗∗(0.02)

0.08∗∗∗(0.02)
0.37∗∗∗(0.00)

0.21∗∗∗(0.00)

0.30∗∗∗(0.00)

0.30∗∗∗(0.00)

City mean real wage bill shockT-statistics: test for equality
p-valueR2

0.903(0.367)1.498(0.134)255.186(0.000)5.254(0.000)

0.01

0.01

0.02

-0.00

0.29

0.27

0.32

0.30

Num. obs.

1517900

1016500

1014000

1520400

1517900

1016500

1014000

1520400

F statistic (First Stage)

2365.26

2231.88

1969.242959.431117666.70

85271.64

66732.96

94955.58

Note: This table reports heterogeneous estimates of firm-level and city-level worker passthrough equations, for big versus small cities and high-skilled versus low-skilledworkers. High-skilled workers are defined as workers with skills in the top three deciles. The firm-level passthrough regressions follow the specification of Column (2) inTable I.6 and the city-level regressions follow Column (5). The t-statistics with their p-values for the test of equal passthrough estimates between the sub-groups are reported.
The number of observations is rounded to the nearest hundred. ∗ p<0.1; ∗∗ p<0.05; ∗∗∗ p<0.01.

87

Table I.8: Passthrough of wage bill shocks to firms

City total wage bill shock

OLS

IV

IV

(1)

(2)

(3)

1.06∗∗∗(0.00)

0.21∗∗∗(0.01)

0.15∗∗∗(0.02)

Control for:Lag changes in city and firm mean wage bill

Yes

R2

0.31

-0.01

0.24

Num. obs.

94100

94100

94100

2237.771450.79

F statistic (First Stage)

Note: This table reports estimation results of passthrough of city total wage bill shocks to firms by equation (5.9). These are
estimated using a sample of firms from the 2010-2017 baseline sample that stay in the same city for at least 7 years and employ
at least 10 workers each year. Column (1) is the OLS estimate and Columns (2)-(3) are the IV estimates. The instruments arequadratic polynomials of three- to five-period lagged changes in the log total city wage bill. Column (3) controls for changes
in local labor market competition by including a cubic polynomial of one-period lagged changes in log city and firm mean
wage bill in the regression. The number of observations is rounded to the nearest hundred. ∗ p<0.1; ∗∗ p<0.05; ∗∗∗ p<0.01.

Table I.9: Firm productivity parameter estimates by cluster

Cluster
log 𝑧
𝜃
Count

1

2

3

4

5

6

7

8

9

10

0.00
0.67
1.26
1.45
1.46
1.74
1.78
1.82
1.88
2.08
1.00
1.27
1.60
1.65
1.54
1.74
1.90
1.75
1.74
1.84
83700 109200 103800 90400 71900 62700 43400 49500 35600 36800

Note: Firm productivity parameter estimates by cluster, ranked by 𝑧.

Table I.10: Agglomeration elasticity
Dependent variable: log A𝑐

Log Population

R2
Num. obs.
F statistic (First Stage)

OLS
(1)

IV
(2)

0.0056(0.0165)0.0044(0.0179)

0.00
66

0.00
66
120.8

Note: This table reports the estimation results of the agglomeration spillover elasticity by equation (5.15). Column (1) is the
OLS estimate and Column (2) is the IV estimate. The instrument is the immigration-based IV with more details discussed in
Section E.7. ∗∗∗ 𝑝 < 0.01, ∗∗ 𝑝 < 0.05, ∗ 𝑝 < 0.1.

Table I.11: Housing Supply Elasticity Results
Dependent variable: Δ𝑟 𝑐

Changes in Log Housing Expenditure

OLS
(1)

IV
(2)

IV
(3)

0.53∗∗∗(0.13)

0.45(0.33)

0.47(0.36)

× Share of Undev. Land

R2
Num. obs.
F statistic (First Stage)−0.01(0.01)
0.30
66

0.29
66
24.74

0.29
66
24.74

Note: This table presents the estimation results of the housing supply elasticity by equation (5.16). Column (1) is the OLS
estimate and Columns (2)-(3) are the IV estimates, of which Column (3) interacts the changes in log housing expenditure withthe share of undevelopable land. The instrument is the shift-share Bartik IV with more details discussed in Section E.8. All
regressions are weighted by city population. ∗ p<0.1; ∗∗ p<0.05; ∗∗∗ p<0.01.

Table I.12: Correlation of city productivity and amenity with local characteristics
Dependent variable:
Productivity (A)Amenity (R)High-skilled

Low-skilled

(1)

(2)

(3)

Longitude−0.006∗∗(0.003)0.017(0.032)0.010(0.025)Latitude

0.029(0.026)0.270(0.288)0.254(0.226)

January Low Temp.

−0.007(0.022)−0.368(0.251)−0.256(0.197)January High Temp.

0.016(0.030)0.655∗(0.330)0.476∗(0.259)July Low Temp.

−0.022(0.018)0.393∗(0.197)

0.332∗∗(0.154)

July High Temp.

0.061∗∗∗(0.021)

0.073(0.239)0.073(0.188)

Avg Sunshine Hours−0.00001(0.0001)−0.001(0.001)−0.001(0.001)

Avg Sunshine Days

−0.001(0.001)−0.003(0.011)−0.005(0.009)January Wind Speed

0.053∗∗∗(0.019)−0.314(0.210)−0.207(0.165)

July Wind Speed−0.065∗∗(0.028)0.797∗∗(0.313)0.546∗∗(0.245)

Air Quality Index−0.003(0.005)0.078(0.051)

0.055(0.040)

Crime Severity Index−0.0005(0.001)−0.042∗∗∗(0.012)−0.034∗∗∗(0.009)

Share of Steep Land

−0.203(0.362)

7.957∗(4.047)6.011∗(3.171)

Share of Water-bodies−0.0001(0.008)0.072(0.088)0.032(0.069)Constant−2.189(1.492)−18.909(16.691)−15.937(13.077)

Observations
R2

50
0.746

50
0.637

50
0.633

Note: Regressions of estimated city productivity (𝐴) and average amenities (𝑅) for high- and low-skilled workers on local
characteristics. See Section A for the data sources of the city characteristics. ∗ p<0.1; ∗∗ p<0.05; ∗∗∗ p<0.01.

Table I.13: Structural decomposition of city-size gradient of within-city inequality

Total

Var. Worker

Var. Firm

2× Covar.

Match Var.+Covars.

Log Population

0.025∗∗∗(0.006)0.013∗∗∗(0.003)0.003∗∗∗(0.001)0.007∗∗∗(0.002)0.000(0.001)

R2
Num. obs.

0.247
66

0.196
66

0.103
66

0.160
66

0.001
66

Note: Variance of log earnings within a city can be written as: 𝑉 𝑎𝑟 𝑐 (log 𝑤 𝑖𝑡 ) = 𝜃¯ 𝑐2 · 𝑉 𝑎𝑟 𝑐 (𝑎 𝑖 ) + 𝑉 𝑎𝑟 𝑐 (𝑧 𝑗(𝑖,𝑡) + 𝜃 𝑗(𝑖,𝑡) · 𝑎¯ 𝑐 ) + 2 ×
𝐶𝑜𝑣[𝜃¯ 𝑐 · 𝑎 𝑖 , 𝑧 𝑗(𝑖,𝑡) + 𝜃 𝑗(𝑖,𝑡) · 𝑎¯ 𝑐 ] + Match var.+covs., with the last term representing the variance and covariance terms related
to variation in 𝜃 𝑗 . I report city-size regressions of the LHS and each term in the RHS in the table. ∗ p<0.1; ∗∗ p<0.05; ∗∗∗ p<0.01.

Table I.14: Changes in city mean log earnings and population with remote workers
Changes in:

Log Pop.

Mean Log Earnings

Short-runLong-run

Short-runLong-run

(1)

(2)

(3)

(4)

Log city rent

-0.028∗(0.014)0.005(0.011)-0.043∗∗∗(0.010)-0.037∗∗∗(0.013)Log city HS amenities

0.232∗∗∗(0.024)0.103∗∗∗(0.019)0.147∗∗∗(0.017)0.126∗∗∗(0.022)

Log city LS amenities-0.282∗∗∗(0.027)-0.177∗∗∗(0.021)-0.164∗∗∗(0.019)-0.166∗∗∗(0.024)

Observations
R2

66
0.713

66
0.807

66
0.654

66
0.628

Note: Regression of changes in log city population and mean city log earnings on log city rent in the baseline equilibrium andlog city high-skilled and low-skilled amenities. Short-run refers to the model scenario; Long-run refers to the model scenario
where only workers can move; Column (2) displays long-run outcomes where both workers and firms move. All regressions
are weighted by benchmark city population with no remote workers. ∗ p<0.1; ∗∗ p<0.05; ∗∗∗ p<0.01.

Table I.15: Robustness checks on counterfactual analysis
Counterfactual 1

Counterfactual 2End. amen.

Free entry

Het. 𝜂

End. amen.

Free entry

Het. 𝜂

(1)

(2)

(3)

(4)

(5)

(6)

Var. city log earnings

14.4%

14.5%

15.9%

-25.6%-28.0%-31.6%

City Gini index

19.5%

19.7%

18.8%

-10.8%-11.6%-13.7%

Total output

0.8%

0.8%

1.0%

-0.3%

-0.3%

-0.2%

Total welfare

-0.4%

-0.4%

-0.4%

-0.1%

0.3%

0.0%

High-skilled welfare

-0.1%

-0.2%

-0.4%

-0.4%

0.3%

-0.2%

Low-skilled welfare

-0.5%

-0.5%

-0.4%

0.1%

0.3%

0.1%

Pop. in treated cities

-2.3%

-2.3%

-2.1%

20.8%

20.9%

18.4%

High-skilled pop.

0.7%

0.6%

1.1%

20.6%

21.0%

21.4%

Low-skilled pop.

-3.8%

-3.8%

-3.7%

20.9%

20.8%

16.9%

# Firms in treated cities

-0.8%

-0.7%

-0.4%

24.1%

26.6%

21.7%

# high-prod. firms

30.0%

30.2%

29.6%

24.3%

27.3%

26.9%

# low-prod. firms

-7.6%

-7.6%

-7.6%

24.0%

26.5%

20.8%

% Changes in

Note: Robustness checks of the counterfactual analysis results. Counterfactual 1 refers to the subsidy to the productive firms in
Toronto in Section 6.3.1; Counterfactual 2 refers to the low-wage city subsidy in Section 6.3.2. The details on the incorporationof endogenous amenities and free entry are discussed in Appendix F.1 and F.2. In the heterogeneous housing expenditure
shares version, I calibrate 𝜂𝐿 = 0.35 and 𝜂𝐻 = 0.22 according to Eeckhout et al. (2014).

Table I.16: Counterfactual analysis: loosening housing regulation in top 5 cities
Full modelNo worker het.

No firm het

Only city het.

% Changes in

(1)

(2)

(3)

(4)

Total output

1.3%

2.0%

2.9%

3.9%

Total welfare

5.3%

5.1%

5.5%

7.0%

Pop. in top 5 cities

52.3%

51.9%

49.7%

46.4%

# of firms in top 5 cities

48.8%

42.0%

48.4%

41.6%

Note: The top 5 cities refer to the five highest-earnings cities.

Table I.17: Counterfactual analysis: universal basic income
Limited Re-sorting
Full model(1)

No worker het.
(2)

No-resorting(3)

Only firm(4)

Only worker(5)End. amen.
(6)Free entry(7)

Het. 𝜂
(8)

Var. city log earnings

24.8%

0.0%

-0.1%

-0.1%

16.5%

22.4%

24.9%

25.1%

City Gini index

7.5%

0.0%

-0.3%

-0.3%

4.2%

6.2%

7.6%

7.5%

Total output

-0.1%

0.0%

0.0%

0.0%

-0.1%

-0.1%

-0.1%

-0.1%

Total welfare

3.9%

0.8%

3.8%

3.8%

3.8%

4.1%

3.9%

3.8%

High-skill welfare

-1.4%

0.8%

-1.4%

-1.4%

-1.4%

-0.8%

-1.4%

-1.4%

Low-skill welfare

6.7%

0.8%

6.7%

6.7%

6.7%

6.7%

6.7%

6.6%

Pop. in low-wage cities

1.3%

0.6%

–

–

1.0%

1.2%

1.3%

1.2%

High-skill pop.

0.1%

0.6%

–

–

0.0%

-0.2%

0.1%

0.1%

Low-skill pop.

1.9%

0.6%

–

–

1.5%

1.9%

1.9%

1.8%

# Firms in low-wage cities

1.4%

0.5%

–

0.0%

–

1.5%

1.4%

1.4%

# high-prod. firms

-0.5%

0.5%

–

0.0%

–

-0.8%

-0.7%

-0.6%

# low-prod. firms

1.8%

0.5%

–

0.0%

–

1.9%

1.8%

1.7%

% Changes in

Note: Low-wage cities refer to the 25 lowest-paying cities, which account for 12% of the urban population.

94

Figure I.1: Topography maps of largest four Canadian cities(a) Toronto(b) Montreal(c) Vancouver(d) Calgary

Note: Topography maps for the four largest Canadian cities. Blue areas are land areas covered by water, brown areas are land
areas with slopes greater than 15 degrees, and green areas are land areas under the Greenbelt plan.

Figure I.2: City mean log earnings versus city population: 2010-2017(a) Log earnings(b) Control for demographic characteristics
0.2
Slope = 0.023 (0.008)

Slope = 0.022 (0.008)

10.6

0.1

Log city mean earnings

Log city mean earnings

10.5

10.4

0.0

−0.1

10.3

−0.2
10.2

−0.3

10.1
30k

100 k

300 k

1m

30k

City Population

300 k

1m

City Population(c) Control for demographic characteristics + industry
0.2

100 k

(d) Control for demographic characteristics + learning in big cities
Slope = 0.017 (0.007)

Slope = 0.021 (0.006)
0.1

Log city mean earnings

Log city mean earnings

0.1

0.0

−0.1

0.0

−0.1

−0.2
−0.2

−0.3
−0.3
30k

100 k

300 k

City Population

1m

30k

100 k

300 k

1m

City Population

Note: These figures display results of city-size regressions of city mean log earnings for 2010-2017. Panel (a) uses raw log
earnings; panel (b) controls for demographic characteristics including age profile, gender, marital status, and the number ofchildren; panel (c) additionally controls for NAICS-4 industry dummies; panel (d) additionally controls for big-city work
experiences since 2002 interacted with the current city being a big city. Population is measured as the average number offull-time working individuals in each city in 2010-2017. Population-weighted regression coefficients and standard errors arereported.

Figure I.3: City mean log earnings versus city population: 2010-2017(a) After-tax labor earnings(b) Workers with no business income

Slope = 0.026 (0.007)

Slope = 0.024 (0.007)

0.50

Log city mean earnings

Log city mean earnings

0.4

0.2

0.0

0.25

0.00

−0.2
−0.25

−0.4
30k

100 k

300 k

City Population

1m

30k

100 k

300 k

1m

City Population

Note: These figures display results of city-size regressions of city mean log earnings for 2010-2017. Panel (a) uses after-tax
annual earnings; panel (b) excludes individuals with non-zero business income. Both panels control for worker demographic
characteristics. Population is measured as the average number of full-time working individuals in each city in 2010-2017.
Population-weighted regression coefficients and standard errors are reported.

Figure I.4: City mean log earnings versus city population: 2002-2009(a) Log earnings(b) Control for demographic characteristics

10.6
Slope = 0.03 (0.008)

Slope = 0.035 (0.008)

Log city mean earnings

Log city mean earnings

10.4

10.2

0.00

−0.25

10.0

30k

100 k

300 k

−0.50

1m

30k

City Population

100 k

300 k

1m

City Population(c) Control for demographic characteristics + industry

Log city mean earnings

Slope = 0.029 (0.007)

0.0

−0.2

−0.4
30k

100 k

300 k

1m

City Population

Note: These figures display results of city-size regressions of city mean log earnings for 2002-2009. Panel (a) uses raw log
earnings; panel (b) controls for demographic characteristics including age profile, gender, marital status, and the number ofchildren; panel (c) additionally controls for NAICS-4 industry dummies. Population is measured as the average number offull-time working individuals in each city in 2002-2009. Population-weighted regression coefficients and standard errors arereported.

Figure I.5: Event study figure of between-firm worker movers(a) Movers from the bottom cluster

Mean log residualized wages

0.25

0.00

●

1 to 1
1 to 2−0.25

1 to 3
1 to 4
1 to 5

−0.50

●
●

●

−3

−2

−0.75

●
●

−1

0

1

2

3

Years relative to the move(b) Movers from the top cluster

Mean log residualized wages

0.75
●

●

●

0.50

5 to 1
5 to 2
5 to 35 to 45 to 5

0.25

0.00
●

●

1

2

●

−3

−2

−1

0

3

Years relative to the move

Note: These two figures display the earnings profile of between-firm worker movers before and after the move. The sample
includes workers who have 1) moved between firms, 2) stayed in the previous firm for more than 4 years prior to the moveand 2) stayed in the new firm for more than 3 years. The movement occurs between event years -1 and 0; I omit the average
earnings for these two event years given that I only observe annual earnings and workers only work a part of each of these
two years for the old and new firms. For ease of exposition, I collapse 10 firm clusters into 5 and show workers who movefrom the top and bottom ones in the figures.

Figure I.6: Model simulation of two cities with various values of 𝛽 𝑤 /𝜌𝑤 and 𝜃

0.0

0.4

0.6

0.8

0.6

0.8

High Type Firm Share

0.4

0.6

0.8

1.0

θ=1

0.8
0.4

1.0

0.4

0.6

0.8

High Type Firm Share

0.8

1.0

θ = 1.5
0.0High Skill Labor Share

0.8
0.4

0.2

0.6

0.2

0.4

0.6

0.8

1.0

High Type Firm Share

0.0
0.0

0.4

0.8

High Skill Labor Share
0.2

0.2

High Type Firm Share

0.8
0.0

High Skill Labor Share

0.8

High Skill Labor Share

0.4

0.4

0.0

High Type Firm Share

0.0

0.2

1.0

0.4

1.0

High Type Firm Share

0.0

0.8

1.0

θ=3

0.2

0.6

0.0

High Skill Labor Share

0.8
0.4
0.0

0.4

High Type Firm Share

0.0

High Skill Labor Share

High Type Firm Share

0.2

0.0

High Skill Labor Share

0.8
0.4

1.0

0.4

0.8

0.0

0.6

0.8

0.4

0.4

0.2

0.0

0.0

βw ρw = 2

0.0

0.4

0.8

High Skill Labor Shareβw ρw = 1.1

0.0

High Skill Labor Shareβw ρw = 0.6

0.0

0.2

0.4

0.6

0.8

1.0

High Type Firm Share

Note: Simulation results described in Section D. Red lines are the best response curves of the share of type-2 workers in city 1
given the share of type-2 firms in city 1. Blue lines are the best response curves of the share of type-2 firms in city 1 given theshare of type-2 workers in city 1. The interactions of the red and blue curves are the Nash Equilibria.

Figure I.7: Mean new worker and firm FEs by city

Mean Mover or New Worker FE

0.1
Slope = 1.134 (0.134)

0.0

−0.1

−0.15

−0.10

−0.05

0.00

0.05

0.10

Mean New Firm FE

Note: This figure displays a scatterplot of the mean FEs of new or in-migration workers and of new firms for each city, in the
2010–2017 period. The worker and firm FEs are estimated using equation (2.2). Firms are grouped into 𝑘 = 10 clusters. The
population-weighted regression coefficient and the standard error are reported.

Figure I.8: Comparing mean worker skills of movers in opposite directions

10

9

8

7

To Cluster

value
6

0.05
0.00

5

−0.05

4

3

2

1

1

2

3

4

5

6

7

8

9

10

From Cluster′

Note: This figure compares mean worker skills of movers in opposite directions. The value of each (𝑘, 𝑘 ) cell is calculated as
E 𝑘 𝑘 ′ (𝑎) − E 𝑘 ′ 𝑘 (𝑎).

Figure I.9: City exogenous productivity estimates versus population

Slope = 0.001 (0.014)

City Productivity Ac

1.00

0.75

0.50

30k

100 k

300 k

1m

City Population
Note: This figure displays a scatterplot of estimated city exogenous productivity 𝐴 𝑐 on city population. The dashed line is aweighted linear fit and the solid line is a quadratic fit. The population-weighted OLS regression coefficient and the standard
errors are reported.

Figure I.10: 3D plots of firm and city amenities for different skilled workers(a) Firm amenities(b) City amenities

1.0

1.0

0.8

0.8

Amenity value

Amenity value

0.6

0.6

0.4
0.2

0.4
0.2

0.0
2
4
Fir
m

2
6
clu
ste 8
r

4
6
10

10

e

8
skil
rker
Wo

cil
l de

0.0
10
Cit
yp 8
op
ula 6
tio
nd 4
ec
ile

2

2

10
8
6
le
dec
l
il
4
sk
rker
Wo

Note: This set of figures displays skill-specific firm and city amenities. Workers are binned into ten skill decile groups, andcities are ranked by population and binned into ten equal-number city groups. The amenities of firm cluster 1 and of citygroup 10 are normalized to 1, for all worker skill deciles.

Figure I.11: Model fit of worker and firm sorting shares across cities(a) Baseline Estimates: Worker(b) Model Solution: Worker

100

100

Skill decile

Skill decile
75

10
9
8
7
6

50

5
4
3

Share of workers (%)

Share of workers (%)

75

10
9
8
7
6

50

5
4
3

2
25

2
25

1

0

1

0
1

2

3

4

Top 5

1

City group (ordered by population)

2

3

4

Top 5

City group (ordered by population)(c) Baseline Estimates: Firm(d) Model Solution: Firm

100

100

Firm cluster

Firm cluster
75

10
9
8
7
6

50

5
4
3

Share of firms (%)

Share of firms (%)

75

10
9
8
7
6

50

5
4
3

2
25

1

0

2
25

1

0
1

2

3

4

Top 5

City group (ordered by population)

1

2

3

4

Top 5

City group (ordered by population)

Note: The series of figures compare sorting shares of workers and firms generated by the model solution and the shares inthe data: panels (a) and (b) compare worker sorting shares, and panels (c) and (d) compare firm sorting shares. Cities arebinned into 5 groups: one is the largest five-cities group and the other four are equal numbers of cities ranked by population.
I classify workers into ten deciles based on their skill and rank firm clusters based on common productivity 𝑧.

Figure I.12: Model fit of worker and firm match shares within cities(a) Baseline Estimates: Largest 5 Cities(b) Model Solution: Largest 5 Cities

0.4

0.4

0.3

0.3

Match share

Match share

0.2

0.2

0.1

0.1

0.0
10
8
Fi
rm

0.0
10
10
6
clu
ste 4
r

2

2

8
le
6
eci
ill d
k
s
4 er
k
r
Wo

(c) Baseline Estimates: Smaller Cities

8
Fi
rm

6
clu
ste 4
r

2

2

10
8
cile
6
e
d
ill
4 er skrkWo(d) Model Solution: Smaller Cities

Figure I.13: High-skilled worker shares in the model versus college-educated shares from 2016 Census

High−skilled shares from the model

0.6

0.4

0.2

0.0
0.0

0.2

0.4

0.6

College−educated shares from 2016 Census
Note: This figure is a binscatter plot of the model-estimated city high-skilled worker shares versus the city college-educatedshares constructed using 2016 Population Census. High-skilled workers are defined as workers with skills in the top threedeciles of the skill distribution. The 45-degree line is plotted in the figure.

Figure I.14: Understanding sorting and worker-firm complementarity(a) Firm+Interaction Components(b) Interaction Components

0.5

cluster

0.0

1
2
3
4
5
6
7
8
9
10

−0.5

−1.0

−1.5

Match Components

Firm + Match Components

0.5

cluster

0.0

1
2
3
4
5
6
7
8
9
10

−0.5

−1.0

−1.5
1

2

3

4

5

6

Skill Decile

7

8

9

10

1

2

3

4

5

6

7

8

9

10

Skill Decile

Note: The two figures plot 1) the firm+interaction components and 2) the interaction component in equation (6.1) for ten firm
clusters along different skill deciles. Firm clusters are ranked by productivity 𝑧.

Figure I.15: Net transfers versus city population(a) Worker earnings transfers(b) Firm profits transfers
3
Slope = −0.28 (1.31)

100

Net Firm Profits Transfer (%)

Net Worker Earnings Transfer (%)

Slope = −3.54 (2.78)

50

0

0

−3

−6

−50

30k

100 k

City Population

300 k

1m

30k

100 k

300 k

1m

City Population

Note: These figures relate net earnings transfers by city to city population. For each city, the net worker earnings transfer ismeasured as the ratio of the net worker transfers received to total worker earnings; the net firm profits transfer is measured as
the ratio of the net firm transfers received to total firm profits. Population-weighted OLS regression coefficients and standard
errors are reported.

Figure I.16: Spatial reallocation of workers and firms of the optimal policies between cities with different
exogenous productivities(b) Firm reallocation

200

Change in Population by Skill (%)

High−skilled workers (Blue)
Low−skilled workers (Grey)100

0Change in Number of Firms by Prod. (%)(a) Worker reallocation

−100

200
High−prod. firms (Blue)
Low−prod. firms (Grey)

100

0

−100
0.50

0.75

1.00

0.50

City Productivity Ac

0.75

1.00

City Productivity Ac

Note: The series of figures displays the changes in the number of workers and firms induced by the optimal policy versus
city exogenous productivity 𝐴 𝑐 . In Panel (a), blue dots represent high-skilled workers and grey dots represent low-skilledworkers; in Panel (b) blue dots represent high-productivity firms and grey dots represent low-productivity firms.

Figure I.17: Spatial reallocation of workers and firms of the optimal policies with no within-typeredistribution(b) Worker reallocation(a) Firm reallocation

High−prod. firms (Blue): Slope = 14.3 (3.9)
Low−prod. firms (Grey): Slope = −46.6 (15.1)

100

0Change in the Number of Workers (%)

Change in the Number of Firms (%)

200
High−skilled workers (Blue): Slope = 2.37 (1.47)
Low−skilled workers (Grey): Slope = −2.36 (3.08)

100

50

0

−50

−100
30k

100 k

300 k

City Population

1m

30k

100 k

300 k

1m

City Population

Note: The series of figures displays the reallocation of workers and firms induced by the optimal policy with no within-typeredistribution. Specifically, I design type-city-specific proportional taxes to equate the income of all agents to their social
values, which are state in Proposition 2.

Figure I.18: Spatial reallocation of workers and firms of the optimal policies considering only one-sided
heterogeneity(a) Only worker heterogeneity: firm reallocation(b) Only worker heterogeneity: worker reallocation

High−skilled workers (Blue): Slope = 0.20 (2.65)
Low−skilled workers (Grey): Slope = −2.36 (3.08)

Change in the Number of Workers (%)

Change in the Number of Firms (%)

Slope = 2.24 (0.71)

0

−20

100

50

0

−50

30k

100 k

300 k

1m

30k

100 k

300 k

1m

City Population(c) Only firm heterogeneity: firm reallocation(d) Only firm heterogeneity: worker reallocation

200

60

High−prod. firms (Blue): Slope = 3.19 (4.34)
Low−prod. firms (Grey): Slope = −28.11 (4.06)

Change in City Population (%)

Change in the Number of Firms (%)

City Population

100

0

Slope = −3.38 (1.42)

40

20

0

−20

−100
30k

100 k

City Population

300 k

1m

30k

100 k

300 k

1m

City Population

Note: The series of figures displays the reallocation of workers and firms induced by optimal policies that consider only
one-sided heterogeneity.

Figure I.19: Changes in the spatial distributions of workers and firms with remote work(a) Number of workers(b) Number of firms

Changes in firms by productivity (%)

Changes in population by skill (%)

12

8

4

High−Skilled
Low−Skilled

050High−prod.
Low−prod.

25

0

−4
SR LR

SR LR

SR LR

SR LR

SR LR

1

2

3

4

Top 5

1

2

3

4

Top 5

Note: The two figures display the changes in the number of workers and firms when 10% of workers can work remotely.
Cities are binned into 5 groups: one is the largest five-cities group and the other four are equal numbers of cities ranked
by population. In panel (a), SR refers to the short-run model where only workers can change locations; LR refers to thelong-run model where both firms and workers can change locations. Panel (b) only has the results for the long-run model as
firms do not move in the short-run model. I show the results separately for high- and low-skilled workers, and high- andlow-productive firms.

110