Reputation: 326
Results from the R strucchange package do not match the results from SAS proc autoreg when I estimate structural breaks using the Bai and Perron (1998, 2003) minimum BIC. The number of breaks found is not the same at all. My data has about 20,000 observations so it is hard for me to re-create the problem on here. But can anyone please explain why there is a difference in the number of breaks found? Below is an example of the R and SAS code I use to estimate the breaks.
The R code is:
library(lmtest)
library(sandwich)
library(strucchange)
data.bp <- breakpoints(formula, data)
coeftest(data.bp)
coeftest(data.bp, vcov = NeweyWest)
The SAS code is:
proc autoreg data=data;
model formula / BP=(EPS=0.15, PRINTEST=BIC);
Upvotes: 4
Views: 786
Reputation: 1509
I hate to say it but you may have to come up with a simpler example for us to help you debug it. Maybe the strucchange package is wrong, or maybe it is using different assumptions. I pulled in the source package from here: https://cran.r-project.org/web/packages/strucchange/index.html and the source is just over 6,500 lines with a least a third of that being test values. If you come up with a simple example you can share we can look into it further. https://stackoverflow.com/help/mcve You also might want to look at the source because, as I said, there are test values built into the package that might give you insight into what is being done differently--or wrong, for your needs.
Upvotes: 3