gecon_simulation-class: 'gecon_simulation' class

Description Slots Methods See Also Examples

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
# 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)

gEcon documentation built on May 2, 2019, 6:52 p.m.