\( \newcommand{\mathbbm}[1]{\boldsymbol{\mathbf{#1}}} \)

19.3 Cheat sheet for adam() function

This Chapter summarises the main ways of using adam() in R with references to the chapters and sections, where specific elements were discussed.

Estimate the best ETS model for the provided data (Section 15.1):

ourModel <- adam(y)

The best ETS, taking the last 10 observations of time series as a holdout to test the performance of model:

ourModel <- adam(y, h=10, holdout=TRUE)

Build a pure multiplicative seasonal ETS with an arbitrary seasonal lag of 7 (can be applied to an object y of any class, including ts, vector, matrix, zoo, tibble etc):

ourModel <- adam(y, model="YYM", lags=7)

Estimate the best ARIMA model for the provided data (assuming seasonal lag of 7, Section 15.2):

ourModel <- adam(y, model="NNN", lags=7,

Build ARIMA(0,1,1) with drift (Chapter 8 for the general ARIMA and Section 8.1.4 for the one with constant):

ourModel <- adam(y, model="NNN",
                 orders=c(0,1,1), constant=TRUE)

Estimate ETS(A,N,N)+ARIMA(1,0,0) model (Sections 8.4 and 9.4):

ourModel <- adam(y, model="ANN", orders=c(1,0,0))

Use Generalised Normal distribution for the residuals of ADAM ETS(A,A,N) (Sections 5.5, 6.5 and 11.1):

ourModel <- adam(y, model="AAN", distribution="dgnorm")

Select the best distribution for the specific ADAM ETS(A,A,N) (Chapter 15):

ourModel <- auto.adam(y, model="AAN")

Select the most appropriate ETSX model for the provided data (which can be any 2-dimensional object, such as matrix, data.frame or tibble, see Chapter 10):

ourModel <- adam(data)

Specify, which explanatory variables to include and in what form (Section 10.1):

ourModel <- adam(data, formula=y~x1+x2+I(x2^2))

Select the set of explanatory variables for ETSX(M,N,N) based on AIC (Section 15.3):

ourModel <- adam(data, model="MNN",
                 regressors="select", ic="AIC")

Estimate ETS(A,Ad,N) model using a multistep loss function, GTMSE (Section 11.3):

ourModel <- adam(y, model="AAdN",
                 h=10, loss="GTMSE")

Estimate ARIMA(1,1,2) using a multistep loss function (Section 11.3) with backcasting of initials (Section 11.4):

ourModel <- adam(y, model="NNN", orders=c(1,1,2),
                 h=10, loss="GTMSE", initial="backcasting")

Select and estimate the most appropriate ETS model on the data with multiple frequencies (Chapter 12):

ourModel <- adam(y, model="ZXZ", lags=c(24,24*7,24*365))

Select and estimate the triple seasonal ARIMA on the data with multiple frequencies (Chapter 12):

ourModel <- adam(y, model="NNN", lags=c(1,24,24*7,24*365),

Apply an automatically selected occurrence part of the model to intermittent data (Section 13.1):

oesModel <- oes(y, model="YYY", occurrence="auto")

Use the estimated occurrence model in adam() to model intermittent data (Section 13.2):

ourModel <- adam(y, model="YYY", occurrence=oesModel)

Or alternatively just use the same model for occurrence and demand sizes part (Chapter 13):

ourModel <- adam(y, model="YYY", occurrence="auto")

Estimate the scale model for previously estimated ADAM (Chapter 17):

scaleModel <- sm(ourModel, model="YYY")

Implant the scale model into the ADAM for future use (e.g. for forecasting):

mergedModel <- implant(ourModel, scaleModel)

Produce diagnostics plots to see if the ADAM can be improved any further (Chapter 14):

plot(ourModel, which=c(1,2,4,6))

Extract conventional, standardised and studentised residuals (Chapter 14):


Plot time series decomposition according to ADAM ETS (Section 4.1):

plot(ourModel, which=12)

Produce point forecast and prediction interval from ADAM for 10 steps ahead (Chapter 18):

forecast(ourModel, h=10, interval="prediction")

Produce point forecast and prediction interval for ADAM, cumulative over the lead time of 10 (Subsection 18.4.3):

forecast(ourModel, h=10, interval="prediction",

Produce point forecast and empirical prediction interval for upper bound (upper quantile of distribution, Sections 18.3.5 and 18.4.2):

forecast(ourModel, h=10, interval="empirical",

Produce summary of ADAM (Chapter 16):


Reapply ADAM with randomly selected initials and parameters (to capture the uncertainty of parameters) and produce forecasts from each of these models (Section 16.5):

reforecast(ourModel, h=10, interval="prediction")

Extract multistep forecast errors from ADAM (Subsection 14.7.3):

rmultistep(ourModel, h=10)

Extract covariance matrix of multistep forecast errors from ADAM (Section 11.3):

multicov(ourModel, h=10)

Extract actual and fitted values from ADAM: