2016-04-22 40 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) 
相关问题