MyNixOS website logo
Description

Simulate Impact of Different Urban Policies Through a General Equilibrium Model.

Develops a General Equilibrium (GE) Model, which estimates key variables such as wages, the number of residents and workers, the prices of the floor space, and its distribution between commercial and residential use, as in Ahlfeldt et al., (2015) <https://onlinelibrary.wiley.com/doi/abs/10.3982/ECTA10876>. By doing so, the model allows understanding the economic influence of different urban policies.

Description

This directory has all the functions to simulate the model from Ahlfedlt et al. (2015)

##Outline of Code

##1. Auxiliary functions: utils.R

1.1 array_operator.R

Goal: an R function to compute matrix operations like Matlab such as .*, ./, -, and + Description: self-explanatory Input: two arrays Output: a new array

1.2 sumDims.R

Goal: an R function to sum across columns for 3x3 matrixes Description: self-explanatory: useful for a model with multiple sectors Input: a 3x3 Matrix Output: a new vector with the sum of rows, columns, or the third dimension

1.3 sumDims.R

Goal: an R function to sum across rows or columns and then take the transpose Description: self-explanatory: useful for the basic model Input: a 2x2 Matrix Output: a new vector with the sum of rows or columns

##2. Main functions: basic_models.R

2.1 commuting_matrix.R

Goal: an R function to transform travel times into commuting costs Description: self-explanatory. Input: a matrix of travel times and the parameter epsilon (how easy is to substitute transportation modes) Output: a matrix of iceberg commuting costs.

2.2 av_income.R

Goal: an R function to compute the average income in each location Description: self-explanatory. Input: The matrix lambda_ij|i The vector of wages w_j Output: The average income in each location.

2.3 wages_inversion.R

Goal: an R function to invert the model and recover the wage distribution that matches the model and data Description: self-explanatory. Input: L_j Number of workers in each location L_i Number of residents in each location w_j An initial vector of wages theta: the commuting and migration elasticity tau: iceberg commuting cost matrix tol: tolerance factor nu: convergence parameter Output: w_j: a vector of wages that matches the model with the data lambda_ij_i the commuting shares conditional on living in location i W_i: a vector of commuter market access measure

2.4 density_development.R

Goal: an R function to invert the model and recover the density development that matches the model and data Description: self-explanatory. Input: Q_i vector of housing prices K_i size of each location w_j A vector of wages L_j number of workers y_bar: average income beta: output elasticity w.r.t labor alpha: exp. share in the consumption good mu: land development: output elasticity w.r.t capital Output: varphi_i: a vector of density of the model that matches the model with the data Q_mean: the geometric mean of housing prices Q_norm: housing prices normalized by the geometric mean FS_f: Commercial floorspace FS_r: Residential floorspace FS: total floorspace = varphi_i x K^{1-mu}

2.5 productivity.R

Goal: an R function to invert the model and recover the productivity vector Description: self-explanatory. Input: N number of locations Q_i vector of housing prices K_i size of each location w_j A vector of wages L_j number of workers t_ij travel times matrix delta decay parameter agglomeration lambda strength of the agglomeration force Output: A_i Endogenous TFP measure (takes into account the externalities) a_i baseline and exogenous productivity measure

2.6 living_amenities.R

Goal: an R function to invert the model and recover the amenity vector Description: self-explanatory. Input: N number of locations Q_i vector of housing prices L_i number of residents in each location W_j A vector of commuter market access measures t_ij travel times matrix theta commuting elasticity alpha exp. share in the consumption good rho decay parameter of congestion forces eta strength of the congestion force Output: B_i Endogenous amenity measure (takes into account the externalities) b_i baseline and exogenous amenity measure

2.7 inversionModel.R

Goal: an R function to invert the model and recover the economy fundamentals Description: self-explanatory. Input: N number of locations Q_i vector of housing prices L_i number of residents in each location L_j number of workers in each location K size of each location t_ij travel times matrix zeta convergence parameter tol tolerance factor alpha exp. share in the consumption good beta output elasticity wrt labor theta commuting elasticity delta decay parameter agglomeration rho decay parameter of congestion forces lambda strength of the agglomeration force eta strength of the congestion force epsilon paramet travel times to commuting costs mu land development output elasticity wrt capital Output: This function uses all the other function as inputs A_i Endogenous TFP measure (takes into account the externalities) a_i baseline and exogenous productivity measure B_i Endogenous amenity measure (takes into account the externalities) b_i baseline and exogenous amenity measure w_j vector of wages that match the model with the data varphi density of development Q_norm housing prices normalized

2.7 solveModel.R

Goal: an R function to solve the model and compute counterfactuals Description: self-explanatory. Input: N number of locations L_i initial number of residents in each location K size of each location t_ij travel times matrix a baseline productivity b baseline amenity endo_Lr update residents or not alpha exp. share in the consumption good beta output elasticity wrt labor theta commuting elasticity delta decay parameter agglomeration rho decay parameter of congestion forces lambda strength of the agglomeration force eta strength of the congestion force epsilon paramet travel times to commuting costs mu land development output elasticity wrt capital w_eq initial vector of wages Q_eq initial vector of housing prices theta_eq initial share of floorspace used commercially Output: w new vector of wages W_i new commuter market access measure B new vector of amenities (takes into account the externalities) A new vector of productivities (takes into account the externalities) Q new vector of floorspace prices lambda_ij_i new matrix of commuting shares L_i new vector of residents L_j new vector of workers ybar average income ttheta new vector of the share of floorspace used commercially u welfare in each location (not considering the shock) U aggregate welfare.

Metadata

Version

0.2.0

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows