knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

Working Code Example

library(SolowVariants)
theme_set(theme_bw())

# Setting up the parameter grid ---------------------------------
aux_np <- 400
aux_parameter_grid <- create_parameter_grid(
  c("alpha", "phi", "lambda", "rho", "s", "sR", "delta", "n", "k"),
  c(1/3    , 0.5  , 0.9     , 1  , 0.2, 0.02, 0.15   , 0.01, 0.5),
  c(NA, NA, NA, NA, NA, NA, NA, NA, NA),
  c(NA, NA, NA, NA, NA, NA, NA, NA, NA),
  aux_np
)

# Setting starting values for K and L ---------------------------------
aux_startvalues <- list(A = 1, K = 1, L = 1)

# Simulate the basic Solow growth model ---------------------------------
aux_simulation <- SimulateExtendedSolowModelEndogenousGrowthCozziTwo(aux_parameter_grid, aux_np, aux_startvalues)
# Visualise some variables ---------------------------------
VisualiseSimulation(
  aux_simulation,
  c("gYpW", "gKpW", "gTFP", "KpEW", "YpEW", "Y", "YpW"),
  "free"
)

# Economy in SS in the End ---------------------------------
steadystate_checker(aux_simulation, aux_parameter_grid, "ESEGCozziTwo")

Elaboration

Parameters defining the ESEGCozziOne

Remark: Those parameters can be found via the command: getRequiredParams("BS").

Starting value of endogenous variables defining the BS

Remark: Those parameters can be found via the command: getRequiredStartingValues("BS").

Structural Equations to the Extended Solow Model with Endogenous Growth (Romer Version)

$$\begin{aligned} Y_t &= K_t^\alpha (A_tL_{Y,t})^{1-\alpha} \ A_{t+1} &= \rho * A_t^\phi s_R^\lambda + A_t \ K_{t+1}&= sY_t + (1-\delta)K_t \ L_{t+1}&=(1+n)L_t \ L_t &= L_{A,t} + L_{Y,t} \ L_{A, t} &= s_R * L_t (\rightarrow L_{Y,t} = (1-s_R * L_t)) \end{aligned}$$



SebastianBehrens/SolowVariants documentation built on Oct. 11, 2023, 2:49 p.m.