Skip to contents

Jirak's (2012) q-hat(5): fits Yule-Walker AR(k) for every dimension k <= p_n, studentises each coefficient vector with its exact null standard error, applies a common Gumbel threshold calibrated on the maximal dimension, and returns the largest per-dimension last-crossing. The refits recover power that the single full-dimension band (fh_order(statistic = "jirak_band", threshold = "gumbel")) can lose when a coefficient is small in the long-AR representation.

Usage

jirak_order(x, alpha = 0.05, memory = NULL)

Arguments

x

A numeric vector (a stationary series).

alpha

Level of the Gumbel band (default 0.05); a slowly vanishing level gives the consistent variant.

memory

Maximal fitting dimension p_n; NULL uses the default ceiling(2 log n).

Value

A list with order (the maximum), p_n, tau and the per_dimension estimates for k = 1:p_n.

Examples

set.seed(1)
x <- arima.sim(list(ar = c(1.2, -0.6)), 400)
jirak_order(x)$order
#> [1] 2