dshw图不会在序列末尾放置预测数据
答
这是一个bug,now reported在github网站上的包。
下面是一个简单示例的解决方法。
t <- seq(0,5,by=1/20)
x <- exp(sin(2*pi*t) + cos(2*pi*t*4) + rnorm(length(t),0,.1))
fc <- dshw(x,20,5)
tspx <- tsp(fc$x)
tspm <- tsp(fc$mean)
tsp(fc$mean)[1:2] <- tspm[1:2] - tspm[1] + tspx[2]+1/tspx[3]
plot(fc)
看起来像一个新的错误。我将把它添加到https://github.com/robjhyndman/forecast/issues的问题列表中 –