MyNixOS website logo
Description

Cointegration Tests with Structural Breaks in Small Samples.

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 small-sample adjusted critical values via response surface methodology.

cointsmall

R-CMD-check CRAN status

Overview

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.

Installation

# Install from CRAN (when available)
install.packages("cointsmall")

# Or install the development version from GitHub

Features

  • Small sample focused: Critical values adjusted for small samples using response surface methodology
  • Structural breaks: Test for cointegration allowing for 0, 1, or 2 structural breaks
  • Multiple model specifications:
    • Model "o": No structural break
    • Model "c": Break in constant (level shift)
    • Model "cs": Break in constant and slope (regime change)
  • Endogenous break detection: Break dates determined by minimizing ADF statistic or SSR
  • Combined testing: Evaluate all models simultaneously with automatic model selection

Usage

Basic Cointegration Test

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)

Testing with Structural Breaks

# 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)

Combined Testing Procedure

# Test all model specifications
combined <- cointsmall_combined(y_break, x, breaks = 1)
print(combined)

Critical Values

# Get critical values for specific parameters
cv <- cointsmall_cv(T = 50, m = 1, breaks = 1, model = "cs")
print(cv)

Models

ModelDescriptionCointegrating Regression
oNo breaky = α + β'x + ε
cBreak in constanty = α₁ + α₂D + β'x + ε
csBreak in constant and slopey = α₁ + α₂D + β₁'x + β₂'(x·D) + ε

Where D is a dummy variable equal to 1 after the break date.

References

  • 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

Author

License

GPL (>= 3)

Metadata

Version

1.0.2

License

Unknown

Platforms (80)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    uefi
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-uefi
  • aarch64-windows
  • aarch64_be-none
  • arc-linux
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-linux
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • sh4-linux
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-uefi
  • x86_64-windows