2016-04-22 42 views
0

我正在使用預測7.1。當我嘗試繪製dshw時,它會將預測數據放在圖形的開頭,而不是放在訓練數據的末尾。 Forecast dshwdshw圖不會在序列末尾放置預測數據

任何人都知道如何解決這個問題?

+0

看起來像一個新的錯誤。我將把它添加到https://github.com/robjhyndman/forecast/issues的問題列表中 –

回答

1

這是一個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) 
相關問題