Skip to contents

Back-test a forecasting configuration on a holdout tail

Usage

morie_ts_backtest(x, h = 10L, order = c(0L, 0L, 0L), seasonal = c(0L, 0L, 0L))

Arguments

x

A numeric series or morie_ts.

h

Holdout length (also the forecast horizon).

order, seasonal

ARIMA orders passed to morie_ts_arima().

Value

A list with the forecast, the held-out actual, and the accuracy metrics.

Examples

morie_ts_backtest(cumsum(rnorm(120)), h = 12, order = c(1, 1, 0))$accuracy
#>      RMSE       MAE      MAPE        ME 
#>  1.928499  1.701037 12.109279 -1.701037