Hi,

  I have a bi-variate VAR model and would like to convert it to SVAR but
get an error message. Could someone pinpoint anything wrong and correct my
code? Thanks,

John


amat <- matrix(c(NA, 0, NA, NA), nrow = 2, ncol = 2, byrow = TRUE)
df1<-data.frame(x=c(1,4,5,6,7,8,9,3,5,3), y=c(4,7,1,2,3,9,3,4,5,7))
var1<-VAR(df1, type = "const", ic="BIC")
svar2<-SVAR(x = var1, estmethod = "scoring", Amat = amat, Bmat = diag(2),
            max.iter = 100, conv.crit = 0.1e-6, maxls = 1000)

> amat <- matrix(c(NA, 0, NA, NA), nrow = 2, ncol = 2, byrow = TRUE)
> df1<-data.frame(x=c(1,4,5,6,7,8,9,3,5,3), y=c(4,7,1,2,3,9,3,4,5,7))
> var1<-VAR(df1, type = "const", ic="BIC")
> svar2<-SVAR(x = var1, estmethod = "scoring", Amat = amat, Bmat = diag(2),
+             max.iter = 100, conv.crit = 0.1e-6, maxls = 1000)
Error in `[<-`(`*tmp*`, pos[i], i, value = 1) : subscript out of bounds

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to