install.packages("mbreaks")
Once package has been installed it can be loaded.
library(mbreaks)
y <- mbreaks::rint
z <- matrix(1,nrow(y),1)
x <- matrix(0,0,0)
m <- 1
n <- 1
M <- 3
N <-3
trm <- 0.10
st <- proc.time()
mbreaks::pslr0(y, m, trm, z)
mbreaks::pslr1(y, n, trm, z)
mbreaks::pslr2(y, m, n, trm, z)
mbreaks::pslr3(y, m, n, trm, z)
mbreaks::pslr4(y, m, n, trm, z)
mbreaks::pslr00(y, M, trm, z)
mbreaks::pslr5(y, N, trm, z)
mbreaks::pslr6(y, m, N, trm, z)
mbreaks::pslr7(y, M, n, trm, z)
mbreaks::pslr8(y, M, N, trm, z)
mbreaks::pslr9(y, m, n, trm, z)
mbreaks::pslr10(y, m, n, trm, z)
end <- proc.time() - st
print(end)
st <- proc.time()
mdl_withMbreak <- estimdl(y, m=M, n=0, z, x)
end1 <- proc.time() - st
print(end1)
st <- proc.time()
mdl_withNbreak <- estimdl(y, m=0, n=N, z, x)
end2 <- proc.time() - st
print(end2)
st <- proc.time()
mdl_withMNbreak <- estimdl(y, m=M, n=N, z, x)
end3 <- proc.time() - st
print(end3)
Bai, Jushan & Pierre Perron (1998), Estimating and Testing Linear Models with Multiple Structural Changes, Econometrica, vol 66, 47-78. https://doi.org/10.2307/2998540
Bai, J. and Perron, P. (2003), Computation and analysis of multiple structural change models, Journal of Applied Econometrics, 18: 1-22. https://doi.org/10.1002/jae.659
Bai, J. and Perron, P. (2003), Critical values for multiple structural change tests, The Econometrics Journal, 6: 72-78. https://doi.org/10.1111/1368-423X.00102
Perron, Pierre, Yohei Yamamoto, and Jing Zhou (2020), Testing Jointly for Structural Changes in the Error Variance and Coefficients of a Linear Regression Model, Quantitative Economics, vol 11, 1019-1057. https://doi.org/10.3982/QE1332