R/ratetoalpha.R

Defines functions ratetoalpha

ratetoalpha <- function(rate) {
    stopifnot(is.numeric(rate), all(is.finite(rate)))

    vapply(X   = seq_along(rate),
           FUN = function(i) {
               prod(rate[-i] / (rate[-i] - rate[i]))
           },
           FUN.VALUE = numeric(1L))
}

Try the sdprisk package in your browser

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

sdprisk documentation built on May 1, 2019, 7:50 p.m.