tests/testthat/test-crps_beta.R

context("CRPS for beta distribution")

test_that("computed values are correct", {
  const <- 0.0850102437
  expect_equal(crps_beta(.3, .7, 1.1), const)
  
  const <- 0.883206751
  expect_equal(crps_beta(-3, .7, 1.1, -5, 4), const)
})

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.