Learn R Programming

harbinger (version 1.2.767)

hcp_gft: Generalized Fluctuation Test (GFT)

Description

Structural change detection using generalized fluctuation tests via strucchange::breakpoints() doi:10.18637/jss.v007.i02.

Usage

hcp_gft()

Arguments

Value

hcp_gft object

References

  • Zeileis A, Leisch F, Kleiber C, Hornik K (2002). strucchange: An R package for testing for structural change in linear regression models. Journal of Statistical Software, 7(2). doi:10.18637/jss.v007.i02

  • Zeileis A, Kleiber C, Krämer W, Hornik K (2003). Testing and dating of structural changes in practice. Computational Statistics & Data Analysis, 44(1):109–123.

Examples

Run this code
library(daltoolbox)

# Load change-point example data
data(examples_changepoints)

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

# Configure the GFT detector
model <- hcp_gft()

# Fit the detector (no-op for GFT)
model <- fit(model, dataset$serie)

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

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

Run the code above in your browser using DataLab