R/zget.cp.R

Defines functions zget.cp

zget.cp <- function(n.cp, se, sp, type2){
  cp <- 0
  SpH <- 0
  while (SpH < 1 - type2) {
    cp <- cp + 1
    # Probability of observed result from disease-free population:
    SpH <- zsph.binom(n.cp, cp, sp)
  }
  return (list("cp" = cp, "SpH" = SpH))
}

Try the epiR package in your browser

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

epiR documentation built on Nov. 20, 2023, 9:06 a.m.