R/concentration-function.R

Defines functions concentration

Documented in concentration

concentration <- function(hommel, alpha = 0.05, what = c("p", "z", "u")) {
  
  m <- length(hommel@p)
  
  h <- findHalpha(hommel@jumpalpha, alpha, m)
  simesfactor <- hommel@simesfactor[h+1]

  sortedp <- hommel@p[hommel@sorter]
  
  z <- findConcentration(sortedp, simesfactor, h, alpha, m)
  
  what = match.arg(what)
  
  if (what == "z") return(z)
  if (what == "p") return(sortedp[z])
  if (what == "u") return(z - m + h + 1)

}
  

Try the hommel package in your browser

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

hommel documentation built on April 4, 2025, 3:27 a.m.