initval_calibr_par: Setting initial values of calibrated parameters

Description Usage Arguments Details Value Examples

View source: R/class_model_par.R

Description

The initval_calibr_par function enables setting the initial values of calibrated parameters for the non-linear steady-state (equilibrium) solver or their expected values if calibration is omitted. If not set by this function, parameters' values are set to 0.5 by default.

Usage

1
initval_calibr_par(model, calibr_par, warnings = TRUE)

Arguments

model

an object of gecon_model class.

calibr_par

a named list or vector of calibrated parameters' initial values.

warnings

logical, should warnings be displayed?

Details

The values of calibrated parameters passed to the object of gecon_model class are treated as initial values for the steady-state solver when the user specifies calibrating equations in a .gcn file and requests that the steady_state function shall use it. If the calibration is omitted, the initial values of calibrated parameters are treated as their final values. Calibrated parameters have to be set to correct values upon the decision to make calibrating equations inactive.

Value

An updated object of gecon_model class representing the model. Generic functions such as print and summary allow to show the model's elements. The get_par_values function returns parameters' values.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# 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 for calibrated parameters
rbc <- initval_calibr_par(rbc, calibr_par=list(alpha = 0.4))

# find the steady state and values of calibrated parameters
rbc <- steady_state(rbc)
get_par_values(rbc, c("alpha"))

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