tests/testthat/test_evpi.R

test_that("EVPI",{
  expect_equal(evpi(chemo_nb), 368.6051, tolerance=0.1)
  expect_equal(evpi(chemo_cea)$evpi, 
               c(8.76486716445652, 368.605096225918, 206.468704777362, 150.472904023947, 
                   126.983450042782), tolerance=0.01)
})

Try the voi package in your browser

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

voi documentation built on Sept. 17, 2024, 1:07 a.m.