R パッケージの Forecast::croston および tsintermittent::crost で予測がどのように計算されるかについて問題があります。ここ (www.robjhyndman.com/papers/MASE.xls) に投稿された例のように、クロストンの概念は理解していますが、R パッケージからの出力は非常に異なる結果を生成します。
次のコードでは、Excel の例 (R. Hyndman による) の値を使用しました。
library (tsintermittent)
library (forecast)
x=c(0,1,0,11,0,0,0,0,2,0,6,3,0,0,0,0,0,7,0,0,0,0) # from Hyndman Excel example
x_crost = crost(x,h=5, w=0.1, init = c(1,1) ) # from the tsintermittent package
x_croston=croston(x,h=5, alpha = 0.1) # from the forecast package
x_croston$fitted
y=data.frame(x,x_crost$frc.in,x_croston$fitted)
y
plot(x_croston)
lines(x_croston$fitted, col="blue")
lines(x_crost$frc.in,col="red")
x_crost$initial
x_crost$frc.out # forecast
x_croston$mean # forecast
Excel の例からの予測は 1.36、crost は 1.58、croston は 1.15 です。なぜそれらは同じではないのですか?また、サンプル内 (フィッティング) の値が大きく異なることにも注意してください。