Skip to content
/ mbreaks Public

This package implements the efficient dynamic programming approach to conduct estimation and testing for linear models in presence of structural breaks as described in Bai & Perron (1998) and Perron, Yamamoto, & Zhou (2020).

Notifications You must be signed in to change notification settings

roga11/mbreaks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mbreaks

CRANDownloads Downloads

Installation

install.packages("mbreaks")

Load Package

Once package has been installed it can be loaded.

library(mbreaks)

Examples

US real interest rate data available in 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)

US inflation data available in mbreaks

References

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

About

This package implements the efficient dynamic programming approach to conduct estimation and testing for linear models in presence of structural breaks as described in Bai & Perron (1998) and Perron, Yamamoto, & Zhou (2020).

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published