Learn R Programming

makicoint (version 1.0.0)

coint_maki: Maki Cointegration Test with Structural Breaks

Description

Performs the Maki (2012) cointegration test that allows for an unknown number of structural breaks. The test detects cointegration relationships in the presence of up to five structural breaks.

Usage

coint_maki(y, m = 1, model = 0, trimm = 0.15, lagoption = 1)

Value

A list with class "maki_test" containing:

statistic

The test statistic (minimum tau)

breakpoints

Vector of detected break point locations

critical_values

Critical values at 1%, 5%, and 10% levels

reject_1

Logical; reject null at 1% level?

reject_5

Logical; reject null at 5% level?

reject_10

Logical; reject null at 10% level?

conclusion

Text conclusion of the test

m

Number of breaks tested

model

Model specification used

n

Sample size

Arguments

y

Matrix or data frame with dependent variable in first column and independent variable(s) in remaining columns.

m

Maximum number of breaks to test (0-3). Values 4-5 require extended implementation.

model

Model specification (0-3):

  • 0: Level shift

  • 1: Level shift with trend

  • 2: Regime shift (changes in intercept and slope)

  • 3: Trend and regime shift

trimm

Trimming parameter (default 0.15). Determines the minimum distance between breaks as a fraction of sample size.

lagoption

Lag selection (0=no lags, 1=optimal lags using t-sig criterion).

References

Maki, D. (2012). Tests for cointegration allowing for an unknown number of breaks. Economic Modelling, 29(5), 2011-2015.

Examples

Run this code
# Generate cointegrated series with one break
set.seed(123)
n <- 100
e1 <- rnorm(n)
e2 <- rnorm(n)
x <- cumsum(e1)
y <- 0.5 * x + cumsum(e2)
y[51:100] <- y[51:100] + 2  # Add structural break

# Run Maki test
data <- cbind(y, x)
result <- coint_maki(data, m=1, model=0)
print(result)

Run the code above in your browser using DataLab