Function returns the occurrence part of the ADAM model with the specified probability update and model types.
om(data, model = "ZXZ", lags = c(frequency(data)), orders = list(ar =
c(0), i = c(0), ma = c(0), select = FALSE), constant = FALSE,
formula = NULL, regressors = c("use", "select", "adapt"),
occurrence = c("auto", "fixed", "odds-ratio", "inverse-odds-ratio",
"direct", "general"), loss = c("likelihood", "MSE", "MAE", "HAM", "LASSO",
"RIDGE"), h = 0, holdout = FALSE, persistence = NULL, phi = NULL,
initial = c("backcasting", "optimal", "two-stage", "complete", "gradient"),
arma = NULL, ic = c("AICc", "AIC", "BIC", "BICc"), bounds = c("usual",
"admissible", "none"), ets = c("conventional", "adam"),
smoother = c("default", "ma", "lowess", "supsmu", "global"),
silent = TRUE, ...)An object of class c("om","adam","smooth").
Numeric vector, time series, or data frame. Non-binary input is automatically binarised: any non-zero value becomes 1.
Three-letter ETS specification such as "MNN" or
"AAN". Automatic selection with "Z" / "X" /
"Y" wildcards is supported.
Vector of seasonal lags. Defaults to frequency(data).
ARIMA orders list: list(ar, i, ma, select).
Logical; whether to include a constant term.
Optional formula for external regressors.
How to handle regressors: "use",
"select", or "adapt".
Type of link function mapping state to probability:
"fixed" (constant), "odds-ratio", "inverse-odds-ratio",
or "direct".
Loss function: "likelihood" (Bernoulli) or "MSE".
Forecast horizon.
If TRUE, a holdout sample of size h is withheld.
Optional persistence (smoothing) parameter vector.
Optional damping parameter.
Initialisation method: "backcasting", "optimal",
"two-stage", "complete", or "gradient" (solves the
initial states by profiling the occurrence loss; falls back to backcasting
for a custom loss or an out-of-scope specification).
Optional fixed ARMA parameters.
Information criterion for model selection.
Parameter bounds type.
Type of ETS model: "conventional" or "adam".
The smoother used by msdecompose to obtain the
initial level, trend and seasonal indices (and the seasonal profiles for
multiple seasonal models). "default" (the default) uses "ma" for
initial="optimal" and "global" otherwise; "ma",
"lowess", "supsmu" and "global" force the respective smoother.
If TRUE, suppresses output and plot.
Additional arguments passed to the optimiser (maxeval,
xtol_rel, algorithm, print_level).
The function estimates probability of demand occurrence, using the selected ADAM state space model. It supports ETS, ARIMA and explanatory variables, also allowing to have multiple frequencies and doing variables selection. It is an ADAM analogue for the binary occurrence variable modelling.
For the details about the model and its implementation, see the respective
vignette: vignette("om","smooth")
forecast.om, adam
set.seed(42)
y <- rbinom(120, 1, 0.6)
m <- om(y, model="MNN", occurrence="odds-ratio")
forecast(m, h=12)
Run the code above in your browser using DataLab