Generates an expanding window walk forward backtest.
# S3 method for tsissm.autospec
tsbacktest(
object,
start = floor(length(object$y)/2),
end = length(object$y),
h = 1,
estimate_every = 1,
rolling = FALSE,
weights_scheme = c("AIC", "BIC", "U"),
weights = NULL,
seed = NULL,
trace = FALSE,
...
)# S3 method for tsissm.spec
tsbacktest(
object,
start = floor(length(object$target$y_orig)/2),
end = length(object$target$y_orig),
h = 1,
estimate_every = 1,
rolling = FALSE,
seed = NULL,
trace = FALSE,
...
)
A list with the following data.tables:
prediction : the backtest table with forecasts and actuals
metrics: a summary performance table showing metrics by forecast horizon (MAPE, MSLRE, BIAS and MIS if alpha was not NULL).
an object of class “tsissm.spec” “tsissm.autospec”.
numeric data index from which to start the backtest.
numeric data index on which to end the backtest. The backtest will end 1 period before that date in order to have at least 1 out of sample value to compare against.
forecast horizon. As the expanding window approaches the “end”, the horizon will automatically shrink to the number of available out of sample periods.
number of periods at which the model is re-estimated and new predictions are generated (defaults to 1).
this indicates whether forecasts are made only on the estimation date (FALSE) or whether to filter the data 1 period at a time and forecast from the filtered data (TRUE).
the weighting scheme to use when using ensembling (see note).
a vector of fixed user supplied weights of length top_n
when choosing
“U” in the “weights_scheme”.
an value specifying if and how the random number generator should be initialized (‘seeded’). Either NULL or an integer that will be used in a call to set.seed before simulating the response vectors.
whether to show the progress bar. The user is expected to have set up appropriate handlers for this using the “progressr” package.
not used.
[tsensemble()]