oes: Occurrence ETS model

View source: R/om-oes.R

oesR Documentation

Occurrence ETS model

Description

Wrapper of om that fits an occurrence (probability) ETS model to a univariate intermittent time series. ARIMA components, ARMA parameters, and explanatory-variable formulas are disabled (orders, arma, formula are all forced to NULL); use om directly if those features are needed.

Usage

oes(y, model = "MNN", lags = c(frequency(y)), persistence = NULL,
  phi = NULL, initial = c("backcasting", "optimal", "two-stage",
  "complete"), occurrence = c("auto", "fixed", "odds-ratio",
  "inverse-odds-ratio", "direct", "general"), ic = c("AICc", "AIC", "BIC",
  "BICc"), h = 0, holdout = FALSE, bounds = c("usual", "admissible",
  "none"), ets = c("conventional", "adam"), xreg = NULL,
  regressors = c("use", "select"), silent = TRUE, ...)

Arguments

y

Univariate numeric vector or time-series. Non-binary input is binarised (any non-zero value becomes 1).

model

Three-letter ETS specification (e.g. "MNN", "AAdN"). Wildcards "Z"/"X"/"Y" trigger automatic selection.

lags

Vector of seasonal lags. Defaults to frequency(y).

persistence

Optional persistence (smoothing) parameter vector.

phi

Optional damping parameter. Only used for damped-trend models.

initial

Initialisation method: "backcasting", "optimal", "two-stage", or "complete".

occurrence

Type of link function mapping the state to a probability: "fixed", "odds-ratio", "inverse-odds-ratio", or "direct".

ic

Information criterion for model selection.

h

Forecast horizon.

holdout

If TRUE, a holdout sample of size h is withheld.

bounds

Parameter bounds type.

ets

Type of ETS model: "conventional" or "adam".

xreg

Optional numeric vector or matrix of exogenous regressors, aligned with y. Merged with y into a multi-column data matrix before being passed to om.

regressors

How to handle regressors: "use" or "select".

silent

If TRUE, suppresses output and plot.

...

Additional arguments forwarded to om (e.g. maxeval, xtol_rel, algorithm, print_level).

Details

This is the analogue of es for occurrence models: a lightweight ETS-only entry point that delegates the heavy lifting to om.

Value

An object of class c("om","adam","smooth").

See Also

om, es

Examples

set.seed(42)
y <- rbinom(120, 1, 0.6)
m <- oes(y, model="MNN", occurrence="odds-ratio")
forecast(m, h=12)


smooth documentation built on June 21, 2026, 9:06 a.m.