Evaluates joint posterior probability statements for impulse responses
Source:R/joint-inference.R
joint_hypothesis_irf.RdComputes the posterior probability that a set of impulse-response inequalities holds jointly across all selected variables, structural shocks, and horizons.
Value
A bsvar_post_tbl with columns model,
object_type, relation, posterior_prob,
n_constraints, variable, shock, horizon,
rhs_variable, rhs_shock, rhs_horizon,
rhs_value, and absolute.
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)
jh <- joint_hypothesis_irf(post, variable = "gdp", shock = "gdp",
horizon = 0:2, relation = ">", value = 0)
print(jh)
#> # A tibble: 1 × 23
#> model object_type relation posterior_prob n_constraints variable shock horizon
#> <chr> <chr> <chr> <dbl> <int> <chr> <chr> <chr>
#> 1 mode… joint_irf > 1 3 gdp gdp 0,1,2
#> # ℹ 15 more variables: rhs_variable <chr>, rhs_shock <chr>, rhs_horizon <chr>,
#> # rhs_value <dbl>, absolute <lgl>, analysis_type <chr>,
#> # interval_probability <dbl>, interval_method <chr>, scale_by <chr>,
#> # scale_var <chr>, scale_factor <dbl>, units <chr>, source_package <chr>,
#> # source_version <chr>, n_draws <int>