texp: Truncated exponential distribution functions

Description Usage Arguments Value Examples

Description

pdf, cdf, inverse cdf, and random deviates of the truncated Exponential distribution.

Usage

1
2
3
4
5
6
7
rtexp(n, rate, a = 0, b = Inf)

dtexp(x, rate, a = 0, b = Inf)

ptexp(q, rate, a = 0, b = Inf)

qtexp(p, rate, a = 0, b = Inf)

Arguments

n

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

rate

vector of rate parameters.

a

vector of lower truncation limits

b

vector of upper truncation limits

x, q

vector of quantiles.

p

vector of probabilities.

Value

dtexp gives the density, ptexp gives the distribution function, qtexp gives the quantile function, and rtexp generates random deviates.

Examples

1
2
3
4
rtexp(5, 1, a=0.5, b=3.0)
dtexp(seq(0, 4, by=0.5), 1, a=0.5, b=3.0)
ptexp(seq(0, 4, by=0.5), 1, a=0.5, b=3.0)
qtexp(seq(0, 1, by=0.1), 1, a=0.5, b=3.0)

bertcarnell/truncateddist documentation built on May 11, 2021, 11:07 a.m.