R/contourProb.R

Defines functions contourProb

Documented in contourProb

contourProb <- function(sample, theta0 = 0)
{
  sample <- sample[!is.na(sample)]
  plow <- sum(sample <= theta0) / length(sample)
  pupp <- sum(sample >= theta0) / length(sample)
  p <- 2 * min(c(plow, pupp))

  return(p)  
}    

Try the icensBKL package in your browser

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

icensBKL documentation built on Sept. 19, 2022, 5:06 p.m.