plot_simulation {gEcon} | R Documentation |
gecon_simulation
class
The plot_simulation
function plots the simulations or saves them as .eps
files in the model's subdirectory /plots
.
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.
# 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)