tests/testthat/test-crps_2pexp.R

context("CRPS for two-piece-exponential distribution")

test_that("computed values are correct", {
  const <- 2.72138251
  expect_equal(crps_2pexp(-3, .7, 1.1), const)
  
  const <- 2.00181206
  expect_equal(crps_2pexp(3, .7, 1.1), 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.