Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

evaluate

Evalute a time series or a list of time series models


Description

This function calculates AIC, BIC and HQ or the MAPE for a list of time series models. This function currently only supports models estimated by the MLE.

Usage

evaluate(models, Xt, criterion = "IC", start = 0.8, demean = TRUE,
  print = TRUE)

Arguments

models

A time series model or a list of time series models.

Xt

A time series (i.e gts object).

criterion

Either "IC" for AIC, BIC and HQ or "MAPE" for MAPE.

start

A numeric indicating the starting proportion of the data that is used for prediction (assuming criterion = "MAPE").

demean

A boolean indicating whether the model includes a mean / intercept term or not.

print

logical. If TRUE (the default) results are printed.

Value

AIC, BIC and HQ or MAPE

Author(s)

Stéphane Guerrier

Examples

set.seed(18)
n = 300
Xt = gen_gts(n, AR(phi = c(0, 0, 0.8), sigma2 = 1))
evaluate(AR(1), Xt)
evaluate(list(AR(1), AR(3), MA(3), ARMA(1,2), 
SARIMA(ar = 1, i = 0, ma = 1, sar = 1, si = 1, sma = 1, s = 12)), Xt)
evaluate(list(AR(1), AR(3)), Xt, criterion = "MAPE")

simts

Time Series Analysis Tools

v0.1.1
AGPL-3 | file LICENSE
Authors
Stéphane Guerrier [aut, cre, cph], James Balamuta [aut, cph], Roberto Molinari [aut, cph], Justin Lee [aut], Yuming Zhang [aut], Wenchao Yang [ctb], Nathanael Claussen [ctb], Yunxiang Zhang [ctb], Christian Gunning [cph], Romain Francois [cph], Ross Ihaka [cph], R Core Team [cph]
Initial release
2019-07-21

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.