The FCUSUM package implements the Fourier CUSUM cointegration test for
detecting cointegration relationships in time series data with structural
breaks. The test combines:
# Install from GitHub (replace with actual repo)
# # devtools::install_github("zedtaha/FCUSUM")
install.packages("FCUSUM", repos = c('https://zedtaha.r-universe.dev', 'https://cloud.r-project.org'))
# Or install from source
# install.packages("FCUSUM_1.0.0.tar.gz", repos = NULL, type = "source")
library(FCUSUM)
# Generate sample data
set.seed(123)
n <- 100
x <- cumsum(rnorm(n))
y <- 2 + 1.5 * x + rnorm(n)
# Run the Fourier CUSUM test
result <- fcum(y, x, kstar = 3)
# View results
print(result)
summary(result)
Zaghdoudi, T. (2025). Testing the Long-Run Relationship Between Oil Price and Inflation in Tunisia: A Fourier CUSUM Cointegration Test. Energy RESEARCH LETTERS, 6(Early View).
GPL-3