R/com.log.sum.R

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

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.