Weibull distribution with shape parameter \(\tau\) and rate parameter \(\beta\).

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

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

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

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

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

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

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

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

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

Arguments

shape

shape parameter \(\tau\), must be positive

rate

rate parameter \(\beta\), must be positive.

scale

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

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.

Value

Function :

  • expValWeibull gives the expected value.

  • varWeibull gives the variance.

  • kthMomentWeibull gives the kth moment.

  • expValLimWeibull gives the limited mean.

  • expValTruncWeibull gives the truncated mean.

  • stopLossWeibull gives the stop-loss.

  • meanExcessWeibull gives the mean excess loss.

  • VatRWeibull gives the Value-at-Risk.

  • TVatRWeibull gives the Tail Value-at-Risk.

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

Details

The Weibull distribution with shape parameter \(\tau\) and rate parameter \(\beta\) has density: $$f\left(x\right) = \beta \tau \left( \beta x \right) ^{\tau -1} % \mathrm{e}^{-\left( \beta x\right) ^{\tau }}$$ for \(x \in \mathcal{R}^+\), \(\beta > 0\), \(\tau > 0\)

Examples

# With scale parameter
expValWeibull(shape = 2, scale = 5)
#> [1] 4.431135

# With rate parameter
expValWeibull(shape = 2, rate = 0.2)
#> [1] 4.431135

# With scale parameter
varWeibull(shape = 2, scale = 5)
#> [1] 5.365046

# With rate parameter
varWeibull(shape = 2, rate = 0.2)
#> [1] 5.365046

# With scale parameter
kthMomentWeibull(k = 2, shape = 2, scale = 5)
#> [1] 25

# With rate parameter
kthMomentWeibull(k = 2, shape = 2, rate = 0.2)
#> [1] 25

# With scale parameter
expValLimWeibull(d = 2, shape = 2, scale = 5)
#> [1] 6.135422

# With rate parameter
expValLimWeibull(d = 2, shape = 2, rate = 0.2)
#> [1] 6.135422

# With scale parameter
expValTruncWeibull(d = 2, shape = 2, scale = 5)
#> [1] 4.431135

# With rate parameter
expValTruncWeibull(d = 2, shape = 2, rate = 0.2)
#> [1] 4.431135

# Mean of values greater than d
expValTruncWeibull(d = 2, shape = 2, rate = 0.2, less.than.d = FALSE)
#> [1] 1.869292e-42

# With scale parameter
stopLossWeibull(d = 2, shape = 3, scale = 4)
#> [1] -1.764994

# With rate parameter
stopLossWeibull(d = 2, shape = 3, rate = 0.25)
#> [1] -1.764994

# With scale parameter
meanExcessWeibull(d = 2, shape = 3, scale = 4)
#> [1] -2

# With rate parameter
meanExcessWeibull(d = 2, shape = 3, rate = 0.25)
#> [1] -2

# With scale parameter
VatRWeibull(kap = .2, shape = 3, scale = 4)
#> [1] 2.426171

# With rate parameter
VatRWeibull(kap = .2, shape = 3, rate = 0.25)
#> [1] 2.426171

# With scale parameter
TVatRWeibull(kap = .2, shape = 3, scale = 4)
#> [1] 4.017289

# With rate parameter
TVatRWeibull(kap = .2, shape = 3, rate = 0.25)
#> [1] 4.017289