tests/testthat/test_corr.R

library(BSS)

test_that("power correlation is one at zero lag", {

  expect_equal(powerKernelCorrelation(-0.1, -1, 0), 1)

})

test_that("gamma correlation is one at zero lag", {

  expect_equal(gammaKernelCorrelation(-0.1, 1, 0), 1)

})

Try the BSS package in your browser

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

BSS documentation built on July 2, 2020, 1:31 a.m.