d- / MTS

Multivariate Time Series Package for R
4 stars 5 forks source link

Error in Kronfit #2

Closed bfunovits closed 6 years ago

bfunovits commented 6 years ago

There is an error in the Kronfit() function when the Kronecker indices do not correspond to the "generic neighbourhood", e.g., when they are (1,2,1,1):

param_ar <- matrix(
  c(0.7, -0.3, -1, -0.1,
    0.1,  0.9, -0.4,  0,
    0, 0, 0.8, 0,
    0.1, -0.4, -0.1, 0.9), byrow = TRUE, nrow = 4)
param_ma <- matrix(
  c(0.1, 0.2, -1.8, 0.1,
     0.2, 0.2, -0.1, 0.1,
     -0.1, -0.1, 0.9, -0.1,
     -0.1, -0.1, -0.2, -0.2), byrow = TRUE, nrow = 4)
param_sigma <- diag(rep(1, 4))

mod_sim <- VARMAsim(300, arlags = 1, malags = 1, phi = param_ar, theta = param_ma, sigma = param_sigma)
Kronfit(mod_sim$series, kidx = c(1,2,1,1))
d- commented 6 years ago

The problem was caused by an index overflow bug and has been patched in the new release (v1.0).