evaluate: Evalute a time series or a list of time series models

View source: R/fitsimts.R

evaluateR Documentation

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")

SMAC-Group/simts documentation built on Sept. 4, 2023, 5:25 a.m.