Nonlinearities and Asymmetric Adjustment to PPP in an Exchange Rate Model with Inflation Expectations

This paper estimates a model of the real exchange rate including standard fundamentals as well as two alternative measures of inflation expectations for five inflation targeting countries (UK, Canada, Australia, New Zealand, Sweden) over the period January 1993-July 2019. Both a benchmark linear ARDL model and a nonlinear ARDL (NARDL) specification are considered. The results suggest that the nonlinear framework is more appropriate to capture the behaviour of real exchange rates given the presence of asymmetries both in the long- and short-run. In particular, the speed of adjustment towards the PPP-implied long-run equilibrium is three times faster in a nonlinear framework, which provides much stronger evidence in support of PPP. Moreover, inflation expectations play an important role, with survey-based ones having a more sizable effect than market-based ones. Monetary authorities should aim to achieve a high degree of credibility to manage them and thus currency fluctuations effectively. The inflation targeting framework might be especially appropriate for this purpose.


Introduction
Urban planning requires ex-ante assessments of potential policy impacts. These impacts need to be assessed at the scale of a whole city, with the understanding that a city forms a system and that policies can have systemic consequences. For instance, urban planners may try to anticipate how land markets could respond to a major transport infrastructure investment, potentially modifying the spatial organization of a city and its footprint over the long term. Doing so requires an understanding of the market forces that drive city structure, including housing construction decisions, household location and transport mode choice, subject to physical constraints and zoning. To answer such questions, urban economists have come up with sophisticated spatial simulation tools which are grounded in urban economic theory and which can be used to support urban planning at the local government level. Land use and transport integrated (LUTI) simulation models which simultaneously predict land use and transport decisions have been designed for a few major cities in the world, and various modeling approaches have emerged, including TRANUS (de la Barra, 1989), UrbanSim (Wadell, 2000) and RELU-TRAN (Anas and Liu, 2007) among others (see Acheampong and Silva, 2015, for a full literature review of such models). Although these simulation models have mostly been applied to cities in the United States and Europe, they are increasingly being applied to metropolitan areas elsewhere (see for instance the recent applications of the RELU-TRAN model to Beijing (Anas and Timilsina, 2015) or Cairo (Anas et al., 2017)). In the case of South Africa, a local version of UrbanSim was developed by the Centre for Scientific and Industrial Research (CSIR) for the East Rand area, Durban and Nelson Mandela Bay (see Wray and Cheruiyot, 2015, for a survey of land use modeling in South Africa). 1 Although the development of LUTI models for developing countries is facilitated by improved data availability, it also faces at least three major challenges: First, these models are often complex (involving hundreds of equations) and computationally intensive, which can make them cumbersome to design, difficult to operate, and intractable. Second, because of their complexity and the skills required to operate them, these models may be out of reach and unaffordable to local authorities with limited fiscal resources. Finally, the existing models overlook a key feature of land markets in developing countries: the presence of a large informal housing sector which coexists and interacts with the formal housing sector (Durand-Lasserve and Selod, 2007, Napier et al. 2013). This gap precludes analyses of informal housing (which hosts the poor and often a large fraction of the middle class) and of how and the degree to which informal housing affects the whole system. More importantly, because, for many cities, housing informality is far from being a marginal phenomenon, it is possible and even likely that the predictions from models that lack an informal housing sector would not hold if the informal sector were accounted for.
In the face of these challenges, simple urban simulation models that are based in urban economic theory emerge as a less costly alternative to previously developed models (see Arnott, 2012). They are useful for urban planning as they can account for broad patterns of urban development over the long term, while remaining tractable so that users understand the forces at play. The NEDUM model (Viguié et al. 2014) for instance, which was initially developed for the Paris metropolitan area, is an example of such a model. 2 It directly applies a discrete two-dimensional version of the standard urban monocentric model (see Fujita, 1989) on a grid of pixels, accounting for zoning and land availability constraints defined at the pixel level.
In the present paper, we address all three challenges with the proposal of a LUTI model for Cape Town that builds on a polycentric version of the NEDUM model. To account for the key features of Cape Town, a highly unequal city with a large informal housing sector and a history of subsidized housing provision, we also introduce heterogeneous income groups in the model, as well as informal housing situations that coexist with market and state-driven formal housing.
Our modeling approach builds on a handful of theoretical papers that previously adapted the standard urban land-use model to South African cities (Brueckner, 1996, andZenou, 2003) or that proposed ways to model a spatial equilibrium in the presence of interacting formal and informal land and housing markets (see Brueckner andSelod, 2009, Cai, Selod andSteinbuks, 2018, and Selod and Tobin, 2018). The important feature common to all these models is that households can make constrained choices whether to occupy land formally or informally so that an equilibrium relation emerges between the price and extent of formal housing and the size of the informal housing sector. 3 In our framework, we consider two types of land and housing informality: informal settlements in predetermined locations (which is akin to squatting as in Brueckner and Selod, 2009) and a rental market for backyard structures erected by owners of state-driven subsidized housing as recently modeled by Brueckner, Rabe and Selod (2018). We integrate these elements in a closed-city model with exogenous population growth and simulate developers' construction decisions as well as the housing and location choices of households from different income groups at a distance from several employment subcenters (while accounting for state-driven subsidized housing programs, natural constraints, amenities, zoning, transport options, and the costs associated with each transport mode). To our knowledge, our framework is the first two-dimensional urban economics spatial simulation tool to model the internal residential structure of a city with endogenously determined informal housing. 4 As a proof of concept, we conduct 'what-if' evaluations of policy scenarios, investigating the spatial consequences of policies relevant to the city of Cape Town. We first simulate the impact of an urban growth boundary adopted by Cape Town's metropolitan planning authority to limit sprawl. The second policy we simulate is the continuation of the ongoing subsidized housing program at varying rates of implementation, asking ourselves whether or not this will be sufficient to significantly reduce housing informality in the city. 5 Our simulations show the long term spatial effects and trade-offs in terms 2 The acronym NEDUM stands for Non-Equilibrium Dynamic Urban Model, where the term "non-equilibrium" refers to the adjustment process between any two periods. 3 Note that housing informality was first modeled by Jimenez (1984 and1985) in a partial equilibrium setting. For a review of these models, see Brueckner and Lall (2015). 4 For a calibrated simulation model with housing informality but no internal city structure see Cavalcanti et al. (2019). For a city-system model of slums, see Alves (2018). For an agent-based model of slums, see Patel et al. (2012). For a dynamic simulation of slums with exogeneous price variations, see Henderson et al. (2018). For a monocentric version of the NEDUM model in a developing country but with no informal housing, see Avner et al. (2017). For city-structure simulations with both endogenous job and residence locations but without explicit consideration of informal land uses, see Ahlfedlt et al. (2015) and Tsivanidis (2018). 5 To the extent that insecure tenure and associated slum conditions have been shown to entail a range of harmful of footprint reduction versus housing affordability. In Section 2 below, we briefly present relevant Cape Town stylized facts regarding job locations (polycentrism), the high level of income inequality that prevails in the city, and the different housing submarkets that coexist. Section 3 then details the theoretical model. Section 4 presents the data and calibration. Section 5 describes a benchmark simulation and the effects of the two sets of policies. Section 6 briefly concludes.

