Skip to content
Ivan Svetunkov edited this page Apr 10, 2026 · 9 revisions

oETS - Occurrence ETS

oETS (occurrence ETS) models the probability of demand occurrence for intermittent time series data. It implements the occurrence part of the iETS (intermittent ETS) framework. Currently implemented in the R function oes().

Note: oETS is currently available only in R.

Note: iETS refers to the full model for demand sizes and demand occurrence. oETS refers to the occurrence part only.

Overview

Intermittent demand data contains many zero values, common in:

  • Spare parts inventory
  • Slow-moving items
  • Event-based data
  • Count data with rare occurrences

oETS models the probability of non-zero demand using ETS-style state-space models, which can then be combined with a demand sizes model for full intermittent demand forecasting.

The more details description of the models is provided in Svetunkov (2023), Chapter 13.

Mathematical Framework

The general iETS model (iETS_G) is defined as:

y_t = o_t × z_t
o_t ~ Bernoulli(p_t)
p_t = μ_{a,t} / (μ_{a,t} + μ_{b,t})

Where:

  • y_t: Observed demand
  • z_t: Demand size (modeled by a pure multiplicative ETS)
  • o_t: Binary occurrence variable (1 = non-zero demand, 0 = no demand)
  • p_t: Probability of non-zero demand
  • μ_{a,t}, μ_{b,t}: Conditional expectations of unobservable variables a_t and b_t

Both a_t and b_t follow their own ETS models:

a_t = l_{a,t-1}(1 + ε_{a,t})
l_{a,t} = l_{a,t-1}(1 + α_a × ε_{a,t})
μ_{a,t} = l_{a,t-1}

And similarly for b_t.

oETS Model Subtypes

Depending on restrictions on μ_{a,t} and μ_{b,t}, there are several iETS subtypes:

Subtype Code Restriction Description
oETS_F "fixed" μ_a = const, μ_b = const Fixed probability of occurrence
oETS_O "odds-ratio" μ_b = 1 Odds-ratio model (logistic transform)
oETS_I "inverse-odds-ratio" μ_a = 1 Inverse odds-ratio model
oETS_D "direct" μ_a + μ_b = 1, μ_a ≤ 1 Direct probability (TSB-like)
oETS_G "general" No restrictions General model with both μ_a and μ_b evolving
oETS_A "auto" - Automatic selection between subtypes

oETS_F (Fixed)

The simplest model with constant probability:

o_t ~ Bernoulli(p)
p̂ = T₁/T

Where T₁ is the number of non-zero observations and T is the total observations.

oETS_O (Odds-Ratio)

Sets μ_b = 1, so:

p_t = μ_{a,t} / (μ_{a,t} + 1)

The model focuses on the odds of occurrence.

oETS_I (Inverse Odds-Ratio)

Sets μ_a = 1, so:

p_t = 1 / (1 + μ_{b,t})

Resembles logistic regression. This model underlies Croston's method when 1 + b_t equals demand intervals.

oETS_D (Direct)

Imposes μ_a + μ_b = 1 with μ_a ∈ [0, 1]:

p_t = μ_{a,t} = min(l_{a,t-1}, 1)

Similar to the TSB (Teunter-Syntetos-Babai) method.

oETS_G (General)

No restrictions - both μ_a and μ_b evolve according to their own ETS models. Most flexible but requires more parameters.

R Usage

Basic oETS Models

library(smooth)

# Generate intermittent data
y <- rpois(100, 0.5)

# Fixed probability
oes(y, occurrence="fixed", h=10, holdout=TRUE)

# Odds-ratio model with ETS(M,N,N)
oes(y, model="MNN", occurrence="odds-ratio", h=10, holdout=TRUE)

# Inverse odds-ratio
oes(y, model="MNN", occurrence="inverse-odds-ratio", h=10, holdout=TRUE)

# Direct (TSB-like)
oes(y, model="MNN", occurrence="direct", h=10, holdout=TRUE)

# General model (calls oesg internally)
oes(y, model="MNN", occurrence="general", h=10, holdout=TRUE)

# Automatic selection between subtypes
oes(y, model="MNN", occurrence="auto", h=10, holdout=TRUE)

General Model with oesg()

The oesg() function allows specifying different ETS models for a_t and b_t:

# Different models for a and b
# oETS_G(M,N,N)(A,A,N)
oesg(y, modelA="MNN", modelB="AAN", h=10, holdout=TRUE)

# Same model for both
oesg(y, modelA="MNN", modelB="MNN", h=10, holdout=TRUE)

Full iETS Model with adam()

Combine occurrence and demand sizes in one model:

# iETS(M,M,N)_F - fixed probability
adam(y, "MMN", occurrence="fixed", h=10, holdout=TRUE)

# iETS(M,M,N)_O - odds-ratio with specified oETS model
adam(y, "MMN", occurrence="odds-ratio", oesmodel="MMN", h=10, holdout=TRUE)

# Two-step approach: estimate oETS first, then use in adam
oesModel <- oes(y, model="MMN", occurrence="odds-ratio", h=10, holdout=TRUE)
adam(y, "MMN", occurrence=oesModel, h=10, holdout=TRUE)

# General model
adam(y, "MMN", occurrence="general", oesmodel="MMN", h=10, holdout=TRUE)

Parameters

Parameter Type (R) Type (Python) Default Description
y vector/ts TBA - Time series data
model character TBA "MNN" ETS model for occurrence (e.g., "MNN", "MMN")
occurrence character TBA - Occurrence subtype
persistence numeric vector TBA NULL Fixed smoothing parameters
initial character TBA "optimal" Initialization method
initialSeason numeric vector TBA NULL Initial seasonal states
phi numeric TBA NULL Damping parameter
ic character TBA "AICc" Information criterion
h integer TBA 0 Forecast horizon
holdout logical TBA FALSE Use holdout validation
bounds character TBA "usual" Parameter bounds

Model Notation

The full iETS notation is: iETS(E,T,S)_X(E,T,S)(E,T,S)

  • First brackets: ETS model for demand sizes
  • Subscript letter: Subtype (F, O, I, D, G)
  • Second brackets: ETS model for a_t
  • Third brackets: ETS model for b_t (only for iETS_G)

Examples:

  • iETS(M,N,N)_F: Fixed probability with MNN for sizes
  • iETS(M,M,N)_O(M,N,N): Odds-ratio with MMN for sizes, MNN for occurrence
  • iETS(M,N,N)_G(M,N,N)(A,A,N): General with different models for a and b

When discussing only the occurrence part, use oETS notation (e.g., oETS_O(M,N,N)).

Output

The oes() function returns an object of class "occurrence" containing (R only):

Element Type (R) Description
model character ETS model type used
occurrence character Occurrence subtype
fitted vector Fitted probability values
forecast vector Probability forecasts
states matrix State vector values
persistence numeric vector Smoothing parameters
phi numeric Damping parameter
initial numeric vector Initial states
logLik numeric Log-likelihood
residuals vector Model residuals
y vector Actual occurrence (0/1)

References

See Also

  • ADAM - Unified framework with occurrence support
  • ES - Standard Exponential Smoothing

Clone this wiki locally