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