invexp: The Inverse Exponential Distribution

Description Usage Arguments Details See Also Examples

Description

Density, distribution function, quantile function and random generation for the inverse exponential distribution.

Usage

1
2
3
4
5
6
7
dinvexp(x, rate = 1, log = FALSE)

pinvexp(q, rate = 1, lower.tail = TRUE, log.p = FALSE)

qinvexp(p, rate = 1, lower.tail = TRUE, log.p = FALSE)

rinvexp(n, rate = 1)

Arguments

x, q

vector of quantiles.

rate

degrees of freedom (non-negative, but can be non-integer).

log, log.p

logical; if TRUE, probabilities p are given as log(p).

lower.tail

logical; if TRUE (default), probabilities are P[X <= x] otherwise, P[X > x].

p

vector of probabilities.

n

number of observations. If length(n) > 1, the length is taken to be the number required.

Details

The functions (d/p/q/r)invexp simply wrap those of the standard (d/p/q/r)exp R implementation, so look at, say, dexp for details.

See Also

dexp; these functions just wrap the (d/p/q/r)exp functions.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
s <- seq(0, 10, .01)
plot(s, dinvexp(s, 2), type = 'l')

f <- function(x) dinvexp(x, 2)
q <- 3
integrate(f, 0, q)
(p <- pinvexp(q, 2))
qinvexp(p, 2) # = q
mean(rinvexp(1e5, 2) <= q)

pinvgamma(q, 1, 2)

invgamma documentation built on May 2, 2019, 5:15 a.m.