R/max_r.R

Defines functions max_r

Documented in max_r

max_r <- function(p1,p2){
  x <- max(p1,p2)
  y <- min(p1,p2)
  mr <- sqrt(y*(1-x)/(x*(1-y)))
  out <- ifelse(mr > 1, 1, mr)
  out
}

Try the streamDAG package in your browser

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

streamDAG documentation built on Oct. 7, 2023, 1:08 a.m.