Description Usage Arguments Value Examples
Converts a vector of rates to a vector of probabilities.
1 | RateToProb(r, t = 1)
|
r |
A vector of rates. |
t |
The time frame of the desired probability in the units of the input rate. |
A vector of probabilities in the unit of time t. If any rates are less than 0, the function returns NULL.
1 2 3 | # If event rate over over 2 years is 50%
RateToProb(0.5, 1/2) # returns an annual probability of 0.22
RateToProb(0.5, 1/24) # returns a monthly probability of 0.02
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.