simID: Simulator for intermittent demand series

View source: R/simID.R

simIDR Documentation

Simulator for intermittent demand series

Description

Simulate intermittent demand time series, where demand occurrence follows a Bernoulli distribution and the non-zero demand a negative binomial distribution.

Usage

simID(n = 1, obs = 60, idi = 2, cv2 = 0.5, level = NULL)

Arguments

n

Number of time series to be generated.

obs

Number of observations of each series.

idi

Average inter-demand interval of each series.

cv2

Squared coefficient of variation of the non-zero demand.

level

Mean level of the non-zero demand. If NULL, then a random level in [10,100] is selected for each series.

Value

A data frame with each generated series as a column.

Author(s)

Fotios Petropoulos

References

Petropoulos, F., Makridakis, S., Assimakopoulos, V., and Nikolopoulos, K. (2014). 'Horses for courses' in demand forecasting. European Journal of Operational Research, 237(1), 152–163.

See Also

idclass, data.frc.

Examples

# 100 series of 60 observations
dataset <- simID(100, 60, idi=1.15, cv2=0.3)
dim(dataset)

# More intermittent series with a fixed level
dataset <- simID(10, 60, idi=3, cv2=0.5, level=20)
plot(dataset[,1], type="h")


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