Search code examples
rtime-seriesautoregressive-models

mts - VARMACpp Example returns error


i am very new to mts but it seams that the example of VARMACpp is not working with VARMACpp instead of VARMA
The example is:

phi=matrix(c(0.2,-0.6,0.3,1.1),2,2); theta=matrix(c(-0.5,0,0,-0.5),2,2)
sigma=diag(2)
m1=VARMAsim(300,arlags=c(1),malags=c(1),phi=phi,theta=theta,sigma=sigma)
zt=m1$series
m2=VARMA(zt,p=1,q=1,include.mean=FALSE)

works! Working with VARMACpp

m2=VARMACpp(zt,p=1,q=1,include.mean=FALSE)

returns the following error which did not manage to resolve:

Number of parameters:  8 
initial estimates:  0.1814 0.3318 -0.4273 1.0542 0.3917 -0.0869 -0.073 0.5273 
Par. lower-bounds:  0.0547 0.2763 -0.5518 0.9996 0.2175 -0.2218 -0.2442 0.3948 
Par. upper-bounds:  0.308 0.3874 -0.3029 1.1088 0.5658 0.048 0.0981 0.6598 
Error in do.call(rbind, ListResiduals) : second argument must be a list

Solution

  • Installing MTS from GitHub fixes the Problem

    install.packages("devtools")
    library(devtools)
    install_github('MTS','d-')