exponential object.R/exponential.R
inv_cdf.exponential.RdMethod to obtain the inverse cdf of an exponential object.
# S3 method for class 'exponential'
inv_cdf(x, ...)A function that computes the inverse cdf of the exponential
distribution. Accepts as input a vector p probabilities
to compute the inverse cdf, a rate value denoting the
failure rate of the exponential distribution, and a logical
log.p indicating whether input p denotes probability
or log-probability. By default, rate is the failure rate
of object x.
x <- exponential(rate = 1)
q <- inv_cdf(x)
q(0.5)
#> [1] 0.6931472
q(0.95)
#> [1] 2.995732