crost.decomp: Croston decomposition

View source: R/crost.decomp.R

crost.decompR Documentation

Croston decomposition

Description

Decompose an intermittent demand time series into the non-zero demand and the intervals between demands, as used by Croston's method.

Usage

crost.decomp(data, init = c("naive", "mean"))

Arguments

data

Intermittent demand time series. This can be a vector, a ts object, or a data frame, in which case only the first column is used.

init

Initial value for the intervals. This can be:

  • a numeric value;

  • "naive": the first interval is the number of periods from the start of the series to the first demand;

  • "mean": the first interval is the mean of all in-sample intervals.

Value

A list containing:

demand

Non-zero demand vector.

interval

Intervals vector.

Author(s)

Nikolaos Kourentzes, nikolaos@kourentzes.com

See Also

crost.

Examples

crost.decomp(ts.data1)

# The first interval replaced by the mean interval
crost.decomp(ts.data1, init="mean")$interval


tsintermittent documentation built on Nov. 14, 2026, 5:06 p.m.