| simID | R Documentation |
Simulate intermittent demand time series, where demand occurrence follows a Bernoulli distribution and the non-zero demand a negative binomial distribution.
simID(n = 1, obs = 60, idi = 2, cv2 = 0.5, level = NULL)
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 |
A data frame with each generated series as a column.
Fotios Petropoulos
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.
idclass, data.frc.
# 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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.