backtest: Backtest

Description Usage Arguments Value Examples

Description

Backtest for an ARIMA time series model.

Usage

1
2
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 constriant.

include.mean

a logicial 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 foecasts.

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)

ConvFuncTimeSeries/test_t documentation built on May 29, 2019, 1:39 p.m.