tests/testthat/test-min_possible_prevalence.R

test_that("min_possible_prevalence Output", {
  res <- evaluate_promise(BayesianReasoning::min_possible_prevalence(Sensitivity = 99, min_PPV_desired = 99, FP_test = .1))
  expect_equal(
    res$messages,
    "To reach a PPV of 99% when using a test with 99% Sensitivity and 0.1% False Positive Rate, you need a prevalence of at least 1 out of 10\n"
  )
})

Try the BayesianReasoning package in your browser

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

BayesianReasoning documentation built on Nov. 14, 2023, 5:09 p.m.