R/com.log.difference.R

com.log.difference <- function (x, y)
{
  if (x == -Inf) {
    return(NaN)
  }
  else if (y == -Inf) {
    return(x)
  }
  else if (x > y) {
    return(x + log(1 - exp(y - x)))
  }
  else {
    return(NaN)
  }
}

Try the miRecSurv package in your browser

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

miRecSurv documentation built on Aug. 17, 2021, 5:06 p.m.