backtest | R Documentation |
Perform out-of-sample prediction of a given ARIMA model and compute the summary statistics
backtest(m1, rt, orig, h = 1, xre = NULL, fixed = NULL, inc.mean = TRUE, reest = 1, method = c("CSS-ML"))
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 |
Perform estimation-prediction-reestimation in the forecasting subsample, and to compuate the summary statistics
origion |
Forecast origin |
error |
forecast errors |
forecasts |
forecasts |
rmse |
Root mean squared forecast errors |
mabso |
Mean absolute forecast errors |
reest |
Return the reest value |
Ruey S. Tsay
Tsay (2010). Analysis of Financial Time Series, 3rd. John Wiley. Hoboken, NJ.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.