The Cape Town context
Cape Town is a sprawling middle-income city of 4.2 million residents, with an ethnically diverse population (46% Black Africans, 40% "Coloured" (Mixed Descent), 13% Whites and 1% Indians/Asians). The city faces a population growth of 2.4% annually, fueled by in-migration from South African rural areas and other African countries. It has inherited high levels of poverty and acute income inequality (which is highly correlated with race) from past Apartheid policies: As a result, the Gini index for Cape Town is among the highest in the world, reaching .62 in 2017.
This high level of inequality is associated with a fragmented housing market, consisting of four main segments: (i) privately developed formal housing (which houses 52% of residents in 2016), (ii) State-subsidized formal housing (29%), (iii) informal structures in informal settlements (9%), and (iv) structures erected illegally in the backyards of formal housing, mainly State-subsidized housing (8%) (source: Statistics South Africa). Informal settlements first appeared in Cape Town with the rapid urbanization of Black Africans that was stimulated by the labor demands of the wartime economy in the late 1940s (Wilkinson, 2000). They re-appeared at scale during the 1970s as a result of inadequate affordable housing provision coupled with the relaxation of Apartheidera "influx control laws" (which sought to limit internal in-migration of rural Black Africans to cities). As in the rest of South Africa, housing in informal settlements in Cape Town is characterized by small one-story structures made of corrugated iron sheeting and packed at relatively high densities on peripheral, publicly-owned land originally reserved for future roads, social facilities or public housing. The same type of housing can be encountered as backyard structures although these backyard structures may also be made of brick and mortar. Backyarding was historically a non-transactional, kin-based arrangement first associated with Council housing rolled out for households of Mixed Descent in the 1950s and 1960s. Its proliferation as a housing market accelerated in earnest, alongside informal settlements, in the wake of large-scale state-driven housing programs from the 1980s onwards, such as the Reconstruction and Development Programme in 1994 ('RDP') and, more recently, with the Breaking New Ground ('BNG') program (Lemanski, 2009). Both programs aimed to allocate individual, free-standing dwellings by means of full capital subsidy to eligible households (Landman and Napier, 2010). These capital subsidies are effects (including e.g., removing workers from the labor force, reducing education and health outcomes, and more generally, a loss in efficiency from the misallocation of land), reducing the level of housing informality in a city can be a justified policy objective. Note, however, that completely eradicating informality may not necessarily be desirable in a second best setting wher formalization is very costly as moderate levels of slums may provide the poor access to urban economic opportunities in excess of the negative externalities they generate (see Cai et al., 2018, who derive this result by contrasting laissez-faire and social planner equilibria in a spatial dynamic stochastic setting). allocated in the form of conditional grants by national government to provincial housing departments, with whom the mandate for public housing delivery reside. In the case of large cities, the cost of supportive infrastructure (e.g. roads, services, etc.) are funded by infrastructure grants disbursed by national government directly to metropolitan authorities. Following transfer, additional rooms were in many cases constructed in the backyard, without regulatory approval, from either temporary or permanent building material, often in order to rent these out as an income-generating activity.
In terms of spatial structure, Cape Town is a highly segregated city along income (and racial) lines, with the poor mainly residing to the South East of the City, often far from jobs, which are mainly concentrated in a small number of employment areas in the CBD and along two transport corridors (see Wainer, 2016). Figure 1 below shows the City of Cape Town's built up area, along with major roads and the main employment subcenters.

The model
The model focuses on competition for residential land among different housing types. 6 For simplicity, let us first describe the static version of the model (see Sections 3.1-3.3 below) before explaining how dynamics are generated (see Section 3.4).

