select_arima: Run Model Selection Criteria on ARIMA Models

View source: R/model_selection.R

select_arimaR Documentation

Run Model Selection Criteria on ARIMA Models

Description

This function performs model fitting and calculates the model selection criteria to be plotted or used in best_model function.

Usage

select_arima(
  xt,
  p.min = 0L,
  p.max = 3L,
  d = 0L,
  q.min = 0L,
  q.max = 3L,
  include.mean = TRUE,
  plot = TRUE
)

select_arma(
  xt,
  p.min = 0L,
  p.max = 3L,
  q.min = 0L,
  q.max = 3L,
  include.mean = TRUE,
  plot = TRUE
)

select_ar(xt, p.min = 0L, p.max = 3L, include.mean = TRUE, plot = TRUE)

select_ma(xt, q.min = 0L, q.max = 3L, include.mean = TRUE, plot = TRUE)

Arguments

xt

A vector of univariate time series.

p.min

An integer indicating the lowest order of AR(p) process to search.

p.max

An integer indicating the highest order of AR(p) process to search.

d

An integer indicating the differencing order for the data.

q.min

An integer indicating the lowest order of MA(q) process to search.

q.max

An integer indicating the highest order of MA(q) process to search.

include.mean

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

plot

A logical. If TRUE (the default) a plot should be produced.

Examples

xt = gen_arima(N=100, ar=0.3, d=1, ma=0.3)
x = select_arima(xt, d=1L)

xt = gen_ma1(100, 0.3, 1)
x = select_ma(xt, q.min=2L, q.max=5L)
best_model(x)

xt = gen_arma(10, c(.4,.5), c(.1), 1, 0)  
x = select_arma(xt, p.min = 1L, p.max = 4L,
                q.min = 1L, q.max = 3L)

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