MatthieuStigler / tsDyn

tsDyn
tsdyn.googlecode.com
GNU General Public License v2.0
34 stars 20 forks source link

irf does not work with exogen regressors!? #32

Open MatthieuStigler opened 3 years ago

MatthieuStigler commented 3 years ago

See below:

library(tsDyn)
data(zeroyld)
data = zeroyld

rdmVar = rnorm(nrow(data));

#Fit a VECM with Johansen MLE estimator
vecm.jo.exogen = VECM(zeroyld, lag=2, estim="ML", exogen = rdmVar);
IRF.exogen = irf(vecm.jo.exogen, boot=F, ortho=F);
#> Matrix B badly specified: should have  5 columns, but has 6 
#>        ECT L{x1}{1} L{x2}{1} L{x1}{2} L{x2}{2}
#> Equ x1  NA       NA       NA       NA       NA
#> Equ x2  NA       NA       NA       NA       NA
#> Error in TVECM.gen(B = B, beta = beta, n = n, lag = lag, include = include, :

Created on 2021-03-16 by the reprex package (v1.0.0)