tests/testthat/test-autoar.R

library(bsts)
library(testthat)

test_that("AutoAr does not crash on minimal data.", {
  y <- rnorm(4)
  ss <- AddAutoAr(list(), y=y, lags = 4)

  for (i in 1:20) {
    model <- bsts(y, ss, niter = 100, ping = -1)
  }
  expect_true(inherits(model, "bsts"))
})

Try the bsts package in your browser

Any scripts or data that you put into this service are public.

bsts documentation built on Nov. 10, 2022, 5:53 p.m.