Skip to contents

Smooths the demand SIZE and the INTERVAL between demands separately, and forecasts the rate as their ratio.

Usage

morie_croston(y, alpha = 0.1, variant = c("croston", "sba"))

Arguments

y

non-negative demand series.

alpha

smoothing parameter in (0, 1].

variant

"croston" or "sba".

Value

list with forecast, rate, demand_size, interval, bias_factor, intermittency.

Details

Ordinary exponential smoothing on a series full of zeros chases the zeros and produces a forecast that is always too low right after a demand and too high long after one. Splitting size from interval removes that.

The plain estimator is biased UPWARD by roughly \(1/(1-\alpha/2)\) – about 5% at alpha = 0.1 – because the ratio of two smoothed quantities is not the smoothed ratio. variant = "sba" applies the Syntetos-Boylan correction and is the better default.

References

Croston, J. D. (1972). Forecasting and stock control for intermittent demands. Operational Research Quarterly, 23(3), 289-303. Syntetos, A. A. and Boylan, J. E. (2005). The accuracy of intermittent demand estimates. IJF, 21(2), 303-314.

Examples

round(morie_croston(c(0, 0, 5, 0, 0, 0, 3, 0, 4))$forecast, 3)
#> [1] 1.579