gecon_simulation-class {gEcon}R Documentation

gecon_simulation class

Description

The class storing simulation results.

Slots

sim:

a three-dimensional array with impulse response functions (the dimensions: variables, time, shocks) or two-dimensional array with simulation results.

shocks:

a character vector with the names of the shocks for which the simulations have been performed.

shocks_tex:

a character vector with LaTeX names of the shocks for which the simulations have been performed.

variables:

a character vector with the names of the variables for which the simulations have been performed.

variables_tex:

a character vector with LaTeX names of the variables for which the simulations have been performed.

sim_name:

a character string, the simulation name.

model_info:

a character vector of length 3 containing information about the model: the input file name, the input file path and the date of creation.

r_object_name:

a character string, the name of an R object storing the model for which the simulations have been performed.

Methods

show

signature(object = "gecon_simulation"): prints short information about the simulation.

print

signature(x = "gecon_simulation"): prints information about the simulation.

summary

signature(object = "gecon_simulation"): prints the simulation results.

See Also

get_simulation_results to retrieve the simulated series from the sim slot.

Examples

# 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)
summary(irf_rbc)
class(irf_rbc)

[Package gEcon version 1.1.0 Index]