I am trying to understand the specifics of how "crost {tsintermittent}" and "croston {forecast}" calculate the in-sample (training) values. They appear to give similar, but different results. (See sample code below) I am not sure if the two calculations are different, or am I not comparing the same results (each package uses different terminology).
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")