Skip to contents

Plots posterior summaries of response peaks, durations, half-lives, or threshold horizons for comparison across model specifications.

Usage

plot_compare_response(
  object,
  measure = NULL,
  variables = NULL,
  shocks = NULL,
  models = NULL,
  facet_scales = "free_y"
)

Arguments

object

A comparison table returned by compare_peak_response(), compare_duration_response(), compare_half_life_response(), or compare_time_to_threshold().

measure

Which summary measure to plot. Defaults to the main comparison metric implied by object.

variables

Response variables to include.

shocks

Structural shocks to include.

models

Model specifications to include.

facet_scales

Facet scales passed to ggplot2.

Value

A ggplot object.

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.
post1 <- bsvars::estimate(spec, S = 5, show_progress = FALSE)
post2 <- bsvars::estimate(spec, S = 5, show_progress = FALSE)

comp <- compare_peak_response(m1 = post1, m2 = post2, horizon = 3)
p <- plot_compare_response(comp)