Learn R Programming

MTS (version 1.2.1)

backtest: Backtesting of a scalar ARIMA model

Description

Perform out-of-sample prediction of a given ARIMA model and compute the summary statistics

Usage

backtest(m1, rt, orig, h = 1, xre = NULL, fixed = NULL, 
  inc.mean = TRUE, reest = 1, method = c("CSS-ML"))

Arguments

m1

An output of the arima command for scalar time series

rt

The time series under consideration

orig

The starting forecast origin. It should be less than the length of the underlying time series

h

The forecast horizon. For a given h, it computes 1-step to h-step ahead forecasts

inc.mean

A logical switch. It is true if mean vector is estimated.

fixed

A vector of the length of the number of coefficients of the ARIMA model. It is used in R for parameter constraint.

xre

A matrix containing the exogeneous variables used in the ARIMA model

reest

A control variable used to re-fit the model in prediction. The program will re-estimate the model for every new reest observations. The default is 1. That is, re-estimate the model with every new data point.

method

Estimation method in the ARIMA model

Value

origion

Forecast origin

error

forecast errors

forecasts

forecasts

rmse

Root mean squared forecast errors

mabso

Mean absolute forecast errors

reest

Return the reest value

Details

Perform estimation-prediction-reestimation in the forecasting subsample, and to compuate the summary statistics

References

Tsay (2010). Analysis of Financial Time Series, 3rd. John Wiley. Hoboken, NJ.