General assumptions and model intuition
Land availability and amenities. We consider a 2-dimensional city made of discrete locations within a rectangle that encompasses the whole metropolitan area. Each cell is indexed by a vector of coordinates x = (x 1 , x 2 ) and has an exogenous quantity of available land for residential development L(x). L varies with x to account for both natural, regulatory constraints, infrastructure and 6 The model does not focus on how firms and households may compete for urban space as it considers that the locations of firms and the use of land by firms are exogenous parameters. In practice, anyway, it is noticeable that residential areas occupy more than four times as much space as employment centers in Cape Town. other non-residential uses. In addition, each location has an exogenous quantity A(x) of natural and historical amenities.
Job centers, commuting and net income. The city is inhabited by N households (closed city assumption) divided into 4 skill/income groups (indexed by i). Each group has an exogenous number of households N i and each household has one worker and other family members. There are C employment locations in the city, indexed by c = 1, ...,C. 7 If considering employment in c, a worker of group i could earn a wage w ic and would have expected income y ic = χ i w ic , where χ i is the exogenous employment rate prevailing in group i. 8 There are M possible modes of transportation in the city, denoted by m. For each residential location x, job center c, income group i, worker j and mode m, the expected commuting cost is: where χ i τ m is the expected monetary cost of using transport mode m to travel from c to x (accounting for the expected frequency of commuting), 9 χ i δ m w ic is the expected cost associated with the time spent commuting, assumed to be proportional to the wage w ic (opportunity cost of time), and ε mxci j is a random term that follows a Gumbel minimum distribution of mean 0 and scale parameter 1 /λ.
Commuters choose the mode that minimizes their transport cost. By property of the Gumbel distribution, we can thus write the commuting cost between x and c as: where η xci j also follows a Gumbel minimum distribution of mean 0 and scale parameter 1 /λ. Given their residential location x, workers choose their workplace location c that maximizes their income net of commuting costs and solve the program max c y ic − min m t m j (x, c, w ic ) . The probability to choose to work in location c given residential location x and income group i is therefore given by the following equation: 10 We denoteỹ i (x) the expected income (over all possible employment centers) net of commuting costs for residents of group i living in location x, that is: We can calculateỹ i using (1) and (2), which gives: From equation (2), we can derive the expected number of residents of income group i choosing to work in c, denoted W ic , providing that we know the number of residents of income group i with their residence in x, denoted N i (x), in all x. We have: Housing types. There are potentially four types of housing, generically denoted h. The four categories include h = FP ("formal private") for housing formally provided by the private sector, h = FS ("formal subsidized") for housing delivered under a subsidized-housing program such as the RDP or BNG, and two types of informal housing: h = IS ("informal settlement") for housing in an informal settlement, and h = IB ("informal backyard") for housing in a backyard structure of a plot that was initially delivered under a subsidized-housing program. 11 As will be detailed below, subsidized housing is accessed outside a market-determined price (see below) but a market exists for formal private housing (h = FP) as well as for informal backyard structures (h = IB) and for informal settlement structures (h = IS). 12 In line with empirical observations, we assume that the set of housing options varies across income groups, with only the lowest income groups considering the possibility of informal housing. In our framework, individuals from income group 1 (the poorest) are eligible for public housing. Only a fraction of individuals from this income group, however, will benefit from the relatively 11 Note that no central, authoritative registry of public housing is available in Cape Town documenting all housing delivered under the succession of government programs that were implemented since the 1920s (Wilkinson, 2000). Earlier public housing varies greatly in terms of typology, tenure arrangement and quality, and some of it has subsequently re-entered the formal housing market. For the purpose of this model, a series of explicit neighborhood, zoning, and physical attributes were used to delineate public housing characteristic of the RDP and BNG housing programs from overall housing stock in existence today. 12 Although local surveys suggest that a significant proportion of beneficiaries resell the properties that were initially allocated to them under subsidized-housing programs (Tissington et al., 2013), for simplicity, we do not model this secondary market. Because the sales likely remain within the same income group, this has no impact on income sorting in the model. small amount of housing provided under the public housing program. The other individuals in this income group will be rationed out and may decide to live in informal settlements, in other people's backyards, or in formal private housing. Individuals from income group 2 (the second poorest group) face the same housing choices as individuals from income group 1 but are not eligible for public housing which only targets the poorest individuals. Finally, income groups 3 and 4 (the richest groups) may only be housed in formal private housing. 13 These assumptions are summarized in Table A Utilities. The type and quantity of housing consumed affect household utility. In our model, households derive utility by consuming a composite good z, housing quantity q, and facing amenities A and a housing type externality B h , where h = FP, FS, IS, IB. Assuming a Stone-Geary specification-which imposes a minimum housing size consumption-household utility is expressed as: where q 0 > 0 is the minimum need for housing quantity, α + β = 1, and B FP = B FS = 1 and B IS and B IB < 1.
Because B h is a multiplicative term in the utility function, the condition B FP = B FS = 1 means that there is no externality associated with formal housing, whereas B IS and B IB < 1 capture the negative externalities associated with informal housing (see Galiani et al., 2018). It can easily be shown that the Stone-Geary specification also implies that the rich will value more than the poor residing in locations with better amenities (as in Brueckner et al., 1999).
Having laid out these general assumptions, we can now say a few words about the functioning of the model: Housing will be provided exogenously by the government in the form of limited subsidized housing in areas of the city zoned for such developments, and endogenously by competitive developers (for formal private housing), by illegitimate absentee "landowners" (for informal settlements) and by beneficiaries of subsidized-housing (for backyard structures). Those among low-income households who are not granted subsidized housing (a fraction of income group 1 households and all of income group 2 households) will compete for locations within and across the different market segments (formal private, informal settlements and backyards), with housing being allocated to the highest bidder in each market segment. 14 In the subsection below, we begin by deriving the demand and supply for the different housing types before presenting the equilibrium in the subsection that follows. 13 Although income groups 3 and 4 face similar housing choices, we distinguish between these two groups in order to better account in our simulations for income heterogeneity and spatial sorting along income lines. 14 Observe that although there is competition for land within each market segment, there is no direct competition for land across market segments in the sense that households choosing to reside in one type of housing do not need to outbid households choosing to reside in another type of housing. This stems from the fact that the locations of informal settlements and of subsidized-housing programs-where backyarding occurs-are exogenously given. Households from income groups 1 and 2 can nevertheless decide in which market segment to demand land, increasing or decreasing the demand for land in the different market segments accordingly.

