critMatrix {smoots}R Documentation

ARMA Order Selection Matrix

Description

An information criterion is calculated for different orders of an autoregressive-moving-average (ARMA) model.

Usage

critMatrix(
  X,
  p.max = 5,
  q.max = 5,
  criterion = c("bic", "aic"),
  include.mean = TRUE
)

Arguments

X

a numeric vector that contains the observed time series ordered from past to present; the series is assumed to follow an ARMA process.

p.max

an integer value >= 0 that defines the maximum autoregressive order to calculate the criterion for; is set to 5 by default; decimal numbers will be rounded off to integers.

q.max

an integer value >= 0 that defines the maximum moving-average order to to calculate the criterion for; is set to 5 by default; decimal numbers will be rounded off to integers.

criterion

a character value that defines the information criterion that will be calculated; the Bayesian Information Criterion ("bic") and Akaike Information Criterion ("aic") are the supported choices; is set to "bic" by default.

include.mean

a logical value; this argument regulates whether to estimate the mean of the series (TRUE) or not (FALSE); is set to TRUE by default.

Details

This function is part of the smoots package and was implemented under version 1.1.0. The series passed to X is assumed to follow an ARMA(p,q) model. A p.max + 1 by q.max + 1 matrix is calculated for this series. More precisely, the criterion chosen via the argument criterion is calculated for all combinations of orders p = 0, 1, ..., p_{max} and q = 0, 1, ..., q_{max}.

Within the function, two information criteria are supported: the Bayesian Information Criterion (BIC) and Akaike's Information Criterion (AIC). The AIC is given by

AIC_{p,q} := \ln(\hat{\sigma}_{p,q}^{2}) + \frac{2(p+q)}{n},

where \hat{sigma}_{p,q}^{2} is the estimated innovation variance, p and q are the ARMA orders and n is the number of observations.

The BIC, on the other hand, is defined by

BIC_{p,q} := k \ln(n) - 2\ln(\hat{L})

with k being the number of estimated parameters and \hat{L} being the estimated Log-Likelihood. Since the parameter k only differs with respect to the orders p and q for all estimated models, the term k \ln(n) is reduced to (p + q) \ln(n) within the function. Exemplarily, if the mean of the series is estimated as well, it is usually considered within the parameter k when calculating the BIC. However, since the mean is estimated for all models, not considering this estimated parameter within the calculation of the BIC will reduce all BIC values by the same amount of \ln(n). Therefore, the selection via this simplified criterion is still valid, if the number of the estimated parameters only differs with respect to p and q between the models that the BIC is obtained for.

The optimal orders are considered to be the ones which minimize either the BIC or the AIC. The use of the BIC is however recommended, because the BIC is consistent, whereas the AIC is not.

NOTE:

Within this function, the arima function of the stats package with its method "CSS-ML" is used throughout for the estimation of ARMA models.

Value

The function returns a p.max + 1 by q.max + 1 matrix, where the rows represent the AR orders from p = 0 to p = p_{max} and the columns represent the MA orders from q = 0 to q = q_{max}. The values within the matrix are the values of the previously selected information criterion for the different combinations of p and q.

Author(s)

Examples

## Not run: 
# Simulate an ARMA(2,1) process
set.seed(23)
X.sim <- stats::arima.sim(model = list(ar = c(1.2, -0.71), ma = 0.46),
 n = 1000) + 13.1
# Application of the function
critMatrix(X.sim)
# Result: Via the BIC, the orders p.opt = 2 and q.opt = 1 are selected.

## End(Not run)

[Package smoots version 1.1.4 Index]