Function Reference

LandUse.ParamType

Parameter Struct

This struct defines the parameter type for the model. It reads default values from the file src/params.json. Those values can be overridden by supplying a Dict to the constructor with key => value pairs:

p = LandUse.Param(par = Dict(:η => 0.1))

creates a Param instance with agglomeration forces set to 0.1

source
LandUse.RegionType

Region type

Urban expansion model with flexible commuting cost and differential supply elasticity. This represents a single region. A region contains one potential urban area, and a rural area. A Region can be part of a wider Country.

source
LandUse.UrbanType

Urban Model

This model has a fixed price of land ρr in the rural sector. Differently to our baseline model, where ρr is a GE object.

source
LandUse.D2Method

Population Density at location $l$. second version, independent of Lu

source
LandUse.Eqsys!Method
Eqsys!(F::Vector{Float64},m::Region,p::Param)

compute system of equations for the general (with flexible ϵ).

source
LandUse.Eqsys!Method
Eqsys!(F::Vector{Float64},m::Urban,p::Param)

compute system of equations for the general (with flexible ϵ).

source
LandUse.compute_ξwMethod
compute_ξw()

Computes input parameter ξw directly from data. Notice that $1 - \xi_w$ is the elasticity of speed to wage income. We measure from individual commuting data in ENL (Enquete National de Logement) an increase in commuting speed of about 11% from 1984 to 2013. This function returns

$\xi_w = 1 - \frac{11}{\%\Delta \theta_u}$

where $\%\Delta \theta_u$ stands for the percentage increase in urban wage from 1984 to 2013.

source
LandUse.crMethod

optimal rural good consumption at location $l$. Equation (7) divided by p

source
LandUse.cuMethod

optimal urban good consumption at location $l$. Equation (8)

source
LandUse.dashMethod
dash(it;par = Dict())

Helper function for quick Region dashboard.

source
LandUse.dashk20Method
dashk20(;save = false)

Produce and optionally save model output for 20 city version.

source
LandUse.getfringeMethod

Get Fringe from indifference condition

At the fringe $\phi$ we have the condition

\[w(0) - \tau(\phi) = w_r\]

which can be rearranged to obtain a map from $w(0) - w_r = \tau(\phi)$.

The function takes $w(0) - w_r$ as argument x. then we give $\tau(\phi)$ to its inverse function to get back $\phi$

source
LandUse.integrate!Method
integrate!(m::Urban,p::Param)

could be made much faster by filling a matrix col-wise with integration nodes and doing a matmul on it? have to allocate memory though.

source
LandUse.invτMethod

inverse commuting cost. cost x → location. Notice we don't consider that cost is zero beyond ϕ: we want to find ϕ here to start with.

source
LandUse.issue10Method

plot $\phi_k$ vs $L_{u,k}$ for all regions $k$ and different eps slopes. relates to https://github.com/floswald/LandUse.jl/issues/10

source
LandUse.issue11Method

measure increase in land value at fringe. by default starts in 1960 and measures increase up to 2020.

https://github.com/floswald/LandUse.jl/issues/11

source
LandUse.issue36Method
https://github.com/floswald/LandUse.jl/issues/36
  1. same growth in sectors i. high cbar vs low sbar: show implied city density time series to see that only that config works ii. show falling housing spending share as well
  2. implications of growth in either sector only
  3. identify commuting cost params by matching time series data
source
LandUse.issue59Method

run model with flat epsilon

https://github.com/floswald/LandUse.jl/issues/59

source
LandUse.issue60Method

run model with agglomeration forces

https://github.com/floswald/LandUse.jl/issues/60

source
LandUse.issue64Method

run model with congestion forces

https://github.com/floswald/LandUse.jl/issues/64

source
LandUse.issue66Method

run multi city with congestion

https://github.com/floswald/LandUse.jl/issues/66

source
LandUse.issue9Method

plot $\phi_k$ vs $\L{u,k}$ for all regions $k$. relates to https://github.com/floswald/LandUse.jl/issues/9

source
LandUse.jcMethod

solve a Country at point x0

keywords:

  • estimateθ: whether the sequence of $\theta_u$ should be a choice variable
  • solve : solve the model (true) or return the model object for debugging?
  • fit_allyears : try to match the population distribution in all available years or just a single year.
source
LandUse.jmMethod

solve model at current Param p and starting at point x0

Keyword:

  • estimateθ: whether the sequence of $\theta_u$ should be a choice variable or not. default false.
source
LandUse.k20outputMethod

Produces output from 20-city model. In particular comparison with single city case, and extension with d1, d2.

source
LandUse.objectiveMethod
objective(x; moments = false, plot = false, save = false, fname = "moments")

moment objective function for an optimizer

source
LandUse.output_paperMethod

produces all output from the model needed to compile the paper.

This uses current baseline parameters defined in params.json

source
LandUse.p2xMethod
p2x(p::Param)

map param to x for objective function quick eval this is the inverse of x2dict.

source
LandUse.prepare_dataMethod
prepare_data(p::Param; digits = 9)

Takes raw csv data and prepares to be used in model. writes to csv input files.

Smoothing of Productivity Series

We take the following steps to obtain a smoothed series for $\theta_r$ and $\theta_u$:

  1. We obtain the estimated series at annual frequency.
  2. We subset both series to start in 1840 and end in 2015 (rural productivity ends in that year)
  3. We linearly interpolate the missing interwar years.
  4. Smoothing is done via the [smooth] function from the QuantEcon package: we use the default Hann window and a 15-year window size. We experimented with the window size until high-frequency oscillations disappear.
  5. Our rural productivity series gets very volatile from 2000 onwards, and in fact one would find a decreasing rural productivity series if we applied our smoother to post 2000 data. Therefore from the year 2000 onwards, we grow the smoothed series forward with 1% annual growth. Given that 2000 is very close to the final new steady state of the model, the actual choice of growth rate has only a small impact on our results.
source
LandUse.rel_cityareaMethod
rel_cityarea(m::Model)

Computes city area relative to total rural land use. This is the model moment related to the data moment artificialized land relative to agricultural land in 2015. We measure this to be 18.3% in the data.

source
LandUse.relpopMethod

return model relative population in each year to largest city largest city is city 1

source
LandUse.runkMethod

run Multi-region model for all time periods starting from the single city starting value.

source
LandUse.startvals_implMethod

collect valid starting values for the k country case by reusing the first period solution of each preceding step in θu along the sequence

source
LandUse.startvals_kMethod
startvals_k()

Find feasible starting values for multi city case (2 to 5 cities) and write to disk. By default return the saved dict with start param and initial guess vector x0.

source
LandUse.update!Method
update!(c::Country,p::Vector{Param},x::Vector{Float64})

Update a Country object with a current vector of choice variables x supplied by the solver. The ordering in x is:

  1. b: ratio of labor to land in region 1
  2. r: land rent
  3. pr: relative price rural good
  4. 4 : (K+3), Sr: amount of land use in rural production (complement of Srh)
  5. (K+4) : (2K+3), Lu: urban pop in each k
  6. (2K+4) : end, θu: urban prod in each k
source
LandUse.update!Method
update!(m::Urban,p::Param,x::Vector{Float64})

update a single region a parameter vector at choices x.

source
LandUse.wrMethod

rural wage from indifference condition at ϕ. Eq (11)

source