install.packages("bsts") library(bsts) data(AirPassengers) y = log(AirPassengers) ss = AddLocalLinearTrend(list(), y) ss = AddSeasonal(ss, y, nseasons = 12) model = bsts(y, state.specification = ss, niter = 10000) # May 7th 2016 - 21 seconds # Iteration 0 Sat May 7 14:45:34 2016 # Iteration 1000 Sat May 7 14:45:36 2016 # Iteration 8000 Sat May 7 14:45:52 2016 # Iteration 9000 Sat May 7 14:45:55 2016 # April 18th 2026 - 10 seconds # Iteration 0 Sat Apr 18 11:18:19 2026 # Iteration 1000 Sat Apr 18 11:18:20 2026 # Iteration 8000 Sat Apr 18 11:18:27 2026 # Iteration 9000 Sat Apr 18 11:18:29 2026 # Conclusion: 10 years later, twice as fast