erlang {Distributacalcul}R Documentation

Erlang Distribution

Description

Erlang distribution with shape parameter n and rate parameter \beta.

Usage

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, q

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.

lower.tail

logical; if TRUE (default), probabilities are P[X \le 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 \beta has density:

f\left(x\right) = \frac{\beta^{n}}{\Gamma(n)} x^{n - 1}% \mathrm{e}^{-\beta x}

for x \in \mathcal{R}^+, \beta > 0, n \in \mathcal{N}^+.

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

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)


[Package Distributacalcul version 0.4.0 Index]