get_shock_names_by_index {gEcon} | R Documentation |
The get_shock_names_by_index
function allows to retrieve the names of shocks with given indices.
get_shock_names_by_index(model, index_names)
model |
an object of |
index_names |
a character vector of indices. |
Cf. gEcon users' guide, chapter ‘Templates’.
The function returns a character vector of relevant shocks' names.
# copy the example to the current working directory file.copy(from = file.path(system.file("examples", package = "gEcon"), "home_production_templ.gcn"), to = getwd()) # make and load the model home_prod_templ <- make_model("home_production_templ.gcn") # get shocks affecting home production technology hp_shocks <- get_shock_names_by_index(home_prod_templ, "H") # print information about selected shocks shock_info(home_prod_templ, hp_shocks)