Beta.Rd
Beta distribution with shape parameters \(\alpha\) and \(\beta\).
expValBeta(shape1, shape2) varBeta(shape1, shape2) kthMomentBeta(k, shape1, shape2) expValLimBeta(d, shape1, shape2) expValTruncBeta(d, shape1, shape2, less.than.d = TRUE) stopLossBeta(d, shape1, shape2) meanExcessBeta(d, shape1, shape2) VatRBeta(kap, shape1, shape2) TVatRBeta(kap, shape1, shape2) mgfBeta(t, shape1, shape2, k0)
shape1 | shape parameter \(\alpha\), must be positive. |
---|---|
shape2 | shape parameter \(\beta\), must be positive. |
k | kth-moment. |
d | cut-off value. |
less.than.d | logical; if |
kap | probability. |
t | t. |
k0 | point up to which to sum the distribution for the approximation. |
Function :
expValBeta
gives the expected value.
varBeta
gives the variance.
kthMomentBeta
gives the kth moment.
expValLimBeta
gives the limited mean.
expValTruncBeta
gives the truncated mean.
stopLossBeta
gives the stop-loss.
meanExcessBeta
gives the mean excess loss.
VatRBeta
gives the Value-at-Risk.
TVatRBeta
gives the Tail Value-at-Risk.
mgfBeta
gives the moment generating function (MGF).
Invalid parameter values will return an error detailing which parameter is problematic.
The Beta distribution with shape parameters \(\alpha\) and \(\beta\) has density: $$f\left(x\right) = \frac{\Gamma(\alpha + \beta)}{\Gamma(\alpha) % \Gamma(\beta)} x^{\alpha - 1} (1 - x)^(\beta - 1)$$ for \(x \in [0, 1]\), \(\alpha, \beta > 0\).
Function VatRBeta is a wrapper for the qbeta
function from the stats package.
expValBeta(shape1 = 3, shape2 = 5)#> [1] 0.375varBeta(shape1 = 4, shape2 = 5)#> [1] 0.02469136kthMomentBeta(k = 3, shape1 = 4, shape2 = 5)#> [1] 0.1212121expValLimBeta(d = 0.3, shape1 = 4, shape2 = 5)#> [1] 4.073393expValTruncBeta(d = 0.4, shape1 = 4, shape2 = 5)#> [1] 0.1184745# Values less than d expValTruncBeta(d = 0.4, shape1 = 4, shape2 = 5, less.than.d = FALSE)#> [1] 0.3259699stopLossBeta(d = 0.3, shape1 = 4, shape2 = 5)#> [1] 0.6422982meanExcessBeta(d = .3, shape1 = 4, shape2 = 5)#> [1] 0.1969992VatRBeta(kap = .99, shape1 = 4, shape2 = 5)#> [1] 0.8017979TVatRBeta(kap = .99, shape1 = 4, shape2 = 5)#> [1] 0.8377379mgfBeta(t = 1, shape1 = 3, shape2 = 5, k0 = 1E2)#> Warning: This is an approximation#> [1] 1.474362