Description Usage Arguments Details Value Note See Also Examples
View source: R/class_model_var.R
The var_info
function allows to create an object of gecon_var_info
class,
containing information about selected model variables. It allows to check variables'
equation incidence matrix as well as the already computed statistics for them.
1 |
model |
an object of |
variables |
the names or indices of the variables of interest. |
all |
logical value. If TRUE, information about all model variables is generated (FALSE by default). |
The var_info
function may be useful while debugging a model. It allows also to retrieve information quickly when a model is large.
If the R command is not assigned to any R object, the information about the requested variables is printed to the console.
Depending on which operations have been performed on an object of gecon\_model
class, the information printed consists of a subset of the following elements:
incidence information,
steady-state (equilibrium) values,
variables info (which variables are log-linearised and which are state variables),
state variables impact on the selected variables,
shocks' impact on the selected variables,
basic statistics,
correlations.
An object of gecon_var_info-class
class.
The function only displays and returns the model's characteristics that have been already set or computed.
Eg. if the model has been solved but the statistics have not been computed, the correlations will not be passed to the object of gecon_var_info
class.
shock_info
for information about the shocks.
get_ss_values
, get_pert_solution
,
get_model_stats
to extract statistics of the model variables.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # 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)
# get information about variables
rbc_var_info <- var_info(rbc, variables = c("K_s"))
print(rbc_var_info)
show(rbc_var_info)
summary(rbc_var_info)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.