Method to obtain the cdf of an exponential object.

# S3 method for class 'exponential'
surv(x, ...)

Arguments

x

The object to obtain the pdf of

...

Additional arguments (not used)

Value

A function that computes the cdf of the exponential. Accepts as input a vector t at which to compute the cdf, an input rate denoting the failure rate of the exponential distribution, and a logical log indicating whether to compute the log of the cdf. By default, rate is the failure rate of object x.

Examples

x <- exponential(rate = 1)
S <- surv(x)
S(1)
#> [1] 0.3678794
S(2)
#> [1] 0.1353353