R/com.compute.log.z.R

com.compute.log.z <- function (lambda, nu, log.error = 0.001)
{
  if (lambda < 0 || nu < 0)
    stop("Invalid arguments, only defined for lambda >= 0, nu >= 0")
  z = -Inf
  z.last = 0
  j = 0
  while (abs(z - z.last) > log.error) {
    z.last = z
    z = com.log.sum(z, j * log(lambda) - nu * com.log.factorial(j))
    j = j + 1
  }
  return(z)
}

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.