plot_sgmod: plot_sgmod

View source: R/stochastic_growth_model.R

plot_sgmodR Documentation

plot_sgmod

Description

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

Usage

plot_sgmod(x, ...)

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

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 May 29, 2024, 5:35 a.m.