get_simulation_results {gEcon} | R Documentation |
The get_simulation_results
function retrieves the time series of simulated variables
from an object of gecon_simulation
class.
get_simulation_results(sim_obj)
sim_obj |
An object of |
The results are returned as a matrix if the simulation has been generated by
a call to the random_path
or simulate_model
function or a list of matrices corresponding to
selected shocks in a call to the compute_irf
function.
For details, see gecon_simulation-class
.
# 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 print the IRFs rbc <- set_shock_cov_mat(rbc, cov_matrix = matrix(0.01, 1, 1), shock_order = "epsilon_Z") irf_rbc <- compute_irf(rbc, cholesky = TRUE, variables = c("K_s", "C", "Z", "I", "Y")) get_simulation_results(irf_rbc)