Skip to content

Commit

Permalink
fix bug: test horizon >= 1 #52
Browse files Browse the repository at this point in the history
  • Loading branch information
adamwang15 committed Nov 11, 2024
1 parent 03a2360 commit 0c995ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/specify.R
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ specify_narrative = function(start, periods = 1, type = "S", sign = 1, shock = 1
get_Z = function(sign_irf) {
h = dim(sign_irf)[3]
if (h >= 2) {
test = sign_irf[, , 1:h]
test = sign_irf[, , 2:h]
if (any(test[!is.na(test)] == 0)) {
stop("Zero restrictions are not allowed for horizons >= 1")
}
Expand Down

0 comments on commit 0c995ad

Please sign in to comment.