Plots ranked shock contributions over selected historical periods
Source:R/plot-event.R
plot_shock_ranking.RdPlots structural shocks ordered by the absolute or signed magnitude of their contributions over a selected historical period.
Usage
plot_shock_ranking(
object,
start = NULL,
end = start,
variables = NULL,
models = NULL,
ranking = c("absolute", "signed"),
top_n = NULL,
probability = 0.9,
...
)Arguments
- object
A posterior model object,
PosteriorHD, or a table of ranked structural-shock contributions.- start
First time index to include when
objectis not already a shock ranking table.- end
Last time index to include. Defaults to
start.- variables
Variables whose historical decompositions are included.
- models
Model specifications to include.
- ranking
One of
"absolute"or"signed".- top_n
Optional number of top-ranked shocks to keep per model-variable panel.
- probability
Probability mass of the equal-tailed credible interval.
- ...
Additional arguments passed to
shock_ranking().
Examples
data(us_fiscal_lsuw, package = "bsvars")
spec <- bsvars::specify_bsvar$new(us_fiscal_lsuw, p = 1)
#> The identification is set to the default option of lower-triangular structural matrix.
post <- bsvars::estimate(spec, S = 5, show_progress = FALSE)
p <- plot_shock_ranking(post, start = "1948.25", end = "1948.5")