backtest: Backtest

Description Usage Arguments Value Examples

Description

Backtest for an ARIMA time series model.

Usage

1
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

1
2
3
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)

NTS documentation built on Aug. 6, 2020, 5:08 p.m.

Related to backtest in NTS...