Skip to content

Commit

Permalink
update narrative restriction example in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
adamwang15 committed Jul 18, 2024
1 parent 00f4271 commit c9c09ba
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
9 changes: 6 additions & 3 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,16 @@ Replication of the results by [Antolín-Díaz and Rubio-Ramírez (2018)](http://
data(monetary)
# specify identifying restrictions:
# + sign restrictions on the impulse responses at horizons from 0 to 4
# + sign restrictions on the impulse responses at horizons from 0 to 5
sign_irf = matrix(NA, 6, 6)
sign_irf[, 1] = c(NA, -1, -1, NA, -1, 1)
sign_irf = array(sign_irf, dim = c(6, 6, 5))
sign_irf = array(sign_irf, dim = c(6, 6, 6))
# + narrative sign restriction: the shock is positive in October 1979
sign_narrative = t(c(1, 1, NA, 1, 166, 0))
sign_narrative = list(
specify_narrative(start = 166, periods = 1, type = "S", sign = 1, shock = 1),
specify_narrative(start = 166, periods = 1, type = "B", sign = 1, shock = 1, var = 6)
)
# specify the model
specification = specify_bsvarSIGN$new(monetary * 100,
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,10 @@ sign_irf[, 1] = c(NA, -1, -1, NA, -1, 1)
sign_irf = array(sign_irf, dim = c(6, 6, 5))

# + narrative sign restriction: the shock is positive in October 1979
sign_narrative = t(c(1, 1, NA, 1, 166, 0))
sign_narrative = list(
specify_narrative(start = 166, periods = 1, type = "S", sign = 1, shock = 1),
specify_narrative(start = 166, periods = 1, type = "B", sign = 1, shock = 1, var = 6)
)

# specify the model
specification = specify_bsvarSIGN$new(monetary * 100,
Expand Down

0 comments on commit c9c09ba

Please sign in to comment.