| 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 |
rate |
rate parameter |
scale |
alternative parameterization to the rate parameter, scale = 1 / rate. |
lower.tail |
logical; if TRUE (default), probabilities are
|
k |
kth-moment. |
d |
cut-off value. |
less.than.d |
logical; if |
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 :
-
dErlanggives the probability density function (PDF). -
pErlanggives the cumulative density function (CDF). -
expValErlanggives the expected value. -
varErlanggives the variance. -
kthMomentErlanggives the kth moment. -
expValLimErlanggives the limited mean. -
expValTruncErlanggives the truncated mean. -
stopLossErlanggives the stop-loss. -
meanExcessErlanggives the mean excess loss. -
VatRErlanggives the Value-at-Risk. -
TVatRErlanggives the Tail Value-at-Risk. -
mgfErlanggives the moment generating function (MGF).
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)