knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "README-" )
The goal of sgmodel is to solve a standard stochastic growth model in infinite horizon, a workhorse model in macroeconomics. It can bu used to generate data in simulation contexts and to analyze savings and consumption dynamics under different parameters.
This is a basic example which shows you how to solve a common problem:
grid <- 200 utiltype <- "CRRA" utilparam <- 4 A <- 1 depre <- 0.03 discount <- 0.95 prod <- 0.3 states <- 5 m <- 10 rho <- 0.2 sigma <- 0.02 model <- sgmodel(grid, utiltype, utilparam, A, depre, discount, prod, states, m, rho, sigma)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.