gecon_model-class: 'gecon_model' class

Description Slots Methods See Also Examples

Description

The class for storing models.

Slots

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.

index_sets:

a list containing information about index sets. The names of its elements correspond to sets' names. Each element contains a character vector of the names of the relevant set's components.

parameters:

a character vector of all parameters' names.

parameters_tex:

a character vector of all parameters' LaTeX names.

parameters_free:

a character vector of free parameters' names.

map_free_into_params:

an integer vector of free parameters' indices.

parameters_calibr:

a character vector of calibrated parameters' names.

map_calibr_into_params:

an integer vector of calibrated parameters' indices.

variables:

a character vector of variables' names.

variables_tex:

a character vector of variables' LaTeX names.

shocks:

a character vector of shocks' names.

shocks_tex:

a character vector of shocks' LaTeX names.

equations:

a character vector of model equations (equilibrium relationships).

calibr_equations:

a character vector of calibrating equations.

var_eq_map:

a sparse matrix (an object of Matrix class) representing the mapping of variables to equations.

shock_eq_map:

a sparse matrix (an object of Matrix class) representing the mapping of shocks to equations.

var_ceq_map:

a sparse matrix (an object of Matrix class) representing the mapping of variables to calibrating equations.

cpar_eq_map:

a sparse matrix (an object of Matrix class) representing the mapping of calibrated parameters to equations.

cpar_ceq_map:

a sparse matrix (an object of Matrix class) representing the mapping of calibrated parameters to calibrating equations.

fpar_eq_map:

a sparse matrix (an object of Matrix class) representing the mapping of free parameters to equations.

fpar_ceq_map:

a sparse matrix (an object of Matrix class) representing the mapping of free parameters to calibrating equations.

is_stochastic:

logical. If TRUE, the model has stochastic shocks.

is_dynamic:

logical. If TRUE, the model has at least one lead or lagged variable.

is_calibrated:

logical. If TRUE, calibrating equations are taken into account when solving for the steady state of a dynamic model (the equilibrium in case of a static model).

ss_function:

a function returning the steady-state/equilibrium equations' residuals.

ss_calibr_jac_function:

a function computing the Jacobian of both steady-state (equilibrium) and calibrating functions or NULL.

calibr_function:

a function returning calibrating equations' residuals.

parameters_free_init_val:

a vector of free parameters' values declared in the .gcn file.

parameters_free_val:

a vector of current free parameters' values.

parameters_free_mod_flag:

a logical vector indicating which free parameters' values have been modified relative to the .gcn file setting.

parameters_calibr_val:

a vector of current calibrated parameters' values.

init_residual_vector:

a numeric vector of residuals of the steady-state (equilibrium) function computed for initial values and calibrated parameters.

residual_vector:

a numeric vector of residuals of the steady-state (equilibrium) function computed for variables' values and calibrated parameters after the non-linear solver has exited.

solver_status:

a character string describing the steady-state (equilibrium) solver status.

parameters_val:

a vector of model parameters' values.

variables_ss_val:

a vector of variables' steady-state/equilibrium values.

ss_solved:

logical. If TRUE, the steady state (equilibrium in case of static models) has been found.

pert:

a function of the first order perturbation (returning a list of matrices).

loglin_var:

logical. Flags are set to TRUE for log-linearised variables.

eig_vals:

a matrix of system eigenvalues.

solution:

a list with elements P, Q, R, S storing solution of the model.

state_var_indices:

a numeric vector containing the indices of state variables.

solver_exit_info:

a character string, solver exit information.

solution_resid:

a list of residuals of perturbation equations, verifying if the model has been solved.

re_solved:

logical. It is set to TRUE if the model has been solved. The default value is FALSE.

active_shocks:

a logical vector of the length equal to the number of shocks. If an entry is set to FALSE, the variance of the corresponding shock is zero (the shock is not taken into account during stochastic simulations of the model).

shock_cov_mat:

a covariance matrix of model shocks.

shock_cov_mat_flag:

logical. Set to TRUE when the user specifies non-default entries in a covariance matrix of model shocks.

corr_mat:

a matrix of the model variables' correlations.

autocorr_mat:

a matrix of the model variables' autocorrelations.

ref_var_corr_mat:

a matrix of correlations of model variables with the reference variable's lead and lagged values.

ref_var_idx:

an integer value, the index of the reference variable used in statistics computation.

var_dec:

a matrix of the variance decomposition of shocks.

sdev:

a vector of variables' standard deviations.

corr_computed:

logical. If TRUE, it indicates that the correlations and other variables' statistics have been computed. The default value is FALSE.

Methods

print

signature(x = "gecon_model"): prints short diagnostic information about the model.

show

signature(object = "gecon_model"): prints general information about the model.

summary

signature(object = "gecon_model"): prints detailed information about the model's computation results.

See Also

gecon_model is a constructor of objects of gecon_model class.

Examples

1
2
3
4
5
6
7
8
# 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")
print(rbc)
class(rbc)

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