Fits two parallel ETS occurrence models (A: odds-ratio, B: inverse-odds-ratio) jointly using a shared Bernoulli log-likelihood. The combined probability at each time point is \(p_t = p_{At} / (p_{At} + p_{Bt})\).
omg(data, modelA = "MNN", modelB = modelA, ordersA = list(ar = c(0), i =
c(0), ma = c(0), select = FALSE), ordersB = ordersA, constantA = FALSE,
constantB = constantA, formulaA = NULL, formulaB = formulaA,
regressorsA = c("use", "select", "adapt"), regressorsB = regressorsA,
persistenceA = NULL, persistenceB = persistenceA, phiA = NULL,
phiB = phiA, armaA = NULL, armaB = armaA, etsA = c("conventional",
"adam"), etsB = etsA, lags = c(frequency(data)), h = 0,
holdout = FALSE, initial = c("backcasting", "optimal", "two-stage",
"complete", "gradient"), loss = c("likelihood", "MSE", "MAE", "HAM",
"LASSO", "RIDGE"), ic = c("AICc", "AIC", "BIC", "BICc"),
bounds = c("usual", "admissible", "none"), model = NULL,
smoother = c("default", "ma", "lowess", "supsmu", "global"),
silent = TRUE, ...)An object of class c("omg","om","smooth").
Binary time series (0/1), vector or data frame.
ETS model string for model A (default "MNN").
ETS model string for model B (default "MNN").
ARIMA orders list for model A.
ARIMA orders list for model B.
Logical, include constant in model A.
Logical, include constant in model B.
Formula for exogenous variables in model A.
Formula for exogenous variables in model B.
How to handle regressors in model A.
How to handle regressors in model B.
Persistence vector for model A.
Persistence vector for model B.
Damping parameter for model A.
Damping parameter for model B.
ARMA parameters for model A.
ARMA parameters for model B.
ETS variant for model A ("conventional" or "adam").
ETS variant for model B.
Seasonal lags (shared).
Forecast horizon.
If TRUE, hold out the last h observations.
Initialisation method (shared).
Loss function (shared).
Information criterion (shared).
Parameter bounds type (shared).
An already-fitted omg object. When supplied, the
per-side parameters are lifted from model$modelA and
model$modelB and no estimation is performed; passing
FI=TRUE alongside computes the observed Fisher information
over the joint parameter vector (the path used by
vcov.omg).
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, suppress output.
Additional arguments passed to the optimiser.
om, forecast.omg
set.seed(41)
y <- rpois(100, 0.5)
m <- omg(y)
forecast(m, h=10)
Run the code above in your browser using DataLab