if (FALSE) {
##-- simulation
x1 = sarima.sim(ar=c(1.69, -.81), n=500)
x2 = sarima.sim(ar=c(1.32, -.81), n=500)
x = c(x1, x2)
##-- look at the data
tsplot(x)
##-- run procedure
autoParm(x)
##-- output (yours will be slightly different -
##-- the nature of GA)
# returned breakpoints include the endpoints
# $breakpoints
# [1] 1 514 1000
#
# $number_of_segments
# [1] 2
#
# $segment_AR_orders
# [1] 2 2
}
Run the code above in your browser using DataLab