hanr_garch: Anomaly detector using GARCH (native ARMA(1,1)-GARCH(1,1))

View source: R/hanr_garch.R

hanr_garchR Documentation

Anomaly detector using GARCH (native ARMA(1,1)-GARCH(1,1))

Description

Fits a native ARMA(1,1)-GARCH(1,1) Gaussian maximum-likelihood model to capture conditional heteroskedasticity and flags observations with large standardized residuals as anomalies. Self-contained base-R implementation shared across the DAL stack.

Usage

hanr_garch()

Value

hanr_garch object.

References

  • Engle RF (1982). Autoregressive Conditional Heteroscedasticity with Estimates of the Variance of United Kingdom Inflation. Econometrica, 50(4):987-1007.

  • Bollerslev T (1986). Generalized Autoregressive Conditional Heteroskedasticity. Journal of Econometrics, 31(3):307-327.

Examples

library(daltoolbox)

# Load anomaly example data
data(examples_anomalies)

# Use a simple example
dataset <- examples_anomalies$simple
head(dataset)

# Configure GARCH anomaly detector
model <- hanr_garch()

# Fit the model
model <- fit(model, dataset$serie)

# Run detection
detection <- detect(model, dataset$serie)

# Show detected anomalies
print(detection[(detection$event),])


harbinger documentation built on Nov. 29, 2026, 9:06 a.m.