makicoint implements the Maki (2012) residual-based test
for cointegration allowing for an unknown number of structural
breaks. It extends the Gregory-Hansen (one break) and Hatemi-J
(two breaks) tests to any feasible number of breaks, and is useful when
the long-run relationship between non-stationary series may shift more
than twice or is subject to regime changes.
0), level shift with trend (1), regime shift
(2), and regime shift with trend (3).engine = "paper" uses the Maki (2012, Steps 2 and 4) break
rule.simcv.ggplot2): the series
with its break-adjusted long-run fit, and the cointegrating
residual.tsig (default), fixed,
zero, aic, bic.install.packages("makicoint") # CRAN
# devtools::install_github("merwanroudane/makicoint") # developmentlibrary(makicoint)
set.seed(123)
n <- 100
x <- cumsum(rnorm(n))
y <- 0.5 * x + cumsum(rnorm(n))
y[51:100] <- y[51:100] + 2 # a level break at observation 50
res <- coint_maki(cbind(y, x), m = 1, model = 0)
res
plot(res) # requires ggplot2Two breaks, regime-shift model, and the paper engine:
coint_maki(cbind(y, x), m = 2, model = 2)
coint_maki(cbind(y, x), m = 2, model = 2, engine = "paper")Beyond five breaks, with simulated critical values (heavy):
coint_maki(cbind(y, x), m = 7, simcv = 2000, simt = 500)coint_maki() — the test.cv_coint_maki(k, m, model) — Maki (2012) Table 1
critical values.print() / plot() methods for the
result.Maki, D. (2012). Tests for cointegration allowing for an unknown number of breaks. Economic Modelling, 29, 2011-2015. doi:10.1016/j.econmod.2012.04.022
Dr Merwan Roudane — Independent Researcher — merwanroudane920@gmail.com — github.com/merwanroudane
GPL-3