check_bk: Blanchard-Kahn conditions and eigenvalues

Description Usage Arguments Details References Examples

View source: R/class_model_pert.R

Description

The check_bk function checks the Blanchard-Kahn conditions and prints information about eigenvalues.

Usage

1
check_bk(model)

Arguments

model

an object of gecon_model class.

Details

The function checks if the Blanchard-Kahn conditions have been satisfied and prints info about eigenvalues larger than 1 in modulus and the number of forward looking variables. Eigenvalues are computed when gEcon attempts to solve the 1st order perturbation (solver uses the Lapack zgges function to compute eigenvalues). The solve_pert function must be called before eigenvalues can be retrieved.

References

Blanchard, O., Kahn C. M. (1980), The Solution of Linear Difference Models under Rational Expectations, Econometrica

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# copy the example to the current working directory, process it
# and solve for the steady state
file.copy(from = file.path(system.file("examples", package = "gEcon"),
          "rbc.gcn"), to = getwd())
rbc <- make_model("rbc.gcn")
rbc <- steady_state(rbc)

# solve the model in log-linearised form
rbc <- solve_pert(rbc)

# check eigenvalues
check_bk(rbc)

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

Related to check_bk in gEcon...