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

select

Time Series Model Selection


Description

This function performs model fitting and calculates the model selection criteria to be plotted.

Usage

select(model, Xt, include.mean = TRUE, criterion = "aic",
  plot = TRUE)

Arguments

model

A time series model (only ARIMA are currently supported).

Xt

A vector of time series data.

include.mean

A boolean indicating whether to fit ARIMA with the mean or not.

criterion

A string indicating which model selection criterion should be used (possible values: "aic" (default), "bic", "hq").

plot

A boolean indicating whether a model selection plot is returned or not.

Author(s)

Stéphane Guerrier and Yuming Zhang

Examples

set.seed(763)
Xt = gen_gts(100, AR(phi = c(0.2, -0.5, 0.4), sigma2 = 1))
select(AR(5), Xt, include.mean = FALSE)

Xt = gen_gts(100, MA(theta = c(0.2, -0.5, 0.4), sigma2 = 1))
select(MA(5), Xt, include.mean = FALSE)

Xt = gen_gts(500, ARMA(ar = 0.5, ma = c(0.5, -0.5, 0.4), sigma2 = 1))
select(ARMA(5,3), Xt, criterion = "hq", include.mean = FALSE)

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.