plot_sgmod: plot_sgmod

Description Usage Arguments Value References Examples

View source: R/stochastic_growth_model.R

Description

The function plot_sgmod returns a plot of the Savings value of a sgmodel object on the Capital grid value.

Usage

1

Arguments

x

A sgmod object.

...

Additional arguments.

Value

It returns a plot using ggplot that graphs the Savings decisions from the sgmodel object on the Capital grid. The plot shows as many facets as length(Z) where Z is the vector of states of the TFP process.

References

Wickham H (2009), ggplot2: Elegant Graphics for Data Analysis.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
model <- sgmodel( grid = 100, rho = 0.2, sigma = 0.02)
plot_sgmod(model)
grid <- 200
utiltype <- "CRRA"
utilparam <- 4
A <- 1
depre <- 0.03
discount <- 0.95
prod <- 0.3
states <- 5
m <- 2
rho <- 0.2
sigma <- 0.02
model <- sgmodel(grid, utiltype, utilparam, A, depre, discount, prod, states, m, rho, sigma)
plot_sgmod(model)

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