backtest {NTS} | R Documentation |
Backtest
Description
Backtest for an ARIMA time series model.
Usage
backtest(m1, rt, orig, h, xre = NULL, fixed = NULL, include.mean = TRUE)
Arguments
m1 |
an ARIMA time series model object. |
rt |
the time series. |
orig |
forecast origin. |
h |
forecast horizon. |
xre |
the independent variables. |
fixed |
parameter constraint. |
include.mean |
a logical value for constant term of the model. Default is TRUE. |
Value
The function returns a list with following components:
orig |
the starting forecast origin. |
err |
observed value minus fitted value. |
rmse |
RMSE of out-of-sample forecasts. |
mabso |
mean absolute error of out-of-sample forecasts. |
bias |
bias of out-of-sample forecasts. |
Examples
data=arima.sim(n=100,list(ar=c(0.5,0.3)))
model=arima(data,order=c(2,0,0))
backtest(model,data,orig=70,h=1)
[Package NTS version 1.1.3 Index]