R/ciLevel.R

Defines functions ciLevel

ciLevel <-
function(x, n, p){
  if (x == 0){
    level <- c(0, p)
  } else if (x == n){
    level <- c(1 - p, 1)
  } else {
    level <- c((1 - p) / 2, 1 - (1 - p) / 2)
  }
  return(c(level, (1 - p) / 2))
}

Try the prevalence package in your browser

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

prevalence documentation built on June 4, 2022, 1:05 a.m.