optOrd function

Optimal Order Selection

Optimal Order Selection

From a matrix with values of an information criterion for different orders pp and qq of an autoregressive-moving-average (ARMA) model, the optimal orders are selected.

optOrd(mat, restr = NULL, sFUN = min)

Arguments

  • mat: a numeric matrix, whose rows represent the AR orders p=0,1,...,pmaxp = 0, 1, ..., p_max and whose columns represent the MA orders q=0,1,qmaxq = 0, 1, q_max; the elements of the matrix are then the values of an information criterion calculated for ARMA models with the different order combinations; a matrix returned by the function critMatrix of the smoots

    package shares these characteristics.

  • restr: a single expression (not a character object) that defines further restrictions; the standard logical operators, e.g. >=, & or ==, can be used; refer to the rows with p and to the columns with q; is set to NULL by default, i.e. no restrictions are imposed.

  • sFUN: the selection function; is set to min, i.e. the minimal value that meets the restrictions restr is selected and the corresponding orders pp and qq are returned.

Returns

The function returns a vector with two elements. The first element is the optimal order pp, whereas the second element is the selected optimal order qq.

Details

Given a matrix mat filled with the values of an information criterion for different estimated ARMA(p,qp,q) models, where the rows represent different orders p=0,1,...,pmaxp = 0, 1, ..., p_max and where the columns represent the orders c("q=0,1,...,\nq = 0, 1, ...,\n", "qmaxq_max"), the function returns a vector with the optimal orders pp and qq. Further selection restrictions can be passed to the argument restr as an expression. To implement a restriction, the rows and columns are addressed via p and q, respectively. Moreover, standard boolean operators such as ==, >= or & can be used. See the Section Examples for examples of different restrictions. In many cases, the minimum value of a criterion is considered to indicate the best model. However, in some other cases a different selection approach might be appropriate. Therefore, a selection function can be considered by means of the argument sFUN. The default is sFUN = min, i.e. the function min is applied to select the optimal orders.

Examples

## Not run: set.seed(21) Xt <- arima.sim(model = list(ar = c(1.2, -0.5), ma = 0.7), n = 1000) + 7 mat <- smoots::critMatrix(Xt) optOrd(mat) # without restrictions optOrd(mat, p <= q) # with one restriction optOrd(mat, p >= 1 & q >= 4) # with two restrictions ## End(Not run)

Author(s)

  • Sebastian Letmathe (Scientific Employee) (Department of Economics, Paderborn University),