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
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