Description Usage Arguments Value Examples
View source: R/class_simulation.R
The plot_simulation
function plots the simulations or saves them as .eps
files in the model's subdirectory /plots
.
1 | plot_simulation(sim_obj, to_eps = FALSE)
|
sim_obj |
an object of |
to_eps |
logical. if TRUE, the plot(s) is (are) saved as |
If more than five variables have been selected for simulations, at least two plots are created (max. 5 variables can be depicted on one plot).
Separate plots are created for all the impulses, if the compute_irf
function has been used for generating simulations.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # copy the example to the current working directory
file.copy(from = file.path(system.file("examples", package = "gEcon"),
"rbc.gcn"), to = getwd())
# make and load the model
rbc <- make_model("rbc.gcn")
# solve the model
rbc <- steady_state(rbc)
rbc <- solve_pert(rbc)
# compute and plot the IRFs
rbc <- set_shock_cov_mat(rbc, cov_matrix = matrix(0.01, 1, 1),
shock_order = "epsilon_Z")
irf_rbc <- compute_irf(rbc)
plot_simulation(irf_rbc)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.