sgmodel: Sgmodel

Description Usage Arguments Value References Examples

View source: R/stochastic_growth_model.R

Description

The function sgmodel computes the solutions to a generic stochastic growth model after discretizing the distribution of the stochastic element.

Usage

1
2
sgmodel(grid, utiltype, utilparam, A, depre, discount, prod, states, m, rho,
  sigma, ...)

Arguments

grid

A numerical value, the number of capital grid points to consider for k (t). Default value set to 1000.

utiltype

The type of preference for the util function. Can be "log", "CRRA", "CARA", "Cobb-Douglas", "CES". See description of util for details. Default type set to "log".

utilparam

Numerical value, preference parameter for the util function. See description of util for details. Default set to 1.

A

Numerical value, preference parameter for the util function. See description of util for details. Default set to 1.

depre

Numerical value for the depreciation parameter. Must be between 0 and 1. Default value set to 1.

discount

Numerical value for the discount factor. Must be (strictly) between 0 and 1. Default value set to 0.95.

prod

Numerical value for the Cobb-Douglas production function. Must be (strictly) between 0 and 1. Default value set to 0.3.

states

umerical value for the number of states of the Markov process approximating the TFP process. Default value set to 2.

m

Numerical value for the Rtauchen function. See description of Rtauchen for details. Default value set to 3.

rho

Autocorrelation of the TFP AR(1) process, used to approximate the process with a Markov process.

sigma

Standard deviation of the white noise in the TFP process, used to approximate the process with a Markov process.

...

Additional arguments.

Value

The function returns a list containing:

Capital grid

Vector of values for capital.

Savings

Vector of size (grid x States) indicating which coordinates of the capital grid are the optimal savings decision.

Consumption

Vector of size (grid x States) indicating the optimal consumption decisions using the optimal savings decision, and given the capital level of the corresponding coordinate of Capital grid.

Z

States of the TFP process.

PTM

The probability transition matrix of the process.

Production parameter

The exponent on capital in the Cobb-Douglas production function.

Utility type

The type of utility function. See the details of "util" for the available types

Discount factor

The discount factor used in the model.

Depreciation

The depreciation rate of capital used in the model.

Rho

Autocorrelation of the TFP AR(1) process.

Sigma

Standard deviation of the white noise in the TFP process.

References

Tauchen G (1986), Finite state markov-chain approximations to univariate and vector autoregressions. Economics letters, 20(2), 177–181.

Merton R. C (1971), Optimum consumption and portfolio rules in a continuous-time model. Journal of Economic Theory, 3(4), 373–413. URL http://www.sciencedirect.com/science/article/pii/002205317190038X

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
model <- sgmodel(grid= 100, rho = 0.2, sigma = 0.02)

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)

sgmodel documentation built on Feb. 27, 2020, 5:06 p.m.