Housing markets 3.2.1. Housing supply
In each cell x, the total quantity of available land (free of constraints) is exogenously given by L(x). This amount is further broken down into land available for each primary housing type, denoted L h (x) for h = FP, FS, IS. In our framework, because informal settlement locations vary little over time and because the quantity of land allocated to subsidized housing is a policy decision, L FS (x) and L IS (x) are exogenously given. This implies that the quantity of land available for private formal development is also exogenous and given by the residual: As will be detailed below, the fraction of subsidized-housing land allocated to backyarding will be endogenously determined.
The number of individuals residing in each housing type, N h (x) for h = FP, FS, IS, IB and the overall number of individuals residing in each cell, N(x) (= ∑ h N h (x)) are also endogenous quantities.
Below, we derive the supply of each housing type in a given location x.
Formal private housing. Let us start with presenting the supply of formal housing by competitive developers. In a location x, a developer will purchase land at a price P(x) from absentee landlords and will combine land with capital to produce housing, before renting out housing to individuals at a price R FP (x). Note that both prices P(x) and R FP (x) will be determined in equilibrium but for the time being, we consider them as given and express housing supply conditional on these prices. As standard in the developer model (see Fujita, 1989), the housing surface built, S FP , is given by a production function with constant returns to scale: S FP (K, L) = κL a K 1−a , where 0 < a < 1 is the land elasticity of housing production, L is the land surface occupied by the building, K is the capital used for development, and κ is a scale parameter. 15 We express the quantity of housing produced per unit of land as: where k = K/L is the capital per unit of land. For a developer, the profit per land unit in location x is thus: where ρ is capital depreciation and δ is the cost of capital. Profit maximization with respect to capital per unit of land yields the solution: 15 The literature is split regarding the specification to use for housing production functions. The practices in the US has long been to use a CES specification with an elasticity of substitution lower than 1, implying that the ratio of capital to land value decreases with distance to the city center (see Larson and Yezer, 2015). Recent papers for the US and France, however, have concluded that a Cobb-Douglas function (implying an elasticity of substitution equal to 1) is a good approximation (see Epple et al. 2010, Combes et al. 2016).
Note that Eq. (6) expresses the supplied housing quantity per unit of land in location x as a function of the market-determined rent for formal private housing in that location. 16 In location x, the total quantity of supplied formal private housing will be Formal subsidized housing. Let us now turn to the supply of subsidized housing (RDP/BNG programs). For simplicity, in our framework, subsidized housing is exogenously supplied for free to a limited number of individuals among income group 1 (the low-income group). 18 Each plot in the single-family subsidized housing scheme is of fixed size q FS , including a backyard of fixed size Y . As we will see below, occupants of subsidized housing may decide to rent out a fraction µ(x) < 1 of their backyard, so that the remaining quantity of housing that they end up consuming is Informal housing in backyards. We adopt here a simplified version of the "backyarding model" recently proposed by Brueckner et al. (2018). In our setting, some individuals from income group 1 will be granted subsidized housing for free. The other individuals from income groups 1 and 2 may decide to reside informally in backyard structures, paying a rent R IB (x) per unit of housing (to be determined in equilibrium) to beneficiaries of subsidized housing.
In each location x, the fraction of backyard space rented out µ(x) is chosen to maximize the utility of subsidized housing beneficiaries, under the budget constraint: 19ỹ The first-order condition leads to: 16 Using the zero profit condition, the price of land paid by developers to absentee landlords is also a function of the price of housing sold by developers to individuals, with P( 17 We abstract from modeling the construction and funding of infrastructure networks (water, electricity, transport) to support spatial urban expansion. Infrastructure network expansion costs could be considered in the model as additional costs borne by private developers through impact fees, or as a cost collectively funded by city residents under a property tax. 18 Subsidized housing could be provided at a non-zero price without significantly altering the results of the model. 19 Observe that all subsidized housing beneficiaries belong to income group 1, hence the notationỹ 1 (x) to denote income net of commuting costs.
Note that µ(x) increases with R IB (x), which replicates a result from Brueckner et al. (2018): under well-behaved properties of the utility function, all things else equal, a higher rental price for backyard structures will increase the supply of backyard housing. 20 The quantity of backyard housing in location x will thus be S IB ( is the exogenous number of subsidized plots in location x. Informal settlements. Zones where informal settlements occur are exogenously determined in the model (accounting for historic locations) so that the maximum supply of informal settlement land in a location x is L IS (x). Individuals residing in informal settlements pay a rent R IS (x), even though this payment is not made to the legitimate owner of the land (see Brueckner and Selod, 2009, for a description of squatting arrangements and associated payments). In our setting, the rent extracts informal settlers' willingness to pay for living in an informal settlement given the negative externality and the fixed size of informal structures q I . For simplification, we assume that it does not cost anything to build an informal structure and that no capital investment is required (as informal structures only have one floor, i.e. a floor-area ratio of 1) so that it is not necessary to model the building decisions of illegitimate absentee "owners" of informal settlement. This implies that in location x, given the quantity of land L IS (x) available for informal settlers, there can be at most L IS (x)/q I informal settlement structures.

Housing demand
Before deriving the demand for the different housing types, note that the budget constraint of a household of income group i, and residing in location x, under housing type h can be written as: where 1 {h=FS} is the indicator function equal to 1 for occupants of subsidized housing (as these households have rental income µ(x)Y R IB (x)) and equal to 0 for everyone else, and R h is the rent per unit of housing of type h (with R FS = 0).
Below, we derive the demand for housing conditional on location x and on each housing type h, starting with formal private housing.
Formal private housing. For a given location x, an urban resident will demand a quantity of housing that maximizes utility (4) under constraint (8) and the minimum dwelling size condition q FP ≥ q min . 21 This yields the following first-order conditions: 20 With a general utility function, the effect of land rents on backyard space rental is ambiguous because the increment in income associated with higher rents (which tends to decrease the rental of backyard space) plays in the opposite direction of the substitution effect associated with a greater opportunity cost of own yard space consumption (which tends to increase the rental of backyard space). In theory, the supply of backyard housing could thus decrease if the former effect dominates the latter. Brueckner et al. (2018), however, show that a standard utility function, such as the Cobb-Douglass, rules out this possibility altogether. 21 Note that the minimum dwelling size q min is different from the basic housing need q 0 that we introduced earlier in the utility function (with q min ≥ q 0 ).
Because we have a minimum dwelling-size condition, we solve the system as follows: Let us denote Q * (x, A(x), i) and Z * (x, A(x), i) the optimal quantity of formal housing and composite good that households would want to consume in the absence of a minimum dwelling size requirement. Rearranging terms from the first two conditions in system (9) and plugging them into formula (4), we can express utility as: This implicitly defines Q * (x, A(x), i | u) as a function of u. Note that, because α < 1, u increases with Q * (x, A(x), i), which implies that Q * (x, A(x), i | u) is an increasing function of u. Because the SOC is verified (given that α and β < 1), it is then easy to see that the constrained housing demand (i.e., the housing demand that is potentially constrained by the minimum dwelling-size condition) Plugging back Q FP (x, A(x), i, u) into the first condition in system (9) and inverting the resulting equation in the rent gives the bid rent: which expresses the maximum rent a type i household would be ready to pay to reside in private formal housing in location x in order to attain utility u. From equation (10), we can see that Q FP (x, A(x), i, u) is an increasing function of u, a decreasing function of A (x), and a decreasing function ofỹ i . Therefore, the bid-rent ψ i FP (x, u) is an increasing function of A (x), and an increasing function ofỹ i . This implies that the bid-rent will be greater in locations with high amenities, and good accessibility to jobs. From equation (6), the quantity of housing produced per unit of land is an increasing function of rents, therefore it will also be greater in those locations.
Formal subsidized housing. Formal subsidized housing is offered in overall quantity N FS = ∑ x N FS (x) to a fraction of income group 1 households. The "demand" for subsidized housing will thus involve rationing as long as N FS < N 1 . 22 Note that the utility of a subsidized-housing recipient residing in x is: . 22 Note that, in the model, beneficiaries of subsidized housing have the option to reject the offer (see the equilibrium definition in Section 3.3). In practice and in our simulations, however, subsidized housing is sufficiently advantageous for all beneficiaries to always accept the offer.
Informal housing in backyards. Backyard structures have a fixed size, q I . Because individuals in backyard structures will spend all their income net of commuting and housing costs on the composite good, a household residing at location x obtains utility: Inverting Eq. (12) in the land rent gives the following bid rent: As in the case of formal private housing, the above formula measures the maximum rent an income group i household would be willing to pay for backyard housing in x, while commuting to c, in order to attain utility u. Because the income net of commutingỹ i (x) decreases when moving away from jobs, it is easy to see from (13) that a household will be willing to pay more to reside in a backyard structure located closer to jobs. The supply of backyard structures will in turn positively respond to these higher bids as can be seen in equation (7). 23 Informal settlements. Finally, the same reasoning applies to the demand for informal settlement housing, leading to the following bid rent: which measures the maximum payment a household of income group i would accept to pay to obtain utility u while residing in an informal settlement in x and commuting to c. 24

The static equilibrium
We can now define an equilibrium as follows: Definition. An equilibrium is the set u i ; N h i (x); R h (x); S h (x);W ic , for all i, h and x (where these functions are defined), where: • u i is the utility of income group i; is the distribution of households of income group i, housed in housing type h, and residing in cell x; • R h (x) is the market rent of housing type h in cell x where these housing types are present, i.e. for x ∈ X h = x | N h = ∑ i N h i (x) > 0 and h ∈ {FP, IB, IS}; • S h (x) is the quantity of each housing type h in cell x; • W ic is the number of workers from group i choosing to work in c.
and satisfying the following constraints: for all x, and for h = FP, IB, IS; (v) Note that (i) is a set of population constraints (which ensure that the city hosts all individuals in equilibrium). (ii) is a city-edge constraint (which reflects the indifference of absentee landlords at the city fringe between selling their land to a developer or engaging in agricultural activities). (iii) is a set of utility equalization constraints (which reflects indifference among individuals of each income group between locations and housing types). This utility equalization constraint does not involve beneficiaries of formal subsidized housing, as they benefit from a windfall transfer from the State and will have a higher equilibrium utility that non-beneficiaries in their income group. 25 (iv) ensures that land is allocated to the highest bidder for each housing type in each cell (with the exception of subsidized housing beneficiaries who do not compete for land with anyone), and that housing demand and housing supply are equated in each location. 26 Note that (iv) reflects competition for land within submarkets but not directly across market segments. Finally (v) ensures labor-market clearing.
Observe that in equilibrium, formal and informal housing markets are connected in several ways. Firstly, there is a direct connection due to the fact that, with the exception of subsidizedhousing beneficiaries who receive a transfer from the State, other poor households from income group 1 and from income group 2 optimize across formal and informal residential options until their utilities are equalized (constraints (iii) and (iv) in the equilibrium definition). Secondly, the fact that informal settlements and backyarding locations are exogenously determined does not 25 Note that, in equilibrium, we allow households to decline the subsidized housing they are offered and decide to live in an informal settlement, in a backyard structure, or in the private housing sector instead. If the utility from residing in a subsidized housing location is lower than for other housing types, then the household would be better-off declining the offer and the housing unit will remain vacant. In practice, however, this is very unlikely to happen given the advantageous conditions (free rent, relatively large dwelling, and possibility of renting out the backyard) under subsidized housing. 26 Because we assume that only the poor may reside informally, note that N IB i = N IS i = 0 for i = 3, 4 (income groups 3 and 4).
imply that formal and informal housing developments occur in isolation of one another. In fact, they are linked through the choices of poor households across formal and informal housing options, and because formal developers' building decisions respond to private formal housing prices (see equation (6) and constraint (iv) in the equilibrium definition), with private formal housing prices partially reflecting the sorting of low-income households across formal and informal housing market segments. Finally, there is an externality associated with the use of land for informal settlements and for publicly subsidized housing as these areas are somehow taken away from developable land that would otherwise be available for private formal development (see the land-use accounting equality (5)). This affects the supply and demand for formal housing by restricting the set of potential locations available for private formal development, while accommodating a potentially large number of urban residents in the informal sector. 27 Existence and uniqueness of equilibrium. Although the model is simple and has clearly laid-out supply and demand mechanisms, it is not possible to solve it analytically and we will resort to numerical simulations. As regards existence and uniqueness, it can be shown that the equilibrium exists and would be unique in the open-city case, as bid-rents, dwelling sizes, housing supply, and therefore population densities, are uniquely defined for given levels of utility. In our closed-city case, however, the unicity of the equilibrium is more complex to derive. Because of potentially non-monotonic residential sorting under a Stone-Geary specification function, one could suspect the possibility of multiple equilibria. Pfeiffer et al. (2019), however, theoretically show that with two income groups and one housing type, the equilibrium with Stone-Geary utilities is always unique. In our context with four income groups and four housing types, although we do not have a formal proof of equilibrium unicity, it is noticeable that running 250 simulations of our benchmark case (starting from a wide range of starting points), the algorithm always converged to the same equilibrium solution. Although we cannot prove it formally, this strongly suggests that the model has a unique equilibrium.

Dynamics
Before describing how the model can be solved numerically (see Section 3.5), we first extend it to a dynamic version. In this dynamic version, the system is affected by exogenous variations in inputs over time (for example under a scenario of exogenous demographic changes) and the system responds with adjustments to these exogenous shocks that do not occur instantaneously. More specifically, we assume that the formal housing stock depreciates with time and that formal developers respond to price incentives with delay as in Viguié and Hallegatte (2012). 28 Mathematically, this implies that the stock of housing at time t, S FP (x | t) may not equate the theoretical equilibrium quantity, S eq FP (x | t). Denoting τ the time lag for construction (i.e., the time 27 The net effect on formal housing prices is ambiguous as the restricted supply of formal land should raise formal housing prices in the center, while pushing away population to peripheral areas where prices will be lower. Housing in the informal sector reduces the demand for formal housing, which exerts a downward pressure on formal housing prices. 28 We do not assume such delay for the informal sector, which, in practice, can respond very quickly to changing conditions. needed to complete a housing project) and θ the time lag for depreciation (i.e., the time needed for total depreciation of a building), the change in the housing stock between times t and t + 1 is: This law of motion reflects developers' investments when the current stock of housing is below the equilibrium and the absence of investment if the reverse is true. 29

Numerical solution and simulation algorithm
In this subsection, we first present how the static equilibrium is solved in each period. We then describe how the dynamics is implemented.
Static equilibrium. We apply an iterative algorithm to converge towards a solution. Because we have a close city, the total population for each income group is fixed. Our algorithm then solves for all other variables. We start with an arbitrary set of initial utilities, from which we determine: (i) Housing demand for each housing type, using equation (10) for formal housing, and the fact that informal settlement dwellings have a fixed size q I ; (ii) Rents, using equation (11) for formal private housing, equation 13 for informal backyarding and (14) for informal settlements; (iii) Housing supply, using equation (6) for formal housing and equation (7) for informal backyarding. (iv) Population in all locations for all housing types, using equilibrium condition (iv).
By summing populations across locations and housing types, we obtain the total population for each income group. Utilities are then incrementally adjusted and steps 1-4 iterated until the target population allocation is simulated. Graph E.11 in Appendix E summarizes the procedure.
Dynamics. We consider the state of the city in year t. One year later, at t + 1, we solve the equilibrium for a new set of input parameters (which may have exogenously changed, for instance if the population has increased). This determines housing supply without private construction inertia. We then apply equation (15) to determine the actual formal private housing supply at year t + 1, accounting for inertia. Dwelling size and prices are then determined by deriving the new equilibrium given the period's housing supply. This determines the new state of the city. We then reiterate the process for subsequent periods. 29 Observe that the theoretical values S eq FP (x | t) and S eq FP (x | t + 1) will be equal in the absence of any exogenous variation between t and t + 1. The housing stock, however, may adjust so that S FP (x | t) and S FP (x | t + 1) are not necessarily equal.

Data sources and parameter estimation
We apply the theoretical model to a grid of 100 x 80 km that largely encompasses the existing urban footprint of Cape Town. The grid is subdivided into 500m x 500m cells. Each cell represents a location x in our theoretical framework. Because the different data sets that we use are available at different spatial resolutions, we either spatially aggregated or disaggregated the information using cell areas as weights.
We make use of a variety of data sets as direct inputs into the model and in order to calibrate parameter values. More specifically, the inputs that are fed into the model consist of the total population in the city at an initial date and its decomposition into income groups (N i ), the average income and employment rate (χ i ) by income group, land use constraints (L h (x)), and the monetary and time cost of commuting (τ m ) and (δ m ) between cells and job centers, for 5 different modes (walking, minibus/taxi, train, bus, private car). 30 Exogenously chosen parameters include the size of subsidized housing plot (q FS ), the time lag of housing investment (τ), the housing stock depreciation parameter (θ), the financial depreciation rate of built capital (ρ), and the agricultural land rent (P A ). Estimated parameters include the gravity equation parameter (λ), wages at workplace (w ic ), housing consumption elasticity in the utility function (β), the minimum housing consumption (q 0 ), the land elasticity of housing production (a), the scale parameter of housing production (κ), and the index value of amenities A(x). The disutility parameter of informal housing (B) is calibrated to reproduce the distribution between housing types generated by the model.
Below, we describe in more detail data sources and the calibration process.

Data sources
The spatial distribution of population is taken from National Censuses for the years 2001 and 2011. We define the four income groups by choosing income-group thresholds such that only the lowest income group is eligible for subsidized housing programs, and so that the two highest income groups are not observed to reside informally (see Appendix A for details). 31 We use the transport model used by the City of Cape Town to retrieve transport times between pairs of transport zones for each transport mode and job locations. 32 We also use aggregate statistics on modal shares and residence-workplace distances in Cape Town, that are derived from Cape Town's 2013 Transport Survey.
Land availability is defined for each housing type. Areas of subsidized housing are identified from the cadastre of the City of Cape Town. 33 The area available for backyard housing is estimated as the yard size of these units. Informal settlement areas are obtained from the Enumerator Area 30 For simplicity, in what follows, we do not index these variables with time. 31 The Census captures annual income, which we assume reflects the employment rate χ i . Households eligible for subsidized housing are the ones with an annual income (χ i w i,c in the model) below the threshold of R38,200. 32 The origin-destination matrix is produced by the City of Cape Town's four-step travel demand model, last updated in 2013 using the EMME/2 software. The model was designed by INRO Consultants at the University of Montreal and adopted by the City of Cape Town in 1991. The model implements an equilibrium route assignment based on the distribution of trip origins and destinations in relation to the transport network. The model is calibrated by means of the General Household Transport Survey, on-board surveys and cordon counts. 33 This corresponds to the category "Single Residential 2 -Incremental Housing". definition of the 2011 Census. Land available for formal private development corresponds to all land that is not constrained for construction. 34 The amenities that we consider include natural amenities (such as slope and proximity to the ocean) as well as historical amenities (such as the proximity to the historical center). The data sets used are listed in Appendix C.4.
For the estimation of the model's parameters (see below), we also use property price data extracted from the City of Cape Town's geocoded data set on property transactions for 2011, as well as data on dwelling sizes made available to us by the City of Cape Town.

Estimation of the parameters of the model
The estimation of the model is done in three steps. First, we choose a first set of parameters using available information, without solving the model. These include the minimum dwelling size q min , the size of subsidized plots q FS and of backyards Y , the construction lag τ, the physical and financial depreciation of housing θ and ρ, the interest rate δ, and the agricultural rent R A . The minimum dwelling-size for formal housing is set at q min = 31.6 m 2 , which is the minimum dwelling size observed in formal neighborhoods. Backyards of subsidized houses have a size Y = 70 m 2 . We choose the time lag of housing investment τ to be 3 years and the physical depreciation time of building stock θ to be 100 years, as in Viguié et al. (2014). The financial depreciation rate of the built capital is ρ=.05 (i.e., 5%). We allow the interest rate δ and the agricultural land rent P A to vary with time. For δ, we use the annual values for South Africa in the World Development Indicator database (World Bank, 2016). We set the agricultural price at the city border P A at 807 Rands/m 2 (annual) in 2011, which corresponds to the ninth decile in the sales data sets, when selecting only agricultural properties in rural areas. In the dynamic simulations, we assume that the agricultural land is constant in real terms and have its nominal value increase at the same rate as the average household nominal income.
Second, we calibrate wages, housing production function parameters, utility function parameters and amenities using partial relations from our model. Following Ahlfeldt et al. (2015) and Tsivanidis (2018), we recover the vector of wages (w ic ) using data on job locations and residential locations. The scale parameter in the commuting formula, λ, is estimated using the distribution of residence-workplace distances in Cape Town. We identify the land elasticity of housing production (a) and the scale parameter of housing production (κ) by regressing the log of equation (6) (see Appendix B for details) . We then consider equations (9) and (11), which relate utility levels to dwelling sizes, rents and amenities. The amenity term, A(x) is expressed as a score for all locations, and specified as A(x) = ∏ i a i (x) ν i , where the a i (x) are measures for each amenity type (see Appendix C.4), and ν i are their marginal valuation, to be estimated. We simultaneously estimate the system of equations by maximum likelihood and recover parameters {β, q 0 , ν i }. Appendix C.4 presents the procedure in more detail.
Third, we calibrate the disutility parameters of informal housing (B IB and B IS ) by running the entire model to replicate the share of households in informal settlements and backyard housing in the 2011 Census data.

Benchmark simulation and retrospective fit
We run a benchmark simulation to compare the outputs of the model with the data. Past evolution of average income, total population and income distribution are derived from Census data. Results are presented on Figure D.8 of Appendix D, which graphically shows that the overall fit is reasonable. We run a retrospective simulation (i.e., running the model "backwards") starting in 2011, and compare the outputs of the model 2001 estimation with Census and property price data for the same year. We present the details and results for this retrospective simulation in Appendix D, which shows that the model appropriately replicates changes in housing prices over time. The good fit provides confidence that the model can reasonably be used to simulate the future evolution of Cape Town's spatial structure.

Scenarios and prospective simulations
We consider scenarios of income growth and population trends aligned to those which inform the City's Land Use Scenarios underpinning its medium-term infrastructure master plans (City of Cape Town 2017, Medium Term Infrastructure Investment Framework). The anticipated twentyyear supply of State-subsidized housing is based on the City of Cape Town's Housing Pipeline as contained in its Integrated Human Settlement Framework (2013) (see Appendix F). All the other parameters remain constant. 35 We prospectively run simulations for the period 2011-2040.

Urban growth boundary
There has long been discussions in policy circles of Cape Town being a sprawling city. Against a backdrop where Cape Town's urban footprint was estimated to have expanded by over 1,000 hectares a year during an unprecedented housing boom during the late 1990s and early 2000s, the City introduced an Urban Growth Boundary (or 'Urban Edge') as a policy guideline and then, in 2012, as a statutory instrument. It was delineated to include sufficient developable land to accommodate future growth for at least 10 years and was thus not immediately binding. We simulate two scenarios: the 'No Urban Edge' scenario where the Urban Edge constraint is absent (and the city's urban footprint is permitted to expand unhindered into its rural hinterland) and the 'Urban Edge' scenario where it continues to be present (see Figure F.12 representing the Urban Edge). 36 35 In our dynamic simulations, we assume that, for each income group, the wage ratios across job sub-centers remain constant over time (w ic /w i c is the same for any i, i and c, and w ic /w ic is the same for any i, c and c ). In levels, the mean wage for each income group grows at a constant rate. 36 In South Africa, the Urban Edge enjoyed support from policymakers, academics and environmentalists alike as a means to protect valuable agricultural land, natural amenities and the functioning of ecological services, while supporting a more compact urban environment. It has been opposed by local politicians and property developers. Developers claimed that the urban growth boundary would generate regressive distributive effects since the restriction of land supply to the housing market raises the cost of housing. Politicians claimed that, by encumbering greenfield development, the growth boundary invariably stifles economic growth and job creation. The Urban Edge is not mentioned anymore in the City of Cape Town's current spatial development framework.
We run the simulation until 2040, when the population of the City reaches 1,770,000 households (compared to 1,068,000 in 2011). 37 Maps (a) and (b) of Figure 2 show the population density and urban footprint under the two scenarios. Without the Urban Edge, the urbanized area would expand to 1,208 square kilometers, an urban footprint that is 40% greater than if spatial growth had been contained by the Urban Edge. Densities would be significantly greater, especially in the city center. Maps (c) and (d) of Figure 2 show that the lower footprint and greater density under the Urban Edge scenario would occur with significantly higher formal prices. Within 6 km of the CBD, we find that formal prices would be 21% higher under the Urban Edge Scenario than without the Urban Edge. Because formal housing would be less affordable to the poor, there would be an increase in the demand for informal housing, as shown on the histogram (e) of Figure 2. Because we assumed no spatial expansion of informal settlement footprints (only a densification in informal settlements), these would have become saturated by 2040 and backyard housing would absorb the informality differential between the two scenarios. In the Urban Edge scenario, we find that the number of households living in informal housing would be 27% higher than in the 'No Urban Edge' scenario.

Public housing provision scenarios
Subsidized housing has been an important part of post-Apartheid policies trying to address the housing backlog. The vast majority of the approximately 336,000 households who live in public housing as of 2016 (Statistics South Africa) live in dwellings transferred as part of the RDP and later the BNG program, delivered at a rate of approximately 10,000 per year in the 1990s and early 2000s, declining to about 5,000 per year by the late-2000s due to budget constraints and diversification to in situ upgrading of informal settlements. 38 We consider three scenarios for future public housing provision. In the first scenario (entitled 'business as usual' or BAU), we assume that the provision of public subsidized housing follows the current pace of 5,000 dwellings per year. In the 'low' scenario, we assume that construction of public housing is slowed down to a pace of 2,500 per year from 2019 onward. In the 'high' scenario, we assume that construction of public housing is accelerated to a pace of 10,000 dwellings per year starting in 2019. The sites for future public housing replicate the pipeline of projects known to the City of Cape Town starting with 'short-term projects', before considering 'long-term projects' (see map of Figure F.13). 39 37 The demographic growth projections used in the model correspond to the base projection used by the Cape Town metropolitan authority as of 2019. The 1.77 million households in 2040 will correspond to a total population of 5.3 million inhabitants. 38 Although government housing estates have featured in Cape Town since at least the 1920s (Wilkinson 2000), today, apartheid-era "Council housing" only includes 43,500 rental units, 21,000 homeownership dwellings, 11,000 hostel beds and 11 old-age home complexes (City of Cape Town Integrated Human Settlements 5-year Strategic Plan 2013/2014 Review). 39 The information on projects is extracted from a 2015 data set provided by the City of Cape Town, which gives the location and number of dwellings of future RDP/BNG projects, corresponding to a total of 255, 000 dwellings to be built. We assume that projects indicated as 'short term' will be built before 2025, while 'long term' projects will be built from 2025 onwards.  In Figure 3, we represent the change in the number of dwellings of each type occupied by households from income groups 1 and 2. We see that in both scenarios, the number of informal dwellers increases over time. In the high scenario, an intensification of the subsidized-housing program causes a decrease in the number of households residing in informal settlements, but the supply of backyard space induced by the construction of BNG/RDP houses results in more households in backyard housing.

Conclusion
The paper lays out the foundation for a simple urban simulation tool that can easily be implemented in developing country contexts and used by urban planners to generate broad urban development trends. An important contribution is the explicit modeling of both formal and informal housing markets and their interaction, which is a key feature of many cities in the developing world. Having a realistic model of that interaction makes it possible to more accurately simulate city structure in cities where informal housing accommodates a significant portion of the population (and as formal and informal housing have different land use implications). Such a model also makes it possible to simulate the evolution of informal housing over time, an important policy issue that is of course impossible to assess in a model with only formal housing. As a proof of concept, our simulations of zoning policies (with and without an urban growth boundary) and subsidized housing policies (different scenarios of the subsidized housing program) illustrate that point as demand for informal housing responds to land supply restrictions and the higher formal land prices that ensue. The increase in housing informality following an urban growth boundary is an unintended systemic effect that was not previously envisioned in the literature, which only focused on developed country contexts. As for the subsidized housing simulations, they show that income inequality and population dynamics are such that housing informality is likely to persist over time despite policy efforts to reduce it, confirming a theoretical result first derived by Cai et al. (2018). Interestingly, in the Cape Town case, the substitution of backyarding to traditional informal settlements-a trend present in the past data and confirmed in our simulations for the future-stresses the changing nature of informal housing in South African cities. This is a noticeable trend as ongoing discussions in South Africa revolve around the facilitation of such dwelling arrangements to increase access to affordable housing and to stimulate densification (see Brueckner et al., 2018, for a more in-depth discussion).
The model will be available to the wider public on an open source basis and is expected to be further refined and applied to other city contexts in the future. Specific features may be added or removed from the model depending on the context and the policy focus. Two important modifications, in particular, that we intend to prioritize for future versions of the model are the integration of endogenous transportation costs (that may change as congestion will be modified by changes in land use and transportation patterns) 40   Transport times. We use the outputs of the City of Cape Town transport model (EMME) to retrieve the matrices {τ m } and {δ m }. 41 The outputs of EMME give us the time and distance matrices between more than 1, 700 Transport Zones throughout the city, for four modes: private car, bus, train and minibus/taxi. In order to include walking as a fifth mode, we assume that individuals may also walk at a speed of 4 km/h. To retrieve the hourly wage from annual wage data, we assume that individuals work 8 hours per day, during 235 days per year. The cost of time is then valued as the time spent commuting (in hours) multiplied by the hourly wage. Land available for formal private development L FP corresponds to all land that is not constrained for construction, or occupied by subsidized housing or informal settlements. Constraints are of three types: (i) physical constraints, such as the ocean, (ii) other land-use types, e.g. commercial and industrial activities, and (iii) zoning constraints, including parks and natural protected areas. Figure B.5 maps the grid and the share of each pixel that is available for development, for each housing type (L FP , L IB , L IS ).

. Exogenous amenities
We measure amenities of different types in each location, denoted a n (x). Table B.4 summarizes the different amenities that we include in the model, as well as the data sources. We calculate amenity values both at the Sub-Place level (for the estimation of model parameters, see the calibration section below) and at the grid pixel level (to run the simulations). 42 Amenity a n (x)  (2018), we estimate adjusted incomes at each workplace using the population working in each job center c, W ic , the population in each residential place N i (x). We use aggregate statistics on the distribution of commuting distances in Cape Town to set the gravity parameter λ. For a given value of λ, we derive the vector of incomes y ic by numerically solving equation 3, for each income group i. From equilibrium condition (v), the total number of workers sums to the total number of residents multiplied by the employment rate for each income group i. This implies that, for each i, there is a 1-dimensional vector of incomes{y ic } that are solutions for equation (3). We pick the solution so that the average income of group i is the same as the average income for each income group derived from the 2011 Census. We then aggregate the total distribution of residence-workplace distances, and compare it with the data, aggregated from Cape Town's Transport Survey 2013. We select the value of λ, and the associated {y ic } that minimizes the total distance between the calculated distribution of commuting distances and aggregates from the Transport Survey (see figure C.6). We use λ = 4.27, for hourly wages.

Appendix C.4. Estimation of utility-function parameters and the amenity index
We structurally estimate utility-function parameters β and q 0 . To do this, we consider a large set of possible values for both β, q 0 and utilities of the four groups, and conditional on these values, we calculate the amenity index that best fits formal rent, transport and income data. We then regress the amenity index on local amenity measures available in the data. This allows us to construct a likelihood measure for the fit on amenities. In parallel, we also construct a likelihood for the fit on dwelling sizes. Among all the possible β, q 0 (and utilities), we select those that provide the maximum product of the two likelihoods. This is explained in detail below.
Using the parameters obtained in Appendix C.2, we derive the rent per unit of floor area R s = ρ+δ κ(1−a) 1−a (P s ) a . For each Sub-Place s, we derive the dominant income group in the Census data, that we denote i(s). We define the income in subplace as y s = y i(s) , and the related income net of commuting costs isỹ s .
Combining equations 4 and 9 at the Sub-place level, we obtain the following relationship, for all s: where u i(s) is the (constant) utility of income group i(s), and A s is the amenity index in s.
The relationship between rents and dwelling size is given by (9): We define a range of possible values for β and q 0 , knowing that 0<β<1 and the minimum consumption of housing q 0 must be below the size of informal dwellings q IS = q IB = 20 m 2 .
For each possible value of β, q 0 , and u i we calculate the amenity index as: In each Sub-Place, the amenity index is an aggregate of several amenities, as given by A s = ∏ n (a n,s ) ϑ i ε A,s . We estimate the equation log(A s ) = ν 0 + ∑ ϑ n log (a n,s ) + log (ε A,s ) to identify the set of (ϑ n ) q 0 ,β conditional on q 0 and β. As for the simulated dwelling sizes, they can be written as q s = βỹ s R s + (1 − β)q 0 R s . We further denote ε q,s the ratio of the dwelling sizes in the data (q s ) and of the simulated dwelling sizes ( q s ), with q s = q s ε q,s . Finally, for a set of {β, q 0 , u i }, we estimate the log-likelihood that the model predicts the correct income sorting. To do that, we calculate the likelihood that the model reproduces income sorting as the likelihood of a discrete-choice logit model of land allocation to the highest bidder (consistently with competition for land within the formal private sector). Identifying the group with the highest bids as the dominant group in the data, we can write the log-likelihood for income sorting as l = ∑ s where λ inc is the scale parameter of a Gumbel maximum distribution.
We identify the coefficients {β, q 0 , ϑ i } by maximizing the sum of log-likelihoods of the distributions ε A,s and ε q,s (assuming that ε A,s and ε q,s follow a log-normal law of mean 1) plus the log-likelihood l. We first scan a discrete set of values for the parameters. From the best solution, we then run Matlab's 'interior-point' algorithm to find the maximum. The obtained values for the parameters ϑ i are presented in table C.5. We use these coefficients to generate a map of the amenity index for every location of the grid (see Figure C 44 Recall that the amenity for living in formal housing is normalized to 1.
income distribution, the interest rate and the price per kilometer for fuel. Other parameters for transport costs vary proportionally to the nominal average income. Figure