powered by
Backtest for an ARIMA time series model.
backtest(m1, rt, orig, h, xre = NULL, fixed = NULL, include.mean = TRUE)
The function returns a list with following components:
the starting forecast origin.
observed value minus fitted value.
RMSE of out-of-sample forecasts.
mean absolute error of out-of-sample forecasts.
bias of out-of-sample forecasts.
an ARIMA time series model object.
the time series.
forecast origin.
forecast horizon.
the independent variables.
parameter constraint.
a logical value for constant term of the model. Default is TRUE.
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)
Run the code above in your browser using DataLab