Learn R Programming

simts (version 0.1.1)

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

Examples

Run this code
# NOT RUN {
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")
# }

Run the code above in your browser using DataLab