R/conf.edge.lower.R

Defines functions conf.edge.lower

Documented in conf.edge.lower

conf.edge.lower <- function(p) {
  
  p <- sort(p)
  fn <- c(0, cumsum(p <= p) / length(p) )
  dp <- diff( c(0, sort(p), 1) )
  scou <- function(tau)  sum( abs(fn - tau) * dp )
  tau <- optimise(scou, c(0, 1) )$minimum
  p[ which(p>tau)[1] ]
}

  
  

Try the MXM package in your browser

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

MXM documentation built on Aug. 25, 2022, 9:05 a.m.