Luis Alberto Alaniz Castillo
April 27th of 2018
s <- 0.2 # Savings rate
alpha <- 0.4 # Capital share in output
delta <- 0.1 # Depreciation rate
n <- 0.018 # population growth rate
a <- 0.03 # Technological progress growth rate
k0 <- seq(0, 6, length.out = 501)
t <- seq(0, 100, length.out = 501)
k0 <- matrix(k0, 501, 1)
t <- matrix(t, 501, 1)
y0 <- k0^alpha
c0 <- (1 - s) * y0
k <- matrix(0L, nrow = length(k0), ncol = length(t))
for (i in 1:501) {
for (j in 1:501) {
k[i, j] <- ((k0[i]^(1 - alpha) - (s/(delta + n + a))) * (exp(-(delta +
n + a) * (1 - alpha) * t[j])) + s/(delta + n + a))^(1/(1 - alpha))
}
}
y <- k^alpha
ss <- (s/(delta + n + a))^(1/(1 - alpha))
a1 <- a * 100
This is the equation for the transitional dynamics of the capital stock which can be solved analytically: \[ \dot{k} = sk^{\alpha}-(\delta+n+x)k \] This is the equation for the equilibrium path of the capital stock and the analytical solution of the equation above: \[ k = (((k_{0}^{(1-\alpha)}-\frac{s}{(\delta+n+x)})e^{-(1-\alpha)(\delta+n+x)t})+\frac{s}{(\delta+n+x)})^{\frac{1}{(1-\alpha)}} \]
This is the equation for the equilibrium path of output stock : \[ y = k^{\alpha} \]
The steady state of the model is 1.7 at that point all per capita variables grow at the rate 3.
M <- mesh(t, k0)
surf3D(x = M$x, y = M$y, z = k, colvar = k, plot = TRUE)
M <- mesh(t, y0)
surf3D(x = M$x, y = M$y, z = y, colvar = y, plot = TRUE)