auto.om: Automatic Occurrence Model Selection

View source: R/auto-om.R

auto.omR Documentation

Automatic Occurrence Model Selection

Description

Fits om for each supplied occurrence type and returns the model with the lowest information criterion.

Usage

auto.om(data, model = "ZXZ", lags = c(frequency(data)), orders = list(ar
  = c(3, 3), i = c(2, 1), ma = c(3, 3), select = TRUE), formula = NULL,
  regressors = c("use", "select", "adapt"), occurrence = c("fixed",
  "odds-ratio", "inverse-odds-ratio", "direct", "general"), h = 0,
  holdout = FALSE, persistence = NULL, phi = NULL,
  initial = c("backcasting", "optimal", "two-stage", "complete"),
  arma = NULL, ic = c("AICc", "AIC", "BIC", "BICc"), bounds = c("usual",
  "admissible", "none"), silent = TRUE, parallel = FALSE,
  ets = c("conventional", "adam"), ...)

Arguments

data

Numeric vector, time series, or data frame. Non-binary input is automatically binarised: any non-zero value becomes 1.

model

Three-letter ETS specification (wildcards "Z"/"X"/"Y" supported).

lags

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

orders

ARIMA orders: list(ar, i, ma, select=TRUE/FALSE). When select=TRUE, ARIMA orders are selected automatically for each occurrence type.

formula

Optional formula for external regressors.

regressors

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

occurrence

Character vector of occurrence link types to try: "fixed", "odds-ratio", "inverse-odds-ratio", "direct".

h

Forecast horizon.

holdout

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

persistence

Optional persistence (smoothing) parameter vector.

phi

Optional damping parameter.

initial

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

arma

Optional fixed ARMA parameters.

ic

Information criterion used for selection.

bounds

Parameter bounds type.

silent

If TRUE, suppresses progress messages and plots.

parallel

If TRUE (or a core count), fit occurrence types in parallel. Requires foreach and doMC / doParallel.

ets

ETS flavour passed to om: "conventional" or "adam".

...

Additional arguments forwarded to om.

Value

The best om object (lowest IC), with $call set to the auto.om() call and $timeElapsed recording wall time.

See Also

om, auto.adam

Examples

set.seed(42)
y <- rbinom(120, 1, 0.6)
m <- auto.om(y, occurrence = c("fixed", "odds-ratio"))


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