「crost {tsintermittent}」と「croston {forecast}」がサンプル内(トレーニング)値を計算する方法の詳細を理解しようとしています。それらは同様の結果をもたらすように見えますが、異なる結果をもたらします。(以下のサンプル コードを参照してください) 2 つの計算が異なるのか、それとも同じ結果を比較していないのかわかりません (各パッケージは異なる用語を使用しています)。
library (tsintermittent)
library (forecast)
# create an intermittent time-series
x = c(5,5,5,5,5,5,6,8,0,8,0,8,0,0,4,0,0,6,7,0,0,0,9,0,11,0,0)
x_crost = crost(x,h=5) # from the tsintermittent package
x_croston=croston(x,h=5) # from the forecast package
x_croston$fitted
y=data.frame(x,x_crost$frc.in,x_croston$fitted)
y # viex_croston results
plot(x_croston)
lines(x_croston$fitted, col="red")
lines(x_crost$frc.in,col="blue")