get_init_val_var {gEcon}R Documentation

Variables' initial values

Description

The get_init_val_var function returns (and prints) initial values of model variables.

Usage

get_init_val_var(model, variables = NULL, to_tex = FALSE, silent = FALSE)

Arguments

model

an object of gecon_model class.

variables

the names or the indices of the variables whose initial values are to be returned. All variables are listed by default.

to_tex

logical. If TRUE, the output is written to a .tex file. The default value is FALSE.

silent

logical. If TRUE, console output is suppressed. The default value is FALSE.

Value

A numeric vector of initial values of model variables.

Examples

# 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")

# find the steady state and print variables' initial values
rbc <- steady_state(rbc)
get_init_val_var(rbc)
get_init_val_var(rbc, variables = c("K_s", "L_s"))

[Package gEcon version 1.2.0 Index]