smooth icon indicating copy to clipboard operation
smooth copied to clipboard

vcov method for es(), ssarima(), msarima(), ces() and gum()

Open config-i1 opened this issue 4 years ago • 0 comments

Develop a proper vcov for the three. Some parts of this do not work. An example:

require("smooth")
set.seed(123)
y <- ts(diffinv(diffinv(arima.sim(n=400, model=list(ar=c(0.6,-0.4,0,0.3), ma=c(-0.3,0,5)))),4), frequency=4)
#this returns the covariance matrix
res1 <- msarima(y=y, orders=list(ar=c(2,1),i=c(1,1),ma=c(2,0)),lags=c(1,4), h=18, silent=FALSE, FI=TRUE)
res1$FI

#when xreg is not NULL, this gives an error
xreg <- cbind(xregA=rnorm(length(y)+18))
res2 <- msarima(y=y, orders=list(ar=c(2,1),i=c(1,1),ma=c(2,0)),lags=c(1,4), h=18, silent=FALSE, xreg=xreg, FI=TRUE)
#Error in costfuncARIMA(ar.orders, ma.orders, i.orders, lags, nComponents,  :
#  copy into submatrix: incompatible matrix dimensions: 12x1 and 11x1

config-i1 avatar Jul 03 '21 21:07 config-i1