oesg: Occurrence ETS general model

View source: R/oesg.R

oesgR Documentation

Occurrence ETS general model

Description

Wrapper of omg that fits a general occurrence (probability) model — two parallel ETS sub-models A and B combined via a Beta-distribution link — to a univariate intermittent time series. ARIMA components and regression formulas are disabled; use omg directly if those are needed.

Usage

oesg(y, modelA = "MNN", modelB = modelA, lags = c(frequency(y)),
  persistenceA = NULL, persistenceB = persistenceA, phiA = NULL,
  phiB = phiA, initial = c("backcasting", "optimal", "two-stage",
  "complete"), ic = c("AICc", "AIC", "BIC", "BICc"), h = 0,
  holdout = FALSE, bounds = c("usual", "admissible", "none"),
  etsA = c("conventional", "adam"), etsB = etsA, xregA = NULL,
  xregB = NULL, regressorsA = c("use", "select"),
  regressorsB = regressorsA, silent = TRUE, ...)

Arguments

y

Univariate numeric vector or time series. Non-binary input is binarised internally by omg.

modelA

Three-letter ETS specification for sub-model A.

modelB

Three-letter ETS specification for sub-model B. Defaults to modelA.

lags

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

persistenceA

Optional persistence vector for sub-model A.

persistenceB

Optional persistence vector for sub-model B. Defaults to persistenceA.

phiA

Optional damping parameter for sub-model A.

phiB

Optional damping parameter for sub-model B. Defaults to phiA.

initial

Initialisation method passed to both sub-models.

ic

Information criterion for model selection.

h

Forecast horizon.

holdout

If TRUE, a holdout of size h is withheld.

bounds

Parameter bounds type.

etsA

ETS type for sub-model A: "conventional" or "adam".

etsB

ETS type for sub-model B. Defaults to etsA.

xregA

Optional numeric vector or matrix of exogenous regressors for sub-model A, aligned with y.

xregB

Optional numeric vector or matrix of exogenous regressors for sub-model B, aligned with y.

regressorsA

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

regressorsB

How to handle xregB. Defaults to regressorsA.

silent

If TRUE, suppresses output and plot.

...

Additional arguments forwarded to omg.

Value

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

See Also

omg, oes

Examples

set.seed(42)
y <- rbinom(120, 1, 0.3)
m <- oesg(y, modelA="MNN", modelB="MNN")
forecast(m, h=12)


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