Creates an Integer-valued ARCH model for count time series. Seasonality enters the conditional mean through `k` harmonic waves of period `s`, and counts follow a Poisson distribution unless `nb = TRUE`.

INARCHModel(p = 1L, s = 0L, k = 1L, nb = FALSE)

Arguments

p

Order of the INARCH model (default: 1)

s

Seasonal period (default: 0 for no seasonality)

k

Number of harmonic waves used to represent seasonality (default: 1). Only meaningful when `s > 0`. Values above 1 are fitted correctly but not forecast correctly: `point_forecast()` and `interval_forecast()` in ForecastBaselines.jl evaluate every harmonic coefficient at the fundamental frequency, so forecasts do not reflect the seasonality that was estimated. Constructing such a model warns. Reported upstream at <https://github.com/ManuelStapper/ForecastBaselines.jl/issues/2>.

nb

Whether to use a negative binomial conditional distribution instead of Poisson, allowing for overdispersion (default: FALSE)

Value

A spec for a Julia `INARCHModel`, built when it is fitted (see [juliabridge::julia_spec()])

Examples

if (FALSE) { # \dontrun{
model <- INARCHModel(p = 1)

# Overdispersed counts with weekly data and annual seasonality
model <- INARCHModel(p = 1, s = 52, nb = TRUE)
} # }