tests/testthat/test-crps_gamma.R

context("CRPS for gamma distribution")

test_that("computed values are correct", {
  const <- 0.399009355
  expect_equal(crps_gamma(.2, 1.1), const)
  expect_equal(crps_gamma(.2 * .9, 1.1, scale = .9), const * .9)
})

Try the scoringRules package in your browser

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

scoringRules documentation built on May 31, 2023, 6:06 p.m.