tests/testthat/test-crps_llapl.R

context("CRPS for log-Laplace distribution")

FF <- function(x) {
  0.5 + 0.5 * sign(log(x) - .1) * pexp(abs(log(x) - .1) / .9)
}

test_that("computed values are correct", {
  const <- 1.16202051
  expect_equal(crps_llapl(3, .1, .9), 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.