if (FALSE) {
## ************************************************************
## WARNING: computationally intensive, increase B with caution
## ************************************************************
# modify nwork to match the number of available cores
set.seed(13)
x <- arima.sim(n=120, model = list(ar=0.8));
result <- Srho.test.AR.p(x, lag.max = 5, B = 100, bw='reference', method='integral', nwork=2)
## ** Compare timings **
system.time(Srho.test.AR.p(x, lag.max = 5, B = 100, bw='reference', method='integral', nwork=4))
system.time(Srho.test.AR(x, lag.max = 5, B = 100, bw='reference', method='integral'))
}Run the code above in your browser using DataLab