lundi 13 février 2017

Error in SVAR function of vars package

Vote count: 0

Using the vars package, I am trying to replicate a standard 4-variable SVAR model with quarterly data and 61 observations. Matrix A has a recursive structure and no restrictions were placed on matrix B (just identified model). The original model was estimated in Stata with the same dataset.

I get the same (correct) results in the reduced-form VAR estimation, but once I get to the SVAR part, I get this message repeatedly:

Error in solve.default(infgamma): 
system is computationally singular: reciprocal condition number = 1.90759e-16

Probably I am doing something wrong but I do not know what it is. I would appreciate any help. Here is my code:

    Model1 <- VAR(data, p=4, type="const") 

    AMATRIX = matrix(c(NA, 0, 0, 0, 
                   NA, NA, 0, 0,
                   NA, NA, NA, 0,
                   NA, NA, NA, NA), nrow=4,ncol=4, byrow = T)

    Model2 <- SVAR(x=Model1, Amat = AMATRIX)


PS: The SVAR function uses the default scoring algorithm by Amisano & Giannini (1997), which is the estimation method I would like to use.


asked 1 min ago

Let's block ads! (Why?)

Error in SVAR function of vars package

Aucun commentaire:

Enregistrer un commentaire