tests/testthat/test-accuracy.R

test_that("Accuracy generic function works", {
  inputSeries <- ts(rnorm(9), f = 4)
  hm <- hybridModel(inputSeries)
  expect_error(accuracy(hm), NA)
  expect_error(accuracy(hm$ets), NA)
  expect_error(accuracy(hm$auto.arima), NA)
  expect_error(accuracy(hm$nnetar), NA)
  expect_error(accuracy(hm$stlm), NA)
  expect_error(accuracy(hm$tbats), NA)
  expect_error(accuracy(hm$thetam), NA)
})

Try the forecastHybrid package in your browser

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

forecastHybrid documentation built on Aug. 8, 2025, 6:43 p.m.