Skip to contents

Function takes a vector of probability estimates and a time frame, e.g. probability of death within 10 years, and converts the probability into an exponential distribution lambda parameter. The lambda parameter is the rate parameter, e.g. f(x) = lambda * exp(-lambda * x)

Usage

prob_to_exp_lambda(p, time = 1)

Arguments

p

numeric vector of probability estimates

time

a single numeric time that is the time frame for the probability in p=

Value

numeric lambda greater than zero

Examples

prob_to_exp_lambda(0.5)
#> [1] 0.6931472