adi {greybox}R Documentation

Automatic Demand Identifier

Description

The function applies several models on the provided time series and identifies what type of demand it is based on an information criterion.

Usage

adi(y, ic = c("AICc", "AIC", "BICc", "BIC"), level = 0.99)

Arguments

y

The vector of the data.

ic

Information criterion to use.

level

The confidence level used in stockouts identification.

Details

In the first step, function creates inter-demand intervals and fits a model with LOWESS of it assuming Geometric distribution. The outliers from this model are treated as potential stock outs.

In the second step, the function creates explanatory variables based on LOWESS of the original data, then applies Normal, Normal + Bernoulli models and selects the one that has the lowest IC. Based on that, it decides what type of demand the data corresponds to: regular or intermittent. Finally, if the data is count, the function will identify that.

Value

Class "adi" is returned, which contains:

Author(s)

Ivan Svetunkov, ivan@svetunkov.ru

Examples

# Data from Poisson distribution
y <- rpois(120, 0.7)
adi(y)


[Package greybox version 2.0.1 Index]