tests/testthat/test-overlap.R

test_that("overlap", {
  set.seed(333)
  x <- distribution_normal(1000, 2, 0.5)
  y <- distribution_normal(1000, 0, 1)

  expect_equal(as.numeric(overlap(x, y)), 0.185, tolerance = 0.01)
})

Try the bayestestR package in your browser

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

bayestestR documentation built on April 7, 2023, 5:09 p.m.