From 0c995ad7d5d451189ce34e1bd7e461c56915e641 Mon Sep 17 00:00:00 2001 From: adamwang15 Date: Mon, 11 Nov 2024 13:10:49 +1100 Subject: [PATCH] fix bug: test horizon >= 1 #52 --- R/specify.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/specify.R b/R/specify.R index ca52baa..d105479 100644 --- a/R/specify.R +++ b/R/specify.R @@ -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") }