R/min_r.R

Defines functions min_r

Documented in min_r

min_r <- function(p1,p2){
  x <- max(p1,p2)
  y <- min(p1,p2)
  beta <- ifelse(x+y <= 1, 1/2, -1/2)
  mr <- -((x*y)/((1-x)*(1-y)))^beta
  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.