Description Usage Arguments Value Examples
View source: R/class_model_var.R
The initval_var
function sets the initial values of the model's variables to values specified by the user. The initial values close to solution will help the nonlinear equations solver to find the solution.
1 | initval_var(model, init_var, warnings = TRUE)
|
model |
an object of the |
init_var |
a named list or vector of the initial values of variables. |
warnings |
logical, should warnings be displayed? |
An object of the gecon_model
class representing the model. Generic functions such as print
and summary
allow to show model elements. The get_ss_values
function returns the steady-state (equilibrium) values of the model variables.
1 2 3 4 5 6 7 8 9 10 | # 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")
# set initial values of variables
rbc <- initval_var(rbc, list(K_s = 10, C = 2, I = 0.5, Y = 2.5))
rbc <- initval_var(rbc, c(pi=0))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.