solveModel {IGCities} | R Documentation |
Function to solve counterfactuals.
Description
Function to solve counterfactuals.
Usage
solveModel(
N,
L_i,
L_j,
K,
t_ij,
a,
b,
varphi,
w_eq,
u_eq,
Q_eq,
ttheta_eq,
alpha = 0.7,
beta = 0.7,
theta = 7,
mu = 0.3,
delta = 0.3585,
lambda = 0.01,
rho = 0.9094,
eta = 0.1548,
epsilon = 0.01,
zeta = 0.95,
tol = 10^-10,
maxiter = 1000
)
Arguments
N |
Integer - Number of locations. |
L_i |
Nx1 array - Number of residents in each location |
L_j |
Nx1 array - Number of workers in each location |
K |
Nx1 array - Land supply |
t_ij |
NxN matrix - Travel times across locations |
a |
Nx1 array - Total Factor Productivity in each location |
b |
Nx1 array - Vector of amenities in each location |
varphi |
Nx1 array - Density of development |
w_eq |
Nx1 array - Initial vector of wages |
u_eq |
Nx1 array - Initial vector of welfare |
Q_eq |
Nx1 array - Initial price for floorspace |
ttheta_eq |
Nx1 array - Share of floorspace used commercially |
alpha |
Float - Exp. share in consumption, 1-alpha exp. share in housing |
beta |
Float - Output elasticity with respect to labor |
theta |
Float - Commuting and migration elasticity. |
mu |
Float - Floorspace prod function: output elasticity wrt capital |
delta |
Float - Decay parameter agglomeration force |
lambda |
Float - agglomeration externality |
rho |
Float - decay parameter for amenities |
eta |
Float - amenity externality |
epsilon |
Float - Parameter that transforms travel times to commuting costs |
zeta |
Float - convergence parameter |
tol |
Int - tolerance factor |
maxiter |
Integer - Maximum number of iterations for convergence. Default maxiter=1000. |
Value
Counterfactual values.
Examples
N=5
L_i = c(63, 261, 213, 182, 113)
L_j = c(86, 278, 189, 180, 99)
Q = c(2123, 1576, 1371, 1931, 1637)
K = c(0.44, 1.45, 1.15, 0.87, 0.58)
t_ij = rbind(c(0.0, 6.6, 5.5, 5.6, 6.4),
c(6.7, 0.0, 3.9, 4.6, 4.4),
c(5.5, 3.9, 0.0, 2.8, 3.0),
c(5.6, 4.6, 2.8, 0.0, 2.7),
c(6.4, 4.4, 3.0, 2.7, 0.0))
a = c(1.7, 1.7, 1.6, 1.8, 1.6)
b = c(2.2, 2.5, 2.4, 2.6, 2.3)
varphi = c(95, 219, 215, 167, 148)
w_eq = c(0.9, 1.0, 1.0, 1.0, 0.9)
u_eq = c(1.0, 1.3, 1.2, 1.2, 1.1)
Q_eq = c(1.2, 0.9, 0.8, 1.1, 0.9)
ttheta_eq = c(0.5, 0.4, 0.4, 0.4, 0.4)
solveModel(N=N,
L_i=L_i,
L_j=L_j,
K=K,
t_ij=t_ij,
a=a,
b=b,
varphi=varphi,
w_eq=w_eq,
u_eq=u_eq,
Q_eq=Q_eq,
ttheta_eq=ttheta_eq)