| Type: | Package |
| Title: | Comprehensive Cointegration Tests with Fourier and Panel Methods |
| Version: | 1.0.0 |
| Description: | A unified toolkit for cointegration testing including Fourier-based cointegration tests (FADL, FEG, FEG2, Tsong) that accommodate smooth structural breaks via flexible Fourier terms, and panel CADF cointegration tests with structural breaks using the Common Correlated Effects (CCE) estimator following Banerjee, Arcabic and Lee (2017) <doi:10.1016/j.econmod.2017.03.004>, Tsong, Lee, Tsai and Hu (2016) <doi:10.1007/s00181-015-1028-6>, and Banerjee and Carrion-i-Silvestre (2025) <doi:10.1080/07350015.2024.2327844>. |
| License: | GPL-3 |
| Encoding: | UTF-8 |
| RoxygenNote: | 7.3.2 |
| Depends: | R (≥ 3.5.0) |
| Imports: | stats |
| Suggests: | testthat (≥ 3.0.0) |
| Config/testthat/edition: | 3 |
| NeedsCompilation: | no |
| Packaged: | 2026-03-24 11:13:25 UTC; acad_ |
| Author: | Muhammad Abdullah Alkhalaf
|
| Maintainer: | Muhammad Abdullah Alkhalaf <muhammedalkhalaf@gmail.com> |
| Repository: | CRAN |
| Date/Publication: | 2026-03-27 11:10:08 UTC |
Fourier Cointegration Tests for Time Series
Description
Implements four Fourier-based cointegration tests that accommodate smooth structural breaks via flexible Fourier terms: FADL, FEG, FEG2, and Tsong.
Usage
fcoint(y, x, test = c("fadl", "feg", "feg2", "tsong", "all"),
model = c("constant", "trend"), max_freq = 5L, max_lag = 0L,
criterion = c("aic", "bic"), dols_lags = 0L)
Arguments
y |
Numeric vector. Dependent (left-hand side) time-series variable. |
x |
Numeric matrix or vector. Independent (right-hand side) variables. |
test |
Character. Which test to run: |
model |
Character. Deterministic component: |
max_freq |
Integer. Maximum Fourier frequency to search over (1–5).
Default is |
max_lag |
Integer. Maximum lag order. |
criterion |
Character. Information criterion for lag selection:
|
dols_lags |
Integer. Leads and lags for the DOLS estimator used in
the Tsong test. Default is |
Details
The Fourier approach allows for smooth, nonlinear breaks in the deterministic components by augmenting standard cointegration regressions with one or more pairs of sine and cosine terms.
FADL (Banerjee, Arcabic & Lee, 2017):
An ADL-type residual-based test. The optimal Fourier frequency k^*
and lag order are chosen jointly by minimising the selected information
criterion over a grid.
FEG and FEG2 (Banerjee & Lee):
Engle-Granger style residual-based tests augmented with Fourier terms.
FEG2 includes an additional R^2 correction.
Tsong et al. (2016):
A DOLS-based cointegration test with Fourier terms. Reports both a
CI statistic and an F-statistic for joint significance of Fourier
terms.
Value
A list of class "fcoint" containing:
- test
Character. Name(s) of the test(s) performed.
- results
Named list of individual test results.
- model
Character. Deterministic component used.
- criterion
Character. Information criterion used.
- nobs
Integer. Effective number of observations.
References
Banerjee, P., Arcabic, V., & Lee, H. (2017). Fourier ADL cointegration test to approximate smooth breaks with new evidence from crude oil market. Economic Modelling, 67, 114–124. doi:10.1016/j.econmod.2017.03.004
Tsong, C.-C., Lee, C.-F., Tsai, L.-J., & Hu, T.-C. (2016). The Fourier approximation and testing for the null of cointegration. Empirical Economics, 51(3), 1085–1113. doi:10.1007/s00181-015-1028-6
Examples
set.seed(42)
n <- 80
x <- cumsum(rnorm(n))
y <- 0.5 * x + rnorm(n, sd = 0.3)
res <- fcoint(y, x, test = "fadl", max_freq = 3)
print(res)
Print Method for fcoint Objects
Description
Prints a formatted summary of Fourier cointegration test results.
Usage
## S3 method for class 'fcoint'
print(x, ...)
Arguments
x |
An object of class |
... |
Further arguments passed to or from other methods (unused). |
Value
Invisibly returns x.
Examples
set.seed(1)
n <- 60
x <- cumsum(rnorm(n))
y <- 0.5 * x + rnorm(n)
res <- fcoint(y, x, test = "fadl", max_freq = 2)
print(res)
Print Method for xtcadfcoint Objects
Description
Prints a formatted summary of an "xtcadfcoint" result.
Usage
## S3 method for class 'xtcadfcoint'
print(x, ...)
Arguments
x |
An object of class |
... |
Additional arguments (ignored). |
Value
Invisibly returns x.
Summary Method for xtcadfcoint Objects
Description
Prints a summary of an "xtcadfcoint" result.
Usage
## S3 method for class 'xtcadfcoint'
summary(object, ...)
Arguments
object |
An object of class |
... |
Additional arguments (ignored). |
Value
Invisibly returns object.
Panel CADF Cointegration Test with Structural Breaks
Description
Tests the null hypothesis of no cointegration in panel data using the cross-sectionally augmented Dickey-Fuller (CADF) approach of Banerjee and Carrion-i-Silvestre (2025). Accounts for cross-sectional dependence via the Common Correlated Effects (CCE) estimator and allows for structural breaks.
Usage
xtcadfcoint(formula, data, index, model = 1, breaks = 0,
trimming = 0.15, maxlags = 4, lagselect = "bic",
nfactors = 1, brk_slope = FALSE, brk_loadings = FALSE,
cce = TRUE, simulate = 0, level = 95)
Arguments
formula |
A formula of the form |
data |
A data frame in long format. |
index |
Character vector of length 2: |
model |
Integer (0-5) specifying the deterministic component. |
breaks |
Integer (0, 1, or 2). Number of structural breaks. |
trimming |
Numeric. Trimming fraction for break date search. Default 0.15. |
maxlags |
Maximum lag order for ADF augmentation. Default 4. |
lagselect |
Lag selection: |
nfactors |
Integer. Number of common factors for CCE. Default 1. |
brk_slope |
Logical. Allow breaks in cointegrating vector slopes. |
brk_loadings |
Logical. Allow breaks in factor loadings. |
cce |
Logical. Apply CCE augmentation. Default |
simulate |
Integer. Bootstrap replications for critical values (0 = skip). |
level |
Confidence level in percent. Default 95. |
Value
An object of class "xtcadfcoint" containing panel CIPS statistics,
individual CADF statistics, estimated break dates, and coefficient estimates.
References
Banerjee, A. and Carrion-i-Silvestre, J.L. (2024). Panel Data Cointegration Testing with Structural Instabilities. Journal of Business & Economic Statistics, 43, 122–133. doi:10.1080/07350015.2024.2327844
Examples
set.seed(42)
n <- 5; tt <- 30
uid <- rep(1:n, each = tt)
tval <- rep(1:tt, times = n)
x_it <- cumsum(rnorm(n * tt))
y <- x_it + rnorm(n * tt, sd = 0.5)
dat <- data.frame(id = uid, time = tval, y = y, x = x_it)
res <- xtcadfcoint(y ~ x, data = dat, index = c("id", "time"), model = 1)
print(res)