Skip to content

Commit

Permalink
Add var irf to boostrap output
Browse files Browse the repository at this point in the history
  • Loading branch information
matdehaven committed Oct 9, 2023
1 parent 7ac9dd2 commit b87efe9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions R/bootstrap.R
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,13 @@ bootstrap <- function(
irf_lower <- apply(irfboots, c(1, 2, 3), stats::quantile, probs = lower_pctl)
irf_upper <- apply(irfboots, c(1, 2, 3), stats::quantile, probs = upper_pctl)

irf <- vars::irf(var, n.ahead = n_ahead)

irf_df <- data.frame(
h = rep(1:n_ahead, each = k * k),
impulse = rep(shock_names, each = k, times = n_ahead),
response = rep(variable_names, times = k * n_ahead),
irf = irf$irf$irf,
mean = c(irf_mean),
median = c(irf_median),
lower = c(irf_lower),
Expand Down

0 comments on commit b87efe9

Please sign in to comment.