| Type: | Package |
| Title: | Fourier CUSUM Cointegration Test |
| Version: | 1.0.0 |
| 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. |
| License: | GPL-3 |
| Encoding: | UTF-8 |
| Depends: | R (≥ 3.5.0) |
| Imports: | stats |
| RoxygenNote: | 7.3.1 |
| NeedsCompilation: | no |
| Packaged: | 2025-11-09 16:11:47 UTC; admin |
| Author: | Taha Zaghdoudi [aut, cre] |
| Maintainer: | Taha Zaghdoudi <zedtaha@gmail.com> |
| Repository: | CRAN |
| Date/Publication: | 2025-11-12 21:10:11 UTC |
Fourier CUSUM Cointegration Test
Description
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.
Usage
fcum(y, x, kstar = 3)
Arguments
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. |
Details
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)
Value
An object of class fcum containing:
- statistic
The CUSUM test statistic
- critical_values
Critical values at 1%, 5%, and 10% significance levels
- p
Number of regressors used for critical value lookup
- k
Frequency parameter used for critical value lookup
- kstar
Maximum frequency parameter (user input)
- best_frequency
Optimal frequency selected by AICc criterion
- decision
Test decision (reject or fail to reject null hypothesis)
- significance
Significance level indicator (*, **, ***)
- best_model
The best fitting lm model object
- call
The matched function call
References
Zaghdoudi, T. (2025). Fourier CUSUM Cointegration Test Methodology.
Examples
# 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
Description
Print Method for fcum Objects
Usage
## S3 method for class 'fcum'
print(x, ...)
Arguments
x |
An object of class |
... |
Additional arguments (not used) |
Value
Invisibly returns the input object
Summary Method for fcum Objects
Description
Summary Method for fcum Objects
Usage
## S3 method for class 'fcum'
summary(object, ...)
Arguments
object |
An object of class |
... |
Additional arguments (not used) |
Value
Invisibly returns the input object