select_ar_lag_sic: Select AR lag order by SIC (BIC)

View source: R/oos_helpers.R

select_ar_lag_sicR Documentation

Select AR lag order by SIC (BIC)

Description

Selects the lag order for an autoregressive model of the horizon-h target y_{t,h} by minimising the Schwarz Information Criterion.

Usage

select_ar_lag_sic(y, h, p_max)

Arguments

y

Numeric vector of the target variable.

h

Positive integer; forecast horizon. For h = 1 the target is simply y.

p_max

Maximum lag order to consider. The function evaluates p = 0, 1, ..., p_max.

Value

Integer: selected lag order. A value of 0 means the intercept-only model is preferred.

Examples

y <- rnorm(200)
select_ar_lag_sic(y, h = 1, p_max = 4)


sdim documentation built on July 15, 2026, 1:10 a.m.