| Title: | Fourier CUSUM Cointegration Test |
|---|---|
| Description: | Implements the Fourier cumulative sum (CUSUM) cointegration test for detecting cointegration relationships in time series data with structural breaks. The test uses Fourier approximations to capture smooth structural changes and CUSUM statistics to test for cointegration stability. Based on methodology described in Zaghdoudi (2025) <doi:10.46557/001c.144076>. The corrected Akaike Information Criterion (AICc) is used for optimal frequency selection. |
| Authors: | Taha Zaghdoudi [aut, cre] |
| Maintainer: | Taha Zaghdoudi <[email protected]> |
| License: | GPL-3 |
| Version: | 1.0.0 |
| Built: | 2026-05-12 07:32:30 UTC |
| Source: | https://github.com/zedtaha/fcusum |
Implements the Fourier CUSUM test for cointegration with structural breaks. The test uses Fourier approximations to model smooth structural changes and applies CUSUM statistics to test for cointegration stability.
fcum(y, x, kstar = 3)fcum(y, x, kstar = 3)
y |
Numeric vector or matrix. Dependent variable time series. |
x |
Numeric vector or matrix. Independent variable(s) time series. Must have the same number of observations as y. |
kstar |
Positive numeric value. Maximum frequency parameter for Fourier approximation. Determines the flexibility of structural break modeling. Default is 3. |
The null hypothesis is that there exists a cointegrating relationship with stable parameters. The alternative hypothesis is that the cointegrating relationship is unstable or does not exist.
The test searches over a grid of frequencies from 0.1 to kstar and
selects the optimal frequency using the corrected Akaike Information
Criterion (AICc). The CUSUM statistic is then computed from the residuals
of the best model.
Critical values are based on simulation studies and depend on:
The number of regressors (p)
The frequency parameter (k)
An object of class fcum containing:
The CUSUM test statistic
Critical values at 1%, 5%, and 10% significance levels
Number of regressors used for critical value lookup
Frequency parameter used for critical value lookup
Maximum frequency parameter (user input)
Optimal frequency selected by AICc criterion
Test decision (reject or fail to reject null hypothesis)
Significance level indicator (*, **, ***)
The best fitting lm model object
The matched function call
Zaghdoudi, T. (2025). Fourier CUSUM Cointegration Test Methodology.
# Generate sample data set.seed(123) n <- 100 x <- cumsum(rnorm(n)) y <- 2 + 1.5 * x + rnorm(n) # Run the test result <- fcum(y, x, kstar = 3) print(result) summary(result)# Generate sample data set.seed(123) n <- 100 x <- cumsum(rnorm(n)) y <- 2 + 1.5 * x + rnorm(n) # Run the test result <- fcum(y, x, kstar = 3) print(result) summary(result)
Print Method for fcum Objects
## S3 method for class 'fcum' print(x, ...)## S3 method for class 'fcum' print(x, ...)
x |
An object of class |
... |
Additional arguments (not used) |
Invisibly returns the input object
Summary Method for fcum Objects
## S3 method for class 'fcum' summary(object, ...)## S3 method for class 'fcum' summary(object, ...)
object |
An object of class |
... |
Additional arguments (not used) |
Invisibly returns the input object