erlang: Erlang Distribution

Description Usage Arguments Details Value Note Examples

Description

Erlang distribution with shape parameter n and rate parameter beta.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
dErlang(x, shape, rate = 1/scale, scale = 1/rate)

pErlang(q, shape, rate = 1/scale, scale = 1/rate, lower.tail = TRUE)

expValErlang(shape, rate = 1/scale, scale = 1/rate)

varErlang(shape, rate = 1/scale, scale = 1/rate)

kthMomentErlang(k, shape, rate = 1/scale, scale = 1/rate)

expValLimErlang(d, shape, rate = 1/scale, scale = 1/rate)

expValTruncErlang(d, shape, rate = 1/scale, scale = 1/rate, less.than.d = TRUE)

stopLossErlang(d, shape, rate = 1/scale, scale = 1/rate)

meanExcessErlang(d, shape, rate = 1/scale, scale = 1/rate)

VatRErlang(kap, shape, rate = 1/scale, scale = 1/rate)

TVatRErlang(kap, shape, rate = 1/scale, scale = 1/rate)

mgfErlang(t, shape, rate = 1/scale, scale = 1/rate)

Arguments

x

vector of quantiles.

shape

shape parameter n, must be a positive integer.

rate

rate parameter beta, must be positive.

scale

alternative parameterization to the rate parameter, scale = 1 / rate.

q

vector of quantiles.

lower.tail

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

k

kth-moment.

d

cut-off value.

less.than.d

logical; if TRUE (default) truncated mean for values <= d, otherwise, for values > d.

kap

probability.

t

t.

Details

The Erlang distribution with shape parameter n and rate parameter b has density:

f(x) = b^n / Γ(n) x^{n - 1} e^{-b x}

for x > 0, b > 0, n = 1, 2, 3, ....

Value

Function :

Invalid parameter values will return an error detailing which parameter is problematic.

Note

Function VatRErlang is a wrapper of the qgamma function from the stats package.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
dErlang(x = 2, shape = 2, scale = 4)

pErlang(q = 2, shape = 2, scale = 4)

expValErlang(shape = 2, scale = 4)

varErlang(shape = 2, scale = 4)

kthMomentErlang(k = 3, shape = 2, scale = 4)

expValLimErlang(d = 2, shape = 2, scale = 4)

# With rate parameter
expValTruncErlang(d = 2, shape = 2, scale = 4)

# Values greater than d
expValTruncErlang(d = 2, shape = 2, scale = 4, less.than.d = FALSE)

stopLossErlang(d = 2, shape = 2, scale = 4)

meanExcessErlang(d = 3, shape = 2, scale = 4)

# With scale parameter
VatRErlang(kap = .2, shape = 2, scale = 4)

# With rate parameter
VatRErlang(kap = .2, shape = 2, rate = 0.25)

# With scale parameter
TVatRErlang(kap = .2, shape = 3, scale = 4)

# With rate parameter
TVatRErlang(kap = .2, shape = 3, rate = 0.25)

mgfErlang(t = 2, shape = 2, scale = .25)

Distributacalcul documentation built on Sept. 13, 2020, 5:19 p.m.