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

What does this package provide?

  1. functions to simulate the following Solow growth models
    • Basic Solow Growth Model
    • General Solow Growth Model
    • Extended Solow Growth Model with Human Capital
    • Extended Solow Growth Model for the Small and Open Economy
    • Extended Solow Growth Model with Scarce Resources
    • with Oil
    • with Land
    • with Oil and Land
    • Extended Solow Growth Model with Endogenous Technological Growth
    • version put forward by Romer
    • versions put forward by Cozzi
  2. function to nicely visualise certain variables of a simulation
  3. function to visualise several simulations to compare them
    • Example 1: An increase in the savings rate, $s$, in period 50 vs. a decrease in capital depreciation rate, $\delta$, in period 50 in in the general Solow growth model.
    • Example 2: Compare the effects on output in the basic Solow growth model to output in the general Solow growth model with the same parameter changes in either economy.
    • Example 3: Compare the the effects of population growth in the extended Solow growth model with land, a fixed scarce resource, and the effects in the the extended Solow growth models with oil, a not-fixed but depletable scarce resource.
    • (and many more.)

Illustrative Examples

Simulation of a Solow Variant

library(SolowVariants)
theme_set(theme_bw())

# Setting up the parameter grid ---------------------------------
aux_np <- 200
aux_parameter_grid <-
  create_parameter_grid(
    c("B", "alpha", "delta", "n", "s"),
    c(10, 1 / 3, 0.1, 0.005, 0.22),
    c(NA, NA, NA, NA, NA),
    c(NA, NA, NA, NA, NA),
    aux_np
  )

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

# Simulate the basic Solow growth model ---------------------------------
aux_simulation <- SimulateBasicSolowModel(aux_parameter_grid, aux_np,aux_startvalues)

# Visualise some variables ---------------------------------
VisualiseSimulation(aux_simulation,
                    c("YpW", "Y", "KpW"), 
                    "free")

# Verify whether the economy is 'in' steady state in the final period ---------------------------------

steadystate_checker(aux_simulation, aux_parameter_grid, "BS")

Comparison of different Solow Variants

# Simulating the BS
library(SolowVariants)
aux_np <- 200

aux_parameter_grid <-
  create_parameter_grid(
    c("B", "alpha", "delta", "n", "s"),
    c(10, 1 / 3, 0.1, 0.005, 0.22),
    c(NA, NA, 100, NA, NA),
    c(NA, NA, 0.05, NA, NA),
    aux_np
  )

aux_startvalues <- list(K = 1, L = 1)

aux_simulation_BS <- SimulateBasicSolowModel(aux_parameter_grid, aux_np, aux_startvalues)

# Simulating the GS
aux2_parameter_grid <-
  create_parameter_grid(
    c("g", "alpha", "delta", "n", "s"),
    c(0.05, 1 / 3, 0.1, 0.005, 0.22),
    c(NA, NA, NA, NA, 50),
    c(NA, NA, NA, NA, 0.05),
    aux_np
  )

aux2_startvalues <- list(A = 1, K = 1, L = 1)

aux_simulation_GS <- SimulateGeneralSolowModel(aux2_parameter_grid, aux_np, aux2_startvalues)

# Comparing the two simulations (solow variants) ---------------------------------
compare_simulations(
  list(aux_simulation_BS, aux_simulation_GS), 
  c("BS", "GS"), c("logY", "gYpW", "YpEW", "RR")
)

Simulation Functions

| Solow Variant | Simulation Function | |:--------------------------------------------------------------------------------------- |:------------------------------------------------------ | | Basic Solow Growth Model | SimulateBasicSolowGrowthModel() | | General Solow Growth Model | SimulateGeneralSolowModel() | | Extended Solow Growth Model with Human Capital | SimulateExtendedSolowModelHumanCapital() | | Extended Solow Growth Model for the Small and Open Economy | SimulateExtendedSolowModelSmallOpenEconomy() | | Extended Solow Growth Model with Scarce Resource Land | SimulateExtendedSolowModelScarceResourceLand() | | Extended Solow Growth Model with Scarce Resource Oil | SimulateExtendedSolowModelScarceResourceOil() | | Extended Solow Growth Model with Scarce Resources Oil and Land | SimulateExtendedSolowModelScarceResourceOilAndLand() | | Extended Solow Growth Model with Endogenous Technological Growth | SimulateExtendedSolowModelEndogenousGrowth() | | Extended Solow Growth Model with Endogenous Technological Growth (Romer Extension) | SimulateExtendedSolowModelEndogenousGrowthRomer() | | Extended Solow Growth Model with Endogenous Technological Growth (Cozzi Extension) | SimulateExtendedSolowModelEndogenousGrowthCozziOne() | | Extended Solow Growth Model with Endogenous Technological Growth (Cozzi's Hybrid Model) | SimulateExtendedSolowModelEndogenousGrowthCozziTwo() |

Model Abbreviations

The table below shows the used abbreviations, so-called model codes, that will be used throughout the package to refer to the respective Solow Growth Model Variants.

| Solow Variant | Simulation Function | |:--------------------------------------------------------------------------------------- |:-------------------:| | Basic Solow Growth Model | BS | | General Solow Growth Model | GS | | Extended Solow Growth Model with Human Capital | ESHC | | Extended Solow Growth Model for the Small and Open Economy | ESSOE | | Extended Solow Growth Model with Scarce Resource Land | ESSRL | | Extended Solow Growth Model with Scarce Resource Oil | ESSRO | | Extended Solow Growth Model with Scarce Resources Oil and Land | ESSROL | | Extended Solow Growth Model with Endogenous Technological Growth | ESEG | | Extended Solow Growth Model with Endogenous Technological Growth (Romer Extension) | ESEGRomer | | Extended Solow Growth Model with Endogenous Technological Growth (Cozzi Extension) | ESEGCozziOne | | Extended Solow Growth Model with Endogenous Technological Growth (Cozzi's Hybrid Model) | ESEGCozziTwo |

Variable Abbreviations

| Full Variable Name | Variable | | ------------------------- |:--------:| | Total Factor Productivity | TFP | | Labor Force | L | | (Physical) Capital | K | | Human Capital | H | | Output | Y | | National Output | Yn | | National Savings | Sn | | Consumption | C | | National Wealth | V | | Net Foreign Assets | F | | Energy | E | | Resource Stock | R | | Land | X | | Capital to Output Ratio | CtO | | Wage Rate | WR | | (Capital) Rental Rate | RR | | Land Rental Rate | LR |

| Prefix/Suffix | Meaning | |:-------------:| ---------------------- | | gX | Growth Rate of X | | logX | Logarithm of X | | XpW | X per Worker | | XpEW | X per Effective Worker |

Vignettes to each Solow Growth Model Variant

The following hyperlinks link directly to the vignettes that contain explanations on the respective Solow variant.

BS

GS

ESSOE

ESHC

ESSRO

ESSRL

ESSROL

ESEG

ESEGRomer

ESEGCozziOne

ESEGCozziTwo

Remark: You can call any of these directly with, for example, vignette("BS").

Remark to you if you are new to R

f <- function(x, y){x + y}
f(x = 3, y = 3) # argument assignment by name
f(3, 3) # argument assignment by position

How to add further models to this package

The following steps are self-contained. Thus, each part can live on its own and does not require the other parts to be implemented.



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