File: zget.cp.R

package info (click to toggle)
r-cran-epir 2.0.80%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,332 kB
  • sloc: makefile: 5
file content (10 lines) | stat: -rw-r--r-- 265 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
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))
}