Skip to contents

Plot comparison summaries for response-shape tables

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

Optional variable filter.

shocks

Optional shock filter.

models

Optional model filter.

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)