Implements cointegration tests with structural breaks designed for small sample sizes, following the methodology of Trinh (2022) < https://ideas.repec.org/p/ema/worpap/2022-01.html>. Supports models with no breaks, breaks in constant only, and breaks in both constant and slope. Provides endogenous break date detection using ADF or SSR minimization criteria, with the size-corrected 5% critical values of the response surfaces in Trinh (2022), for up to three regressors.
The cointsmall package implements cointegration tests with structural breaks designed specifically for small sample sizes. It follows the methodology of Trinh (2022), which provides small-sample adjusted critical values for testing the null hypothesis of no cointegration.
# Install from CRAN (when available)
install.packages("cointsmall")
# Or install the development version from GitHub
library(cointsmall)
# Generate cointegrated series
set.seed(42)
n <- 50
e <- cumsum(rnorm(n)) # Common stochastic trend
y <- 2 + 3 * e + rnorm(n, sd = 0.5)
x <- e + rnorm(n, sd = 0.3)
# Test with no structural break
result <- cointsmall(y, x, breaks = 0)
print(result)
# Generate series with structural break
y_break <- c(2 + 2 * e[1:25], 5 + 4 * e[26:50]) + rnorm(n, sd = 0.3)
# Test with one break (break in constant and slope)
result <- cointsmall(y_break, x, breaks = 1, model = "cs")
print(result)
summary(result)
# Test all model specifications
combined <- cointsmall_combined(y_break, x, breaks = 1)
print(combined)
# Get critical values for specific parameters
cv <- cointsmall_cv(T = 50, m = 1, breaks = 1, model = "cs")
print(cv)
| Model | Description | Cointegrating Regression |
|---|---|---|
| o | No break | y = α + β'x + ε |
| c | Break in constant | y = α₁ + α₂D + β'x + ε |
| cs | Break in constant and slope | y = α₁ + α₂D + β₁'x + β₂'(x·D) + ε |
Where D is a dummy variable equal to 1 after the break date.
Gregory, A. W., & Hansen, B. E. (1996). Residual-based tests for cointegration in models with regime shifts. Journal of Econometrics, 70(1), 99-126. doi:10.1016/0304-4076(69)41685-7
Hatemi-J, A. (2008). Tests for cointegration with two unknown regime shifts with an application to financial market integration. Empirical Economics, 35(3), 497-505. doi:10.1007/s00181-007-0175-9
Engle, R. F., & Granger, C. W. J. (1987). Co-integration and error correction: Representation, estimation, and testing. Econometrica, 55(2), 251-276. doi:10.2307/1913236
GPL (>= 3)