Description Usage Arguments Value See Also Examples
View source: R/class_model_shock.R
The get_shock_cov_mat
function returns a covariance
matrix of model shocks.
1 | get_shock_cov_mat(model)
|
model |
an object of |
The function returns a covariance matrix of model shocks.
For details, see gecon_model-class
.
The set_shock_cov_mat
function allows to set/modify shock covariance matrix.
The set_shock_distr_par
function sets distribution parameters
(standard deviations, correlations, etc.) of shocks.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | # copy the example to the current working directory
file.copy(from = file.path(system.file("examples", package = "gEcon"),
"home_production.gcn"), to = getwd())
# make and load the model
home_production <- make_model("home_production.gcn")
shock_info(home_production, all = TRUE)
# set the shock distribution parameters
home_production <- set_shock_distr_par(home_production,
distr_par = list("sd(epsilon_h)" = 0.7,
"var(epsilon_m)" = 0.49,
"cor(epsilon_m,
epsilon_h)" = 2/3))
# retrieve and show the covariance matrix of model shocks
cov_mat <- get_shock_cov_mat(home_production)
cov_mat
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.