tests/testthat/test-spectral_density.R

test_that("spectral.density works", {
  # Spectral Density AR(1)
  f <- spectral.density(ar = 0.5, lambda = malleco)
  expect_equal(round(f[1:3], 4), c(0.1554, 0.2130, 0.1843))
})

Try the LSTS package in your browser

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

LSTS documentation built on July 29, 2021, 5:07 p.m.