| fevd | R Documentation |
Splits the forecast error variance of each variable at each horizon into the contributions of the structural shocks — "how much of inflation uncertainty two years out is the cost-push shock?". For
x_t = P x_{t-1} + Q e_t, e_t ~ N(0, S)
the h-step forecast error variance is
V_h = sum_{j<h} P^j Q S Q' (P^j)'
and the share of shock k is the same sum with only column k of
Q active.
Shares sum to one across shocks for every variable and horizon.
fevd(x, ...)
## S3 method for class 'qpm_solution'
fevd(x, horizon = 24, vars = NULL, shocks = NULL, ...)
## S3 method for class 'qpm_fevd'
plot(x, var = NULL, drop_zero = TRUE, ...)
x |
A |
... |
Passed to methods. |
horizon |
Largest forecast horizon. |
vars |
Variables to include; default all declared variables. |
shocks |
Shocks to include; default all. |
var |
Variable to plot. |
drop_zero |
Omit shocks that never contribute. |
Shares remain well defined when the model has unit roots, even though the variances themselves grow without bound.
A data frame of class qpm_fevd in long format with columns
variable, shock, horizon, share and variance.
print() shows the dominant shocks; plot() draws stacked shares.
sol <- qpm_solve(qpm_template("bkl"))
fv <- fevd(sol, horizon = 20)
fv
plot(fv, var = "pi")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.