alexanderlange53 / svars

R Package for data driven SVAR identification of impulse response functions
Other
44 stars 20 forks source link

Issues when using two periods structural break #85

Closed MegersaDaksa closed 2 years ago

MegersaDaksa commented 2 years ago

I am having issue running this code and got this error message. Here is the code I am running on RStudio.

restMat <- matrix(rep(NA, 25), ncol = 5) restMat[1, c(2,3, 4,5)] <- 0 restMat[2, c(3,4,5)] <- 0 restMat[3,c(4,5)] <- 0 restMat[4,c(5)] <- 0 restMat restricted_cv<-id.cv(Extended_M_SVAR, SB=c(2007,6), SB2 = c(2014,9), restriction_matrix =restMat)

Error in u[which(SB == 1), ] : subscript out of bounds In addition: Warning messages: 1: In 1:TB1 : numerical expression has 2 elements: only the first used 2: In (TB1 + 1):(TB1 + TB2) : numerical expression has 2 elements: only the first used 3: In (TB1 + 1):(TB1 + TB2) : numerical expression has 2 elements: only the first used 4: In (TB1 + TB2 + 1):Tob : numerical expression has 2 elements: only the first used