#comparing times w/o parallelization
z<-tseg(1000, "BJARMA11")
#comparing times using parallel and not using
startTime <- proc.time()[3]
bestModels(z)
proc.time()[3]-startTime #about 132 sec
startTime <- proc.time()[3]
bestModels(z, use_parallel=FALSE)
proc.time()[3]-startTime #about 167 sec
#Remark: The correct model is ARIMA(1,0,1) but BIC tends to overfit. Usually
#the ARIMA(1,0,1) is in the top 5 and it is usually the most parsimonious
#model in this group. If we use a stronger penalty such as BICq, q=1/4,
#the ARIMA(1,0,1) would be selected as the top model more often.Run the code above in your browser using DataLab