| Title: | Probability Distribution Functions |
|---|---|
| Description: | Calculates expected values, variance, different moments (kth moment, truncated mean), stop-loss, mean excess loss, Value-at-Risk (VaR) and Tail Value-at-Risk (TVaR) as well as some density and cumulative (survival) functions of continuous, discrete and compound distributions. This package also includes a visual 'Shiny' component to enable students to visualize distributions and understand the impact of their parameters. This package is intended to expand the 'stats' package so as to enable students to develop an intuition for probability. |
| Authors: | Alec James van Rassel [aut, cre, cph], Gabriel Crépeault-Cauchon [aut, ccp], Étienne Marceau [tch, sad], Hélène Cossette [tch, sad], Laboratoire Act & Risk [fnd, sht], École d'actuariat de l'Université Laval [fnd, his, uvp], Natural Sciences and Engineering Research Council of Canada [fnd], Marc-André Devost [ccp] |
| Maintainer: | Alec James van Rassel <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.4.0 |
| Built: | 2026-06-09 07:04:23 UTC |
| Source: | https://github.com/alec42/distributacalcul_package |
Beta distribution with shape parameters and .
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)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 |
shape2 |
shape parameter |
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. |
The Beta distribution with shape parameters and
has density:
for , .
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.
Function VatRBeta is a wrapper for the qbeta
function from the stats package.
expValBeta(shape1 = 3, shape2 = 5) varBeta(shape1 = 4, shape2 = 5) kthMomentBeta(k = 3, shape1 = 4, shape2 = 5) expValLimBeta(d = 0.3, shape1 = 4, shape2 = 5) expValTruncBeta(d = 0.4, shape1 = 4, shape2 = 5) # Values less than d expValTruncBeta(d = 0.4, shape1 = 4, shape2 = 5, less.than.d = FALSE) stopLossBeta(d = 0.3, shape1 = 4, shape2 = 5) meanExcessBeta(d = .3, shape1 = 4, shape2 = 5) VatRBeta(kap = .99, shape1 = 4, shape2 = 5) TVatRBeta(kap = .99, shape1 = 4, shape2 = 5) mgfBeta(t = 1, shape1 = 3, shape2 = 5, k0 = 1E2)expValBeta(shape1 = 3, shape2 = 5) varBeta(shape1 = 4, shape2 = 5) kthMomentBeta(k = 3, shape1 = 4, shape2 = 5) expValLimBeta(d = 0.3, shape1 = 4, shape2 = 5) expValTruncBeta(d = 0.4, shape1 = 4, shape2 = 5) # Values less than d expValTruncBeta(d = 0.4, shape1 = 4, shape2 = 5, less.than.d = FALSE) stopLossBeta(d = 0.3, shape1 = 4, shape2 = 5) meanExcessBeta(d = .3, shape1 = 4, shape2 = 5) VatRBeta(kap = .99, shape1 = 4, shape2 = 5) TVatRBeta(kap = .99, shape1 = 4, shape2 = 5) mgfBeta(t = 1, shape1 = 3, shape2 = 5, k0 = 1E2)
Binomial distribution with size and probability of
success .
expValBinom(size, prob) varBinom(size, prob) expValTruncBinom(d, size, prob, less.than.d = TRUE) VatRBinom(kap, size, prob) TVatRBinom(kap, size, prob) pgfBinom(t, size, prob) mgfBinom(t, size, prob)expValBinom(size, prob) varBinom(size, prob) expValTruncBinom(d, size, prob, less.than.d = TRUE) VatRBinom(kap, size, prob) TVatRBinom(kap, size, prob) pgfBinom(t, size, prob) mgfBinom(t, size, prob)
size |
Number of trials (0 or more). |
prob |
Probability of success in each trial. |
d |
cut-off value. |
less.than.d |
logical; if |
kap |
probability. |
t |
t. |
The binomial distribution with probability of success for trials
has probability mass function :
for , , and
Function :
mgfBinom gives the moment generating function (MGF).
pgfBinom gives the probability generating function (PGF).
expValBinom gives the expected value.
varBinom gives the variance.
expValTruncBinom gives the truncated mean.
TVatRBinom gives the Tail Value-at-Risk.
VatRBinom gives the Value-at-Risk.
Invalid parameter values will return an error detailing which parameter is problematic.
Function VatRBinom is a wrapper of the qbinom
function from the stats package.
expValBinom(size = 3, prob = 0.5) varBinom(size = 3, prob = 0.5) expValTruncBinom(d = 2, size = 3, prob = 0.5) expValTruncBinom(d = 0, size = 3, prob = 0.5, less.than.d = FALSE) VatRBinom(kap = 0.8, size = 5, prob = 0.2) TVatRBinom(kap = 0.8, size = 5, prob = 0.2) pgfBinom(t = 1, size = 3, prob = 0.5) mgfBinom(t = 1, size = 3, prob = 0.5)expValBinom(size = 3, prob = 0.5) varBinom(size = 3, prob = 0.5) expValTruncBinom(d = 2, size = 3, prob = 0.5) expValTruncBinom(d = 0, size = 3, prob = 0.5, less.than.d = FALSE) VatRBinom(kap = 0.8, size = 5, prob = 0.2) TVatRBinom(kap = 0.8, size = 5, prob = 0.2) pgfBinom(t = 1, size = 3, prob = 0.5) mgfBinom(t = 1, size = 3, prob = 0.5)
Computes CDF, PDF and simulations of of the bivariate Ali-Mikhail-Haq copula.
cBivariateAMH(u1, u2, dependencyParameter, ...) cdBivariateAMH(u1, u2, dependencyParameter, ...) crBivariateAMH(numberSimulations = 10000, seed = 42, dependencyParameter)cBivariateAMH(u1, u2, dependencyParameter, ...) cdBivariateAMH(u1, u2, dependencyParameter, ...) crBivariateAMH(numberSimulations = 10000, seed = 42, dependencyParameter)
u1, u2
|
points at which to evaluate the copula. |
dependencyParameter |
correlation parameter. |
... |
other parameters. |
numberSimulations |
Number of simulations. |
seed |
Simulation seed, 42 by default. |
The bivariate Ali-Mikhail-Haq copula has CDF :
Function :
cBivariateAMH returns the value of the copula.
cdBivariateAMH returns the value of the density copula.
crBivariateAMH returns simulated values of the copula.
cBivariateAMH(u1 = .76, u2 = 0.4, dependencyParameter = 0.4) cdBivariateAMH(u1 = .76, u2 = 0.4, dependencyParameter = 0.4) crBivariateAMH(numberSimulations = 10, seed = 42, dependencyParameter = 0.2)cBivariateAMH(u1 = .76, u2 = 0.4, dependencyParameter = 0.4) cdBivariateAMH(u1 = .76, u2 = 0.4, dependencyParameter = 0.4) crBivariateAMH(numberSimulations = 10, seed = 42, dependencyParameter = 0.2)
Computes CDF and simulations of the bivariate Cuadras-Augé copula.
cBivariateCA(u1, u2, dependencyParameter, ...) crBivariateCA(numberSimulations = 10000, seed = 42, dependencyParameter)cBivariateCA(u1, u2, dependencyParameter, ...) crBivariateCA(numberSimulations = 10000, seed = 42, dependencyParameter)
u1, u2
|
points at which to evaluate the copula. |
dependencyParameter |
correlation parameter. |
... |
other parameters. |
numberSimulations |
Number of simulations. |
seed |
Simulation seed, 42 by default. |
The bivariate Cuadras-Augé copula has CDF :
for .
It is the geometric mean of the independance and upper Fréchet bound copulas.
Function :
cBivariateCA returns the value of the copula.
crBivariateCA returns simulated values of the copula.
cBivariateCA(u1 = .76, u2 = 0.4, dependencyParameter = 0.4) crBivariateCA(numberSimulations = 10, seed = 42, dependencyParameter = 0.2)cBivariateCA(u1 = .76, u2 = 0.4, dependencyParameter = 0.4) crBivariateCA(numberSimulations = 10, seed = 42, dependencyParameter = 0.2)
Computes CDF, PDF and simulations of the bivariate Clayton copula.
cBivariateClayton(u1, u2, dependencyParameter, ...) cdBivariateClayton(u1, u2, dependencyParameter, ...) crBivariateClayton(numberSimulations = 10000, seed = 42, dependencyParameter)cBivariateClayton(u1, u2, dependencyParameter, ...) cdBivariateClayton(u1, u2, dependencyParameter, ...) crBivariateClayton(numberSimulations = 10000, seed = 42, dependencyParameter)
u1, u2
|
points at which to evaluate the copula. |
dependencyParameter |
correlation parameter. |
... |
other parameters. |
numberSimulations |
Number of simulations. |
seed |
Simulation seed, 42 by default. |
The bivariate Clayton copula has CDF :
Function :
cBivariateAMH returns the value of the copula.
cdBivariateAMH returns the value of the density function associated to the copula.
cBivariateClayton(u1 = .76, u2 = 0.4, dependencyParameter = 0.4) cdBivariateClayton(u1 = .76, u2 = 0.4, dependencyParameter = 0.4) crBivariateClayton(numberSimulations = 10, seed = 42, dependencyParameter = 0.2)cBivariateClayton(u1 = .76, u2 = 0.4, dependencyParameter = 0.4) cdBivariateClayton(u1 = .76, u2 = 0.4, dependencyParameter = 0.4) crBivariateClayton(numberSimulations = 10, seed = 42, dependencyParameter = 0.2)
Computes CDF, PDF and simulations of the EFGM copula.
cBivariateEFGM(u1, u2, dependencyParameter) cdBivariateEFGM(u1, u2, dependencyParameter) crBivariateEFGM(numberSimulations = 10000, seed = 42, dependencyParameter)cBivariateEFGM(u1, u2, dependencyParameter) cdBivariateEFGM(u1, u2, dependencyParameter) crBivariateEFGM(numberSimulations = 10000, seed = 42, dependencyParameter)
u1, u2
|
points at which to evaluate the copula. |
dependencyParameter |
correlation parameter. |
numberSimulations |
Number of simulations. |
seed |
Simulation seed, 42 by default. |
The EFGM copula has CDF :
Function :
cBivariateEFGM returns the value of the copula.
cdBivariateEFGM returns the value of the density function associated to the copula.
crBivariateEFGM returns simulated values of the copula.
cBivariateEFGM(u1 = .76, u2 = 0.4, dependencyParameter = 0.4) cdBivariateEFGM(u1 = .76, u2 = 0.4, dependencyParameter = 0.4) crBivariateEFGM(numberSimulations = 10, seed = 42, dependencyParameter = 0.2)cBivariateEFGM(u1 = .76, u2 = 0.4, dependencyParameter = 0.4) cdBivariateEFGM(u1 = .76, u2 = 0.4, dependencyParameter = 0.4) crBivariateEFGM(numberSimulations = 10, seed = 42, dependencyParameter = 0.2)
Computes CDF, PDF and simulations of the bivariate Frank copula.
cBivariateFrank(u1, u2, dependencyParameter, ...) cdBivariateFrank(u1, u2, dependencyParameter, ...) crBivariateFrank(numberSimulations = 10000, seed = 42, dependencyParameter)cBivariateFrank(u1, u2, dependencyParameter, ...) cdBivariateFrank(u1, u2, dependencyParameter, ...) crBivariateFrank(numberSimulations = 10000, seed = 42, dependencyParameter)
u1, u2
|
points at which to evaluate the copula. |
dependencyParameter |
correlation parameter. |
... |
other parameters. |
numberSimulations |
Number of simulations. |
seed |
Simulation seed, 42 by default. |
The bivariate Frank copula has CDF :
Function :
cBivariateFrank returns the value of the copula.
cdBivariateFrank returns the value of the density function associated to the copula.
crBivariateFrank returns simulated values of the copula.
cBivariateFrank(u1 = .76, u2 = 0.4, dependencyParameter = 0.4) cdBivariateFrank(u1 = .76, u2 = 0.4, dependencyParameter = 0.4) crBivariateFrank(numberSimulations = 10, seed = 42, dependencyParameter = 0.2)cBivariateFrank(u1 = .76, u2 = 0.4, dependencyParameter = 0.4) cdBivariateFrank(u1 = .76, u2 = 0.4, dependencyParameter = 0.4) crBivariateFrank(numberSimulations = 10, seed = 42, dependencyParameter = 0.2)
Computes CDF, PDF and simulations of the bivariate Gumbel copula.
cBivariateGumbel(u1, u2, dependencyParameter, ...) cdBivariateGumbel(u1, u2, dependencyParameter, ...) crBivariateGumbel(numberSimulations = 10000, seed = 42, dependencyParameter)cBivariateGumbel(u1, u2, dependencyParameter, ...) cdBivariateGumbel(u1, u2, dependencyParameter, ...) crBivariateGumbel(numberSimulations = 10000, seed = 42, dependencyParameter)
u1, u2
|
points at which to evaluate the copula. |
dependencyParameter |
correlation parameter. |
... |
other parameters. |
numberSimulations |
Number of simulations. |
seed |
Simulation seed, 42 by default. |
The bivariate Gumbel copula has CDF :
Function :
cBivariateGumbel returns the value of the copula.
cdBivariateGumbel returns the value of the density function associated to the copula.
crBivariateGumbel returns simulated values of the copula.
cBivariateGumbel(u1 = .76, u2 = 0.4, dependencyParameter = 1.4) cdBivariateGumbel(u1 = .76, u2 = 0.4, dependencyParameter = 1.4) crBivariateGumbel(numberSimulations = 10, seed = 42, dependencyParameter = 1.2)cBivariateGumbel(u1 = .76, u2 = 0.4, dependencyParameter = 1.4) cdBivariateGumbel(u1 = .76, u2 = 0.4, dependencyParameter = 1.4) crBivariateGumbel(numberSimulations = 10, seed = 42, dependencyParameter = 1.2)
Computes CDF and simulations of the bivariate Marshall-Olkin copula.
cBivariateMO(u1, u2, dependencyParameter, ...) crBivariateMO(numberSimulations = 10000, seed = 42, dependencyParameter)cBivariateMO(u1, u2, dependencyParameter, ...) crBivariateMO(numberSimulations = 10000, seed = 42, dependencyParameter)
u1, u2
|
points at which to evaluate the copula. |
dependencyParameter |
correlation parameters, must be vector of length 2. |
... |
other parameters. |
numberSimulations |
Number of simulations. |
seed |
Simulation seed, 42 by default. |
The bivariate Marshall-Olkin copula has CDF :
for .
It is the geometric mean of the independance and upper Fréchet bound copulas.
Function :
cBivariateMO returns the value of the copula.
crBivariateMO returns simulated values of the copula.
cBivariateMO(u1 = .76, u2 = 0.4, dependencyParameter = c(0.4, 0.3)) crBivariateMO(numberSimulations = 10, seed = 42, dependencyParameter = c(0.2, 0.5))cBivariateMO(u1 = .76, u2 = 0.4, dependencyParameter = c(0.4, 0.3)) crBivariateMO(numberSimulations = 10, seed = 42, dependencyParameter = c(0.2, 0.5))
Computes various risk measures (mean, variance, Value-at-Risk (VaR), and Tail Value-at-Risk (TVaR)) for the compound Binomial distribution.
pCompBinom( x, size, prob, shape, rate = 1/scale, scale = 1/rate, k0, distr_severity = "Gamma" ) expValCompBinom( size, prob, shape, rate = 1/scale, scale = 1/rate, distr_severity = "Gamma" ) varCompBinom( size, prob, shape, rate = 1/scale, scale = 1/rate, distr_severity = "Gamma" ) VatRCompBinom( kap, size, prob, shape, rate = 1/scale, scale = 1/rate, k0, distr_severity = "Gamma" ) TVatRCompBinom( kap, size, prob, shape, rate = 1/scale, scale = 1/rate, vark, k0, distr_severity = "Gamma" )pCompBinom( x, size, prob, shape, rate = 1/scale, scale = 1/rate, k0, distr_severity = "Gamma" ) expValCompBinom( size, prob, shape, rate = 1/scale, scale = 1/rate, distr_severity = "Gamma" ) varCompBinom( size, prob, shape, rate = 1/scale, scale = 1/rate, distr_severity = "Gamma" ) VatRCompBinom( kap, size, prob, shape, rate = 1/scale, scale = 1/rate, k0, distr_severity = "Gamma" ) TVatRCompBinom( kap, size, prob, shape, rate = 1/scale, scale = 1/rate, vark, k0, distr_severity = "Gamma" )
x |
vector of quantiles |
size |
Number of trials (0 or more). |
prob |
Probability of success in each trial. |
shape |
shape parameter |
rate |
rate parameter |
scale |
alternative parameterization to the rate parameter, scale = 1 / rate. |
k0 |
point up to which to sum the distribution for the approximation. |
distr_severity |
Choice of severity distribution.
|
kap |
probability. |
vark |
Value-at-Risk (VaR) calculated at the given probability kap. |
The compound binomial distribution has density ....
Function :
pCompBinom gives the cumulative density function.
expValCompBinom gives the expected value.
varCompBinom gives the variance.
TVatRCompBinom gives the Tail Value-at-Risk.
VatRCompBinom gives the Value-at-Risk.
Returned values are approximations for the cumulative density function, TVaR, and VaR.
pCompBinom(x = 2, size = 1, prob = 0.2, shape = log(1000) - 0.405, rate = 0.9^2, k0 = 1E2, distr_severity = "Gamma") expValCompBinom(size = 1, prob = 0.2, shape = log(1000) - 0.405, rate = 0.9^2, distr_severity = "Lognormale") varCompBinom(size = 1, prob = 0.2, shape = log(1000) - 0.405, rate = 0.9^2, distr_severity = "Lognormale") VatRCompBinom(kap = 0.9, size = 1, prob = 0.2, shape = log(1000) - 0.405, rate = 0.9^2, k0 = 1E2, distr_severity = "Gamma") vark_calc <- VatRCompBinom(kap = 0.9, size = 1, prob = 0.2, shape = 0.59, rate = 0.9^2, k0 = 1E2, distr_severity = "Gamma") TVatRCompBinom(kap = 0.9, size = 1, prob = 0.2, shape = 0.59, rate = 0.9^2, vark = vark_calc, k0 = 1E2, distr_severity = "Gamma")pCompBinom(x = 2, size = 1, prob = 0.2, shape = log(1000) - 0.405, rate = 0.9^2, k0 = 1E2, distr_severity = "Gamma") expValCompBinom(size = 1, prob = 0.2, shape = log(1000) - 0.405, rate = 0.9^2, distr_severity = "Lognormale") varCompBinom(size = 1, prob = 0.2, shape = log(1000) - 0.405, rate = 0.9^2, distr_severity = "Lognormale") VatRCompBinom(kap = 0.9, size = 1, prob = 0.2, shape = log(1000) - 0.405, rate = 0.9^2, k0 = 1E2, distr_severity = "Gamma") vark_calc <- VatRCompBinom(kap = 0.9, size = 1, prob = 0.2, shape = 0.59, rate = 0.9^2, k0 = 1E2, distr_severity = "Gamma") TVatRCompBinom(kap = 0.9, size = 1, prob = 0.2, shape = 0.59, rate = 0.9^2, vark = vark_calc, k0 = 1E2, distr_severity = "Gamma")
Computes various risk measures (mean, variance, Value-at-Risk (VatR), and Tail Value-at-Risk (TVatR)) for the compound Negative Binomial distribution.
pCompNBinom( x, size, prob, shape, rate = 1/scale, scale = 1/rate, k0, distr_severity = "Gamma" ) expValCompNBinom( size, prob, shape, rate = 1/scale, scale = 1/rate, distr_severity = "Gamma" ) varCompNBinom( size, prob, shape, rate = 1/scale, scale = 1/rate, distr_severity = "Gamma" ) VatRCompNBinom( kap, size, prob, shape, rate = 1/scale, scale = 1/rate, k0, distr_severity = "Gamma" ) TVatRCompNBinom( kap, vark, size, prob, shape, rate = 1/scale, scale = 1/rate, k0, distr_severity = "Gamma" )pCompNBinom( x, size, prob, shape, rate = 1/scale, scale = 1/rate, k0, distr_severity = "Gamma" ) expValCompNBinom( size, prob, shape, rate = 1/scale, scale = 1/rate, distr_severity = "Gamma" ) varCompNBinom( size, prob, shape, rate = 1/scale, scale = 1/rate, distr_severity = "Gamma" ) VatRCompNBinom( kap, size, prob, shape, rate = 1/scale, scale = 1/rate, k0, distr_severity = "Gamma" ) TVatRCompNBinom( kap, vark, size, prob, shape, rate = 1/scale, scale = 1/rate, k0, distr_severity = "Gamma" )
x |
vector of quantiles |
size |
Number of successful trials. |
prob |
Probability of success in each trial. |
shape |
shape parameter |
rate |
rate parameter |
scale |
alternative parameterization to the rate parameter, scale = 1 / rate. |
k0 |
point up to which to sum the distribution for the approximation. |
distr_severity |
Choice of severity distribution.
|
kap |
probability. |
vark |
Value-at-Risk (VaR) calculated at the given probability kap. |
The compound negative binomial distribution has density ....
Function :
pCompNBinom gives the cumulative density function.
expValCompNBinom gives the expected value.
varCompNBinom gives the variance.
TVatRCompNBinom gives the Tail Value-at-Risk.
VatRCompNBinom gives the Value-at-Risk.
Returned values are approximations for the cumulative density function, TVatR, and VatR.
pCompNBinom(x = 2, size = 1, prob = 0.2, shape = log(1000) - 0.405, rate = 0.9^2, k0 = 1E2, distr_severity = "Gamma") expValCompNBinom(size = 4, prob = 0.2, shape = 0, scale = 1, distr_severity = "Lognormal") varCompNBinom(size = 1, prob = 0.2, shape = log(1000) - 0.405, rate = 0.9^2, distr_severity = "Lognormale") VatRCompNBinom(kap = 0.9, size = 1, prob = 0.2, shape = 0.59, rate = 0.9^2, k0 = 1E2, distr_severity = "Gamma") vark_calc <- VatRCompNBinom(kap = 0.9, size = 1, prob = 0.2, shape = 0.59, rate = 0.9^2, k0 = 1E2, distr_severity = "Gamma") TVatRCompNBinom(kap = 0.9, size = 1, prob = 0.2, shape = 0.59, rate = 0.9^2, vark = vark_calc, k0 = 1E2, distr_severity = "Gamma")pCompNBinom(x = 2, size = 1, prob = 0.2, shape = log(1000) - 0.405, rate = 0.9^2, k0 = 1E2, distr_severity = "Gamma") expValCompNBinom(size = 4, prob = 0.2, shape = 0, scale = 1, distr_severity = "Lognormal") varCompNBinom(size = 1, prob = 0.2, shape = log(1000) - 0.405, rate = 0.9^2, distr_severity = "Lognormale") VatRCompNBinom(kap = 0.9, size = 1, prob = 0.2, shape = 0.59, rate = 0.9^2, k0 = 1E2, distr_severity = "Gamma") vark_calc <- VatRCompNBinom(kap = 0.9, size = 1, prob = 0.2, shape = 0.59, rate = 0.9^2, k0 = 1E2, distr_severity = "Gamma") TVatRCompNBinom(kap = 0.9, size = 1, prob = 0.2, shape = 0.59, rate = 0.9^2, vark = vark_calc, k0 = 1E2, distr_severity = "Gamma")
Computes various risk measures (mean, variance, Value-at-Risk (VaR), and Tail Value-at-Risk (TVaR)) for the compound Poisson distribution.
pCompPois( x, lambda, shape, rate = 1/scale, scale = 1/rate, k0, distr_severity = "Gamma" ) expValCompPois( lambda, shape, rate = 1/scale, scale = 1/rate, distr_severity = "Gamma" ) varCompPois( lambda, shape, rate = 1/scale, scale = 1/rate, distr_severity = "Gamma" ) VatRCompPois( kap, lambda, shape, rate = 1/scale, scale = 1/rate, k0, distr_severity = "Gamma" ) TVatRCompPois( kap, lambda, shape, rate = 1/scale, scale = 1/rate, vark, k0, distr_severity = "Gamma" )pCompPois( x, lambda, shape, rate = 1/scale, scale = 1/rate, k0, distr_severity = "Gamma" ) expValCompPois( lambda, shape, rate = 1/scale, scale = 1/rate, distr_severity = "Gamma" ) varCompPois( lambda, shape, rate = 1/scale, scale = 1/rate, distr_severity = "Gamma" ) VatRCompPois( kap, lambda, shape, rate = 1/scale, scale = 1/rate, k0, distr_severity = "Gamma" ) TVatRCompPois( kap, lambda, shape, rate = 1/scale, scale = 1/rate, vark, k0, distr_severity = "Gamma" )
x |
vector of quantiles |
lambda |
Rate parameter |
shape |
shape parameter |
rate |
rate parameter |
scale |
alternative parameterization to the rate parameter, scale = 1 / rate. |
k0 |
point up to which to sum the distribution for the approximation. |
distr_severity |
Choice of severity distribution.
|
kap |
probability. |
vark |
Value-at-Risk (VaR) calculated at the given probability kap. |
The compound Poisson distribution with parameters ... has density ....
Function :
pCompPois gives the cumulative density function.
expValCompPois gives the expected value.
varCompPois gives the variance.
TVatRCompPois gives the Tail Value-at-Risk.
VatRCompPois gives the Value-at-Risk.
Returned values are approximations for the cumulative density function, TVaR, and VaR.
pCompPois(x = 2, lambda = 2, shape = log(1000) - 0.405, rate = 0.9^2, k0 = 1E2, distr_severity = "Gamma") expValCompPois(lambda = 2, shape = log(1000) - 0.405, rate = 0.9^2, distr_severity = "Lognormale") varCompPois(lambda = 2, shape = log(1000) - 0.405, rate = 0.9^2, distr_severity = "Lognormale") VatRCompPois(kap = 0.9, lambda = 2, shape = log(1000) - 0.405, rate = 0.9^2, k0 = 1E2, distr_severity = "Gamma") vark_calc <- VatRCompPois(kap = 0.9, lambda = 2, shape = 0.59, rate = 0.9^2, k0 = 1E2, distr_severity = "Gamma") TVatRCompPois(kap = 0.9, lambda = 2, shape = 0.59, rate = 0.9^2, vark = vark_calc, k0 = 1E2, distr_severity = "Gamma")pCompPois(x = 2, lambda = 2, shape = log(1000) - 0.405, rate = 0.9^2, k0 = 1E2, distr_severity = "Gamma") expValCompPois(lambda = 2, shape = log(1000) - 0.405, rate = 0.9^2, distr_severity = "Lognormale") varCompPois(lambda = 2, shape = log(1000) - 0.405, rate = 0.9^2, distr_severity = "Lognormale") VatRCompPois(kap = 0.9, lambda = 2, shape = log(1000) - 0.405, rate = 0.9^2, k0 = 1E2, distr_severity = "Gamma") vark_calc <- VatRCompPois(kap = 0.9, lambda = 2, shape = 0.59, rate = 0.9^2, k0 = 1E2, distr_severity = "Gamma") TVatRCompPois(kap = 0.9, lambda = 2, shape = 0.59, rate = 0.9^2, vark = vark_calc, k0 = 1E2, distr_severity = "Gamma")
Hypergeometric distribution where we have a sample of k balls from an urn containing N, of which m are white and n are black.
expValErl(N = n + m, m, n = N - m, k) varErl(N = n + m, m, n = N - m, k)expValErl(N = n + m, m, n = N - m, k) varErl(N = n + m, m, n = N - m, k)
N |
Total number of balls (white and black) in the urn. |
m |
Number of white balls in the urn. |
n |
Number of black balls in the urn. Can specify n instead of N. |
k |
Number of balls drawn from the urn, k = 0, 1, ..., m + n. |
The Hypergeometric distribution for total items of which
are of one type and of the other and from which
items are picked has probability mass function :
for .
Function :
Invalid parameter values will return an error detailing which parameter is problematic.
# With total balls specified expValErl(N = 5, m = 2, k = 2) # With number of each colour of balls specified expValErl(m = 2, n = 3, k = 2) # With total balls specified varErl(N = 5, m = 2, k = 2) # With number of each colour of balls specified varErl(m = 2, n = 3, k = 2)# With total balls specified expValErl(N = 5, m = 2, k = 2) # With number of each colour of balls specified expValErl(m = 2, n = 3, k = 2) # With total balls specified varErl(N = 5, m = 2, k = 2) # With number of each colour of balls specified varErl(m = 2, n = 3, k = 2)
Erlang distribution with shape parameter and rate parameter
.
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)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)
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. |
The Erlang distribution with shape parameter and rate parameter
has density:
for , ,
.
Function :
dErlang gives the probability density function (PDF).
pErlang gives the cumulative density function (CDF).
expValErlang gives the expected value.
varErlang gives the variance.
kthMomentErlang gives the kth moment.
expValLimErlang gives the limited mean.
expValTruncErlang gives the truncated mean.
stopLossErlang gives the stop-loss.
meanExcessErlang gives the mean excess loss.
VatRErlang gives the Value-at-Risk.
TVatRErlang gives the Tail Value-at-Risk.
mgfErlang gives the moment generating function (MGF).
Invalid parameter values will return an error detailing which parameter is problematic.
Function VatRErlang is a wrapper of the qgamma
function from the stats package.
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)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)
Exponential distribution with rate parameter .
expValExp(rate = 1/scale, scale = 1/rate) varExp(rate = 1/scale, scale = 1/rate) kthMomentExp(k, rate = 1/scale, scale = 1/rate) expValLimExp(d, rate = 1/scale, scale = 1/rate) expValTruncExp(d, rate = 1/scale, scale = 1/rate, less.than.d = TRUE) stopLossExp(d, rate = 1/scale, scale = 1/rate) meanExcessExp(d, rate = 1/scale, scale = 1/rate) VatRExp(kap, rate = 1/scale, scale = 1/rate) TVatRExp(kap, rate = 1/scale, scale = 1/rate) mgfExp(t, rate = 1/scale, scale = 1/rate)expValExp(rate = 1/scale, scale = 1/rate) varExp(rate = 1/scale, scale = 1/rate) kthMomentExp(k, rate = 1/scale, scale = 1/rate) expValLimExp(d, rate = 1/scale, scale = 1/rate) expValTruncExp(d, rate = 1/scale, scale = 1/rate, less.than.d = TRUE) stopLossExp(d, rate = 1/scale, scale = 1/rate) meanExcessExp(d, rate = 1/scale, scale = 1/rate) VatRExp(kap, rate = 1/scale, scale = 1/rate) TVatRExp(kap, rate = 1/scale, scale = 1/rate) mgfExp(t, rate = 1/scale, scale = 1/rate)
rate |
rate parameter |
scale |
alternative parameterization to the rate parameter, scale = 1 / rate. |
k |
kth-moment. |
d |
cut-off value. |
less.than.d |
logical; if |
kap |
probability. |
t |
t. |
The Exponential distribution with rate parameter has density:
for , .
Function :
expValExp gives the expected value.
varExp gives the variance.
kthMomentExp gives the kth moment.
expValLimExp gives the limited mean.
expValTruncExp gives the truncated mean.
stopLossExp gives the stop-loss.
meanExcessExp gives the mean excess loss.
VatRExp gives the Value-at-Risk.
TVatRExp gives the Tail Value-at-Risk.
mgfExp gives the moment generating function (MGF).
Invalid parameter values will return an error detailing which parameter is problematic.
Function VatRExp is a wrapper of the qexp
function from the stats package.
# With scale parameter expValExp(scale = 4) # With rate parameter expValExp(rate = 0.25) # With scale parameter varExp(scale = 4) # With rate parameter varExp(rate = 0.25) # With scale parameter kthMomentExp(k = 2, scale = 4) # With rate parameter kthMomentExp(k = 2, rate = 0.25) # With scale parameter expValLimExp(d = 2, scale = 4) # With rate parameter expValLimExp(d = 2, rate = 0.25) # With scale parameter expValTruncExp(d = 2, scale = 4) # With rate parameter, values greater than d expValTruncExp(d = 2, rate = 0.25, less.than.d = FALSE) # With scale parameter stopLossExp(d = 2, scale = 4) # With rate parameter stopLossExp(d = 2, rate = 0.25) # With scale parameter meanExcessExp(d = 2, scale = 4) # With rate parameter meanExcessExp(d = 5, rate = 0.25) # With scale parameter VatRExp(kap = .99, scale = 4) # With rate parameter VatRExp(kap = .99, rate = 0.25) # With scale parameter TVatRExp(kap = .99, scale = 4) # With rate parameter TVatRExp(kap = .99, rate = 0.25) mgfExp(t = 1, rate = 5)# With scale parameter expValExp(scale = 4) # With rate parameter expValExp(rate = 0.25) # With scale parameter varExp(scale = 4) # With rate parameter varExp(rate = 0.25) # With scale parameter kthMomentExp(k = 2, scale = 4) # With rate parameter kthMomentExp(k = 2, rate = 0.25) # With scale parameter expValLimExp(d = 2, scale = 4) # With rate parameter expValLimExp(d = 2, rate = 0.25) # With scale parameter expValTruncExp(d = 2, scale = 4) # With rate parameter, values greater than d expValTruncExp(d = 2, rate = 0.25, less.than.d = FALSE) # With scale parameter stopLossExp(d = 2, scale = 4) # With rate parameter stopLossExp(d = 2, rate = 0.25) # With scale parameter meanExcessExp(d = 2, scale = 4) # With rate parameter meanExcessExp(d = 5, rate = 0.25) # With scale parameter VatRExp(kap = .99, scale = 4) # With rate parameter VatRExp(kap = .99, rate = 0.25) # With scale parameter TVatRExp(kap = .99, scale = 4) # With rate parameter TVatRExp(kap = .99, rate = 0.25) mgfExp(t = 1, rate = 5)
Computes CDF and simulations of the Fréchet copula.
cFrechet(u1, u2, dependencyParameter, ...) crFrechet(numberSimulations = 10000, seed = 42, dependencyParameter)cFrechet(u1, u2, dependencyParameter, ...) crFrechet(numberSimulations = 10000, seed = 42, dependencyParameter)
u1, u2
|
points at which to evaluate the copula. |
dependencyParameter |
correlation parameters, must be vector of length 2. |
... |
other parameters. |
numberSimulations |
Number of simulations. |
seed |
Simulation seed, 42 by default. |
The Fréchet copula has CDF :
for
and .
Function :
cFrechet(u1 = .76, u2 = 0.4, dependencyParameter = c(0.2, 0.3)) crFrechet(numberSimulations = 10, seed = 42, dependencyParameter = c(0.2, 0.3))cFrechet(u1 = .76, u2 = 0.4, dependencyParameter = c(0.2, 0.3)) crFrechet(numberSimulations = 10, seed = 42, dependencyParameter = c(0.2, 0.3))
Computes CDF and simulations of the Fréchet lower bound copula.
cFrechetLowerBound(u1, u2, ...) crFrechetLowerBound(numberSimulations = 10000, seed = 42)cFrechetLowerBound(u1, u2, ...) crFrechetLowerBound(numberSimulations = 10000, seed = 42)
u1, u2
|
points at which to evaluate the copula. |
... |
other parameters. |
numberSimulations |
Number of simulations. |
seed |
Simulation seed, 42 by default. |
The Fréchet lower bound copula has CDF :
for .
Function :
cFrechetLowerBound returns the value of the copula.
crFrechetLowerBound returns simulated values of the copula.
cFrechetLowerBound(u1 = .76, u2 = 0.4) crFrechetLowerBound(numberSimulations = 10, seed = 42)cFrechetLowerBound(u1 = .76, u2 = 0.4) crFrechetLowerBound(numberSimulations = 10, seed = 42)
Computes CDF and simulations of the Fréchet upper bound copula.
cFrechetUpperBound(u1, u2, ...) crFrechetUpperBound(numberSimulations = 10000, seed = 42)cFrechetUpperBound(u1, u2, ...) crFrechetUpperBound(numberSimulations = 10000, seed = 42)
u1, u2
|
points at which to evaluate the copula. |
... |
other parameters. |
numberSimulations |
Number of simulations. |
seed |
Simulation seed, 42 by default. |
The Fréchet upper bound copula has CDF :
for .
Function :
cFrechetUpperBound returns the value of the copula.
crFrechetUpperBound returns simulated values of the copula.
cFrechetUpperBound(u1 = .56, u2 = 0.4) crFrechetUpperBound(numberSimulations = 10, seed = 42)cFrechetUpperBound(u1 = .56, u2 = 0.4) crFrechetUpperBound(numberSimulations = 10, seed = 42)
Gamma distribution with shape parameter and rate
parameter .
expValGamma(shape, rate = 1/scale, scale = 1/rate) varGamma(shape, rate = 1/scale, scale = 1/rate) kthMomentGamma(k, shape, rate = 1/scale, scale = 1/rate) expValLimGamma(d, shape, rate = 1/scale, scale = 1/rate) expValTruncGamma(d, shape, rate = 1/scale, scale = 1/rate, less.than.d = TRUE) stopLossGamma(d, shape, rate = 1/scale, scale = 1/rate) meanExcessGamma(d, shape, rate = 1/scale, scale = 1/rate) VatRGamma(kap, shape, rate = 1/scale, scale = 1/rate) TVatRGamma(kap, shape, rate = 1/scale, scale = 1/rate) mgfGamma(t, shape, rate = 1/scale, scale = 1/rate)expValGamma(shape, rate = 1/scale, scale = 1/rate) varGamma(shape, rate = 1/scale, scale = 1/rate) kthMomentGamma(k, shape, rate = 1/scale, scale = 1/rate) expValLimGamma(d, shape, rate = 1/scale, scale = 1/rate) expValTruncGamma(d, shape, rate = 1/scale, scale = 1/rate, less.than.d = TRUE) stopLossGamma(d, shape, rate = 1/scale, scale = 1/rate) meanExcessGamma(d, shape, rate = 1/scale, scale = 1/rate) VatRGamma(kap, shape, rate = 1/scale, scale = 1/rate) TVatRGamma(kap, shape, rate = 1/scale, scale = 1/rate) mgfGamma(t, shape, rate = 1/scale, scale = 1/rate)
shape |
shape parameter |
rate |
rate parameter |
scale |
alternative parameterization to the rate parameter, scale = 1 / rate. |
k |
kth-moment. |
d |
cut-off value. |
less.than.d |
logical; if |
kap |
probability. |
t |
t. |
The Gamma distribution with shape parameter and rate
parameter has density:
for , .
Function :
expValGamma gives the expected value.
varGamma gives the variance.
kthMomentGamma gives the kth moment.
expValLimGamma gives the limited mean.
expValTruncGamma gives the truncated mean.
stopLossGamma gives the stop-loss.
meanExcessGamma gives the mean excess loss.
VatRGamma gives the Value-at-Risk.
TVatRGamma gives the Tail Value-at-Risk.
mgfGamma gives the moment generating function (MGF).
Invalid parameter values will return an error detailing which parameter is problematic.
Function VatRGamma is a wrapper for the qgamma
function stats package.
# With scale parameter expValGamma(shape = 3, scale = 4) # With rate parameter expValGamma(shape = 3, rate = 0.25) # With scale parameter varGamma(shape = 3, scale = 4) # With rate parameter varGamma(shape = 3, rate = 0.25) # With scale parameter kthMomentGamma(k = 2, shape = 3, scale = 4) # With rate parameter kthMomentGamma(k = 2, shape = 3, rate = 0.25) # With scale parameter expValLimGamma(d = 2, shape = 3, scale = 4) # With rate parameter expValLimGamma(d = 2, shape = 3, rate = 0.25) # With scale parameter expValTruncGamma(d = 2, shape = 3, scale = 4) # With rate parameter expValTruncGamma(d = 2, shape = 3, rate = 0.25) # values greather than d expValTruncGamma(d = 2, shape = 3, rate = 0.25, less.than.d = FALSE) # With scale parameter stopLossGamma(d = 2, shape = 3, scale = 4) # With rate parameter stopLossGamma(d = 2, shape = 3, rate = 0.25) # With scale parameter meanExcessGamma(d = 2, shape = 3, scale = 4) # With rate parameter meanExcessGamma(d = 2, shape = 3, rate = 0.25) # With scale parameter VatRGamma(kap = .2, shape = 3, scale = 4) # With rate parameter VatRGamma(kap = .2, shape = 3, rate = 0.25) # With scale parameter TVatRGamma(kap = .2, shape = 3, scale = 4) # With rate parameter TVatRGamma(kap = .2, shape = 3, rate = 0.25) mgfGamma(t = 1, shape = 3, rate = 5)# With scale parameter expValGamma(shape = 3, scale = 4) # With rate parameter expValGamma(shape = 3, rate = 0.25) # With scale parameter varGamma(shape = 3, scale = 4) # With rate parameter varGamma(shape = 3, rate = 0.25) # With scale parameter kthMomentGamma(k = 2, shape = 3, scale = 4) # With rate parameter kthMomentGamma(k = 2, shape = 3, rate = 0.25) # With scale parameter expValLimGamma(d = 2, shape = 3, scale = 4) # With rate parameter expValLimGamma(d = 2, shape = 3, rate = 0.25) # With scale parameter expValTruncGamma(d = 2, shape = 3, scale = 4) # With rate parameter expValTruncGamma(d = 2, shape = 3, rate = 0.25) # values greather than d expValTruncGamma(d = 2, shape = 3, rate = 0.25, less.than.d = FALSE) # With scale parameter stopLossGamma(d = 2, shape = 3, scale = 4) # With rate parameter stopLossGamma(d = 2, shape = 3, rate = 0.25) # With scale parameter meanExcessGamma(d = 2, shape = 3, scale = 4) # With rate parameter meanExcessGamma(d = 2, shape = 3, rate = 0.25) # With scale parameter VatRGamma(kap = .2, shape = 3, scale = 4) # With rate parameter VatRGamma(kap = .2, shape = 3, rate = 0.25) # With scale parameter TVatRGamma(kap = .2, shape = 3, scale = 4) # With rate parameter TVatRGamma(kap = .2, shape = 3, rate = 0.25) mgfGamma(t = 1, shape = 3, rate = 5)
Inverse Gaussian distribution with mean and shape parameter
.
expValIG(mean, shape = dispersion * mean^2, dispersion = shape/mean^2) varIG(mean, shape = dispersion * mean^2, dispersion = shape/mean^2) expValLimIG(d, mean, shape = dispersion * mean^2, dispersion = shape/mean^2) expValTruncIG( d, mean, shape = dispersion * mean^2, dispersion = shape/mean^2, less.than.d = TRUE ) stopLossIG(d, mean, shape = dispersion * mean^2, dispersion = shape/mean^2) meanExcessIG(d, mean, shape = dispersion * mean^2, dispersion = shape/mean^2) VatRIG(kap, mean, shape = dispersion * mean^2, dispersion = shape/mean^2) TVatRIG(kap, mean, shape = dispersion * mean^2, dispersion = shape/mean^2) mgfIG(t, mean, shape = dispersion * mean^2, dispersion = shape/mean^2)expValIG(mean, shape = dispersion * mean^2, dispersion = shape/mean^2) varIG(mean, shape = dispersion * mean^2, dispersion = shape/mean^2) expValLimIG(d, mean, shape = dispersion * mean^2, dispersion = shape/mean^2) expValTruncIG( d, mean, shape = dispersion * mean^2, dispersion = shape/mean^2, less.than.d = TRUE ) stopLossIG(d, mean, shape = dispersion * mean^2, dispersion = shape/mean^2) meanExcessIG(d, mean, shape = dispersion * mean^2, dispersion = shape/mean^2) VatRIG(kap, mean, shape = dispersion * mean^2, dispersion = shape/mean^2) TVatRIG(kap, mean, shape = dispersion * mean^2, dispersion = shape/mean^2) mgfIG(t, mean, shape = dispersion * mean^2, dispersion = shape/mean^2)
mean |
mean (location) parameter |
shape |
shape parameter |
dispersion |
alternative parameterization to the shape parameter, dispersion = 1 / rate. |
d |
cut-off value. |
less.than.d |
logical; if |
kap |
probability. |
t |
t. |
The Inverse Gaussian distribution with
Function :
expValIG gives the expected value.
varIG gives the variance.
expValLimIG gives the limited mean.
expValTruncIG gives the truncated mean.
stopLossIG gives the stop-loss.
meanExcessIG gives the mean excess loss.
VatRIG gives the Value-at-Risk.
TVatRIG gives the Tail Value-at-Risk.
mgfIG gives the moment generating function (MGF).
Invalid parameter values will return an error detailing which parameter is problematic.
Function VatRIG is a wrapper for the qinvgauss
function from the statmod package.
expValIG(mean = 2, shape = 5) varIG(mean = 2, shape = 5) expValLimIG(d = 2, mean = 2, shape = 5) expValTruncIG(d = 2, mean = 2, shape = 5) stopLossIG(d = 2, mean = 2, shape = 5) meanExcessIG(d = 2, mean = 2, shape = 5) VatRIG(kap = 0.99, mean = 2, shape = 5) TVatRIG(kap = 0.99, mean = 2, shape = 5) mgfIG(t = 1, mean = 2, shape = .5)expValIG(mean = 2, shape = 5) varIG(mean = 2, shape = 5) expValLimIG(d = 2, mean = 2, shape = 5) expValTruncIG(d = 2, mean = 2, shape = 5) stopLossIG(d = 2, mean = 2, shape = 5) meanExcessIG(d = 2, mean = 2, shape = 5) VatRIG(kap = 0.99, mean = 2, shape = 5) TVatRIG(kap = 0.99, mean = 2, shape = 5) mgfIG(t = 1, mean = 2, shape = .5)
Computes CDF and simulations of the independence copula.
cIndependent(u1, u2, ...) crIndependent(numberSimulations = 10000, seed = 42)cIndependent(u1, u2, ...) crIndependent(numberSimulations = 10000, seed = 42)
u1, u2
|
points at which to evaluate the copula. |
... |
other parameters. |
numberSimulations |
Number of simulations. |
seed |
Simulation seed, 42 by default. |
The independence copula has CDF :
for .
Function :
cIndependent returns the value of the copula.
crIndependent returns simulated values of the copula.
cIndependent(u1 = .76, u2 = 0.4) crIndependent(numberSimulations = 10, seed = 42)cIndependent(u1 = .76, u2 = 0.4) crIndependent(numberSimulations = 10, seed = 42)
Loglogistic distribution with shape parameter and scale
parameter .
dLlogis(x, shape, rate = 1/scale, scale = 1/rate) pLlogis(q, shape, rate = 1/scale, scale = 1/rate, lower.tail = TRUE) expValLlogis(shape, rate = 1/scale, scale = 1/rate) varLlogis(shape, rate = 1/scale, scale = 1/rate) kthMomentLlogis(k, shape, rate = 1/scale, scale = 1/rate) expValLimLlogis(d, shape, rate = 1/scale, scale = 1/rate) expValTruncLlogis(d, shape, rate = 1/scale, scale = 1/rate, less.than.d = TRUE) stopLossLlogis(d, shape, rate = 1/scale, scale = 1/rate) meanExcessLlogis(d, shape, rate = 1/scale, scale = 1/rate) VatRLlogis(kap, shape, rate = 1/scale, scale = 1/rate) TVatRLlogis(kap, shape, rate = 1/scale, scale = 1/rate)dLlogis(x, shape, rate = 1/scale, scale = 1/rate) pLlogis(q, shape, rate = 1/scale, scale = 1/rate, lower.tail = TRUE) expValLlogis(shape, rate = 1/scale, scale = 1/rate) varLlogis(shape, rate = 1/scale, scale = 1/rate) kthMomentLlogis(k, shape, rate = 1/scale, scale = 1/rate) expValLimLlogis(d, shape, rate = 1/scale, scale = 1/rate) expValTruncLlogis(d, shape, rate = 1/scale, scale = 1/rate, less.than.d = TRUE) stopLossLlogis(d, shape, rate = 1/scale, scale = 1/rate) meanExcessLlogis(d, shape, rate = 1/scale, scale = 1/rate) VatRLlogis(kap, shape, rate = 1/scale, scale = 1/rate) TVatRLlogis(kap, shape, rate = 1/scale, scale = 1/rate)
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. |
The loglogistic distribution with shape parameter and scale parameter
has density:
for , .
Function :
dLlogis gives the probability density function (PDF).
pLlogis gives the cumulative density function (CDF).
expValLlogis gives the expected value.
varLlogis gives the variance.
kthMomentLlogis gives the kth moment.
expValLimLlogis gives the limited mean.
expValTruncLlogis gives the truncated mean.
stopLossLlogis gives the stop-loss.
meanExcessLlogis gives the mean excess loss.
VatRLlogis gives the Value-at-Risk.
TVatRLlogis gives the Tail Value-at-Risk.
Invalid parameter values will return an error detailing which parameter is problematic.
dLlogis(x = 2, shape = 2, scale = 4) # With scale parameter pLlogis(q = 3, shape = 3, scale = 5) # With rate parameter pLlogis(q = 3, shape = 3, rate = 0.2) # Survival function pLlogis(q = 3, shape = 3, rate = 0.2, lower.tail = FALSE) expValLlogis(shape = 2, scale = 4) varLlogis(shape = 3, scale = 4) kthMomentLlogis(k = 3, shape = 5, scale = 4) expValLimLlogis(d = 2, shape = 2, scale = 4) # With rate parameter expValTruncLlogis(d = 2, shape = 2, scale = 4) # Values greater than d expValTruncLlogis(d = 2, shape = 2, scale = 4, less.than.d = FALSE) stopLossLlogis(d = 2, shape = 2, scale = 4) meanExcessLlogis(d = 3, shape = 2, scale = 4) # With scale parameter VatRLlogis(kap = .2, shape = 2, scale = 4) # With rate parameter VatRLlogis(kap = .2, shape = 2, rate = 0.25) # With scale parameter TVatRLlogis(kap = .2, shape = 3, scale = 4) # With rate parameter TVatRLlogis(kap = .2, shape = 3, rate = 0.25)dLlogis(x = 2, shape = 2, scale = 4) # With scale parameter pLlogis(q = 3, shape = 3, scale = 5) # With rate parameter pLlogis(q = 3, shape = 3, rate = 0.2) # Survival function pLlogis(q = 3, shape = 3, rate = 0.2, lower.tail = FALSE) expValLlogis(shape = 2, scale = 4) varLlogis(shape = 3, scale = 4) kthMomentLlogis(k = 3, shape = 5, scale = 4) expValLimLlogis(d = 2, shape = 2, scale = 4) # With rate parameter expValTruncLlogis(d = 2, shape = 2, scale = 4) # Values greater than d expValTruncLlogis(d = 2, shape = 2, scale = 4, less.than.d = FALSE) stopLossLlogis(d = 2, shape = 2, scale = 4) meanExcessLlogis(d = 3, shape = 2, scale = 4) # With scale parameter VatRLlogis(kap = .2, shape = 2, scale = 4) # With rate parameter VatRLlogis(kap = .2, shape = 2, rate = 0.25) # With scale parameter TVatRLlogis(kap = .2, shape = 3, scale = 4) # With rate parameter TVatRLlogis(kap = .2, shape = 3, rate = 0.25)
Lognormal distribution with mean and variance .
expValLnorm(meanlog, sdlog) varLnorm(meanlog, sdlog) kthMomentLnorm(k, meanlog, sdlog) expValLimLnorm(d, meanlog, sdlog) expValTruncLnorm(d, meanlog, sdlog, less.than.d = TRUE) stopLossLnorm(d, meanlog, sdlog) meanExcessLnorm(d, meanlog, sdlog) VatRLnorm(kap, meanlog, sdlog) TVatRLnorm(kap, meanlog, sdlog)expValLnorm(meanlog, sdlog) varLnorm(meanlog, sdlog) kthMomentLnorm(k, meanlog, sdlog) expValLimLnorm(d, meanlog, sdlog) expValTruncLnorm(d, meanlog, sdlog, less.than.d = TRUE) stopLossLnorm(d, meanlog, sdlog) meanExcessLnorm(d, meanlog, sdlog) VatRLnorm(kap, meanlog, sdlog) TVatRLnorm(kap, meanlog, sdlog)
meanlog |
location parameter |
sdlog |
standard deviation |
k |
kth-moment. |
d |
cut-off value. |
less.than.d |
logical; if |
kap |
probability. |
The Log-normal distribution with mean and standard deviation
has density:
for , .
Function :
expValLnorm gives the expected value.
varLnorm gives the variance.
kthMomentLnorm gives the kth moment.
expValLimLnorm gives the limited mean.
expValTruncLnorm gives the truncated mean.
stopLossLnorm gives the stop-loss.
meanExcessLnorm gives the mean excess loss.
VatRLnorm gives the Value-at-Risk.
TVatRLnorm gives the Tail Value-at-Risk.
Invalid parameter values will return an error detailing which parameter is problematic.
Function VatRLnorm is a wrapper of the qlnorm
function from the stats package.
expValLnorm(meanlog = 3, sdlog = 5) varLnorm(meanlog = 3, sdlog = 5) kthMomentLnorm(k = 2, meanlog = 3, sdlog = 5) expValLimLnorm(d = 2, meanlog = 2, sdlog = 5) expValTruncLnorm(d = 2, meanlog = 2, sdlog = 5) # Values greater than d expValTruncLnorm(d = 2, meanlog = 2, sdlog = 5, less.than.d = FALSE) stopLossLnorm(d = 2, meanlog = 2, sdlog = 5) meanExcessLnorm(d = 2, meanlog = 2, sdlog = 5) VatRLnorm(kap = 0.8, meanlog = 3, sdlog = 5) TVatRLnorm(kap = 0.8, meanlog = 2, sdlog = 5)expValLnorm(meanlog = 3, sdlog = 5) varLnorm(meanlog = 3, sdlog = 5) kthMomentLnorm(k = 2, meanlog = 3, sdlog = 5) expValLimLnorm(d = 2, meanlog = 2, sdlog = 5) expValTruncLnorm(d = 2, meanlog = 2, sdlog = 5) # Values greater than d expValTruncLnorm(d = 2, meanlog = 2, sdlog = 5, less.than.d = FALSE) stopLossLnorm(d = 2, meanlog = 2, sdlog = 5) meanExcessLnorm(d = 2, meanlog = 2, sdlog = 5) VatRLnorm(kap = 0.8, meanlog = 3, sdlog = 5) TVatRLnorm(kap = 0.8, meanlog = 2, sdlog = 5)
Logarithmic distribution with probability parameter .
dLogarithmic(x, prob) pLogarithmic(q, prob, lower.tail = TRUE) expValLogarithmic(prob) varLogarithmic(prob) VatRLogarithmic(kap, prob) mgfLogarithmic(t, prob) pgfLogarithmic(t, prob)dLogarithmic(x, prob) pLogarithmic(q, prob, lower.tail = TRUE) expValLogarithmic(prob) varLogarithmic(prob) VatRLogarithmic(kap, prob) mgfLogarithmic(t, prob) pgfLogarithmic(t, prob)
x, q
|
vector of quantiles. |
prob |
probability parameter |
lower.tail |
logical; if TRUE (default), probabilities are
|
kap |
probability. |
t |
t. |
The Logarithmic distribution with probability parameter
has probability mass function :
,
for ,
and ].
Function :
dLogarithmic gives the probability density function (PDF).
pLogarithmic gives the cumulative density function (CDF).
expValLogarithmic gives the expected value.
varLogarithmic gives the variance.
VatRLogarithmic gives the Value-at-Risk.
mgfLogarithmic gives the moment generating function (MGF).
pgfLogarithmic gives the probability generating function (MGF).
Invalid parameter values will return an error detailing which parameter is problematic.
dLogarithmic(x = 3, prob = 0.2) pLogarithmic(q = 3, prob = 0.2) expValLogarithmic(prob = 0.50) varLogarithmic(prob = 0.50) VatRLogarithmic(kap = 0.99, prob = 0.2) mgfLogarithmic(t = .2, prob = 0.50) pgfLogarithmic(t = .2, prob = 0.50)dLogarithmic(x = 3, prob = 0.2) pLogarithmic(q = 3, prob = 0.2) expValLogarithmic(prob = 0.50) varLogarithmic(prob = 0.50) VatRLogarithmic(kap = 0.99, prob = 0.2) mgfLogarithmic(t = .2, prob = 0.50) pgfLogarithmic(t = .2, prob = 0.50)
Negative binomial distribution with parameters (number of successful
trials) and (probability of success).
expValNBinom( size, prob = (1/(1 + beta)), beta = ((1 - prob)/prob), nb_tries = FALSE ) varNBinom( size, prob = (1/(1 + beta)), beta = ((1 - prob)/prob), nb_tries = FALSE ) mgfNBinom( t, size, prob = (1/(1 + beta)), beta = ((1 - prob)/prob), nb_tries = FALSE ) pgfNBinom( t, size, prob = (1/(1 + beta)), beta = ((1 - prob)/prob), nb_tries = FALSE )expValNBinom( size, prob = (1/(1 + beta)), beta = ((1 - prob)/prob), nb_tries = FALSE ) varNBinom( size, prob = (1/(1 + beta)), beta = ((1 - prob)/prob), nb_tries = FALSE ) mgfNBinom( t, size, prob = (1/(1 + beta)), beta = ((1 - prob)/prob), nb_tries = FALSE ) pgfNBinom( t, size, prob = (1/(1 + beta)), beta = ((1 - prob)/prob), nb_tries = FALSE )
size |
Number of successful trials. |
prob |
Probability of success in each trial. |
beta |
Alternative parameterization of the negative binomial distribution where beta = (1 - p) / p. |
nb_tries |
logical; if |
t |
t. |
When is the number of failures until the th success,
with a probability of a success, the negative binomial has density:
for
When is the number of trials until the th success,
with a probability of a success, the negative binomial has density:
for
The alternative parameterization of the negative binomial with parameter
, and being the number of trials, has density:
for
Function :
expValNBinom gives the expected value.
varNBinom gives the variance.
mgfNBinom gives the moment generating function (MGF).
pgfNBinom gives the probability generating function (PGF).
Invalid parameter values will return an error detailing which parameter is problematic.
# Where k is the number of trials for a rth success expValNBinom(size = 2, prob = .4) # Where k is the number of failures before a rth success expValNBinom(size = 2, prob = .4, nb_tries = TRUE) # With alternative parameterization where k is the number of trials expValNBinom(size = 2, beta = 1.5) # Where k is the number of trials for a rth success varNBinom(size = 2, prob = .4) # Where k is the number of failures before a rth success varNBinom(size = 2, prob = .4, nb_tries = TRUE) # With alternative parameterization where k is the number of trials varNBinom(size = 2, beta = 1.5) mgfNBinom(t = 1, size = 4, prob = 0.5) pgfNBinom(t = 5, size = 3, prob = 0.3)# Where k is the number of trials for a rth success expValNBinom(size = 2, prob = .4) # Where k is the number of failures before a rth success expValNBinom(size = 2, prob = .4, nb_tries = TRUE) # With alternative parameterization where k is the number of trials expValNBinom(size = 2, beta = 1.5) # Where k is the number of trials for a rth success varNBinom(size = 2, prob = .4) # Where k is the number of failures before a rth success varNBinom(size = 2, prob = .4, nb_tries = TRUE) # With alternative parameterization where k is the number of trials varNBinom(size = 2, beta = 1.5) mgfNBinom(t = 1, size = 4, prob = 0.5) pgfNBinom(t = 5, size = 3, prob = 0.3)
Normal distribution
expValNorm(mean, sd) varNorm(mean, sd) expValLimNorm(d, mean = 0, sd = 1) expValTruncNorm(d, mean = 0, sd = 1, less.than.d = TRUE) stopLossNorm(d, mean = 0, sd = 1) meanExcessNorm(d, mean = 0, sd = 1) VatRNorm(kap, mean = 0, sd = 1) TVatRNorm(kap, mean = 0, sd = 1) mgfNorm(t, mean = 0, sd = 1)expValNorm(mean, sd) varNorm(mean, sd) expValLimNorm(d, mean = 0, sd = 1) expValTruncNorm(d, mean = 0, sd = 1, less.than.d = TRUE) stopLossNorm(d, mean = 0, sd = 1) meanExcessNorm(d, mean = 0, sd = 1) VatRNorm(kap, mean = 0, sd = 1) TVatRNorm(kap, mean = 0, sd = 1) mgfNorm(t, mean = 0, sd = 1)
mean |
mean (location) parameter |
sd |
standard deviation |
d |
cut-off value. |
less.than.d |
logical; if |
kap |
probability. |
t |
t. |
The Normal distribution with mean and standard deviation
has density:
for , .
Function :
expValNorm gives the expected value.
varNorm gives the variance.
expValLimNorm gives the limited mean.
expValTruncNorm gives the truncated mean.
stopLossNorm gives the stop-loss.
meanExcessNorm gives the mean excess loss.
VatRNorm gives the Value-at-Risk.
TVatRNorm gives the Tail Value-at-Risk.
mgfNorm gives the moment generating function (MGF).
Invalid parameter values will return an error detailing which parameter is problematic.
Function VatRNorm is a wrapper of the qnorm
function from the stats package.
expValNorm(mean = 3, sd = 5) varNorm(mean = 3, sd = 5) expValLimNorm(d = 2, mean = 2, sd = 5) expValTruncNorm(d = 2, mean = 2, sd = 5) stopLossNorm(d = 2, mean = 2, sd = 5) meanExcessNorm(d = 2, mean = 2, sd = 5) VatRNorm(kap = 0.8, mean = 3, sd = 5) TVatRNorm(kap = 0.8, mean = 2, sd = 5) mgfNorm(t = 1, mean = 3, sd = 5)expValNorm(mean = 3, sd = 5) varNorm(mean = 3, sd = 5) expValLimNorm(d = 2, mean = 2, sd = 5) expValTruncNorm(d = 2, mean = 2, sd = 5) stopLossNorm(d = 2, mean = 2, sd = 5) meanExcessNorm(d = 2, mean = 2, sd = 5) VatRNorm(kap = 0.8, mean = 3, sd = 5) TVatRNorm(kap = 0.8, mean = 2, sd = 5) mgfNorm(t = 1, mean = 3, sd = 5)
Pareto distribution with shape parameter and rate
parameter .
dPareto(x, shape, rate = 1/scale, scale = 1/rate) pPareto(q, shape, rate = 1/scale, scale = 1/rate, lower.tail = TRUE) expValPareto(shape, rate = 1/scale, scale = 1/rate) varPareto(shape, rate = 1/scale, scale = 1/rate) kthMomentPareto(k, shape, rate = 1/scale, scale = 1/rate) expValLimPareto(d, shape, rate = 1/scale, scale = 1/rate) expValTruncPareto(d, shape, rate = 1/scale, scale = 1/rate, less.than.d = TRUE) stopLossPareto(d, shape, rate = 1/scale, scale = 1/rate) meanExcessPareto(d, shape, rate = 1/scale, scale = 1/rate) VatRPareto(kap, shape, rate = 1/scale, scale = 1/rate) TVatRPareto(kap, shape, rate = 1/scale, scale = 1/rate)dPareto(x, shape, rate = 1/scale, scale = 1/rate) pPareto(q, shape, rate = 1/scale, scale = 1/rate, lower.tail = TRUE) expValPareto(shape, rate = 1/scale, scale = 1/rate) varPareto(shape, rate = 1/scale, scale = 1/rate) kthMomentPareto(k, shape, rate = 1/scale, scale = 1/rate) expValLimPareto(d, shape, rate = 1/scale, scale = 1/rate) expValTruncPareto(d, shape, rate = 1/scale, scale = 1/rate, less.than.d = TRUE) stopLossPareto(d, shape, rate = 1/scale, scale = 1/rate) meanExcessPareto(d, shape, rate = 1/scale, scale = 1/rate) VatRPareto(kap, shape, rate = 1/scale, scale = 1/rate) TVatRPareto(kap, shape, rate = 1/scale, scale = 1/rate)
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. |
The Pareto distribution with rate parameter as well as shape
parameter has density:
for , .
Function :
dPareto gives the probability density function (PDF).
pPareto gives the cumulative density function (CDF).
expValPareto gives the expected value.
varPareto gives the variance.
kthMomentPareto gives the kth moment.
expValLimPareto gives the limited mean.
expValTruncPareto gives the truncated mean.
stopLossPareto gives the stop-loss.
meanExcessPareto gives the mean excess loss.
VatRPareto gives the Value-at-Risk.
TVatRPareto gives the Tail Value-at-Risk.
Invalid parameter values will return an error detailing which parameter is problematic.
# With scale parameter dPareto(x = 2, shape = 2, scale = 5) # With rate parameter dPareto(x = 2, shape = 2, rate = .20) # With scale parameter pPareto(q = 2, shape = 2, scale = 5) # With rate parameter pPareto(q = 2, shape = 2, rate = 0.20) # Survival function pPareto(q = 2, shape = 2, rate = 0.20, lower.tail = FALSE) # With scale parameter expValPareto(shape = 5, scale = 0.5) # With rate parameter expValPareto(shape = 5, rate = 2) # With scale parameter varPareto(shape = 5, scale = 0.5) # With rate parameter varPareto(shape = 5, rate = 2) # With scale parameter kthMomentPareto(k = 4, shape = 5, scale = 0.5) # With rate parameter kthMomentPareto(k = 4, shape = 5, rate = 2) # With scale parameter expValLimPareto(d = 4, shape = 5, scale = 0.5) # With rate parameter expValLimPareto(d = 4, shape = 5, rate = 2) # With scale parameter expValTruncPareto(d = 4, shape = 5, scale = 0.5) # With rate parameter expValTruncPareto(d = 4, shape = 5, rate = 2) # With scale parameter stopLossPareto(d = 2, shape = 5, scale = 0.5) # With rate parameter stopLossPareto(d = 2, shape = 5, rate = 2) # With scale parameter meanExcessPareto(d = 6, shape = 5, scale = 0.5) # With rate parameter meanExcessPareto(d = 6, shape = 5, rate = 2) # With scale parameter VatRPareto(kap = .99, shape = 5, scale = 0.5) # With rate parameter VatRPareto(kap = .99, shape = 5, rate = 2) # With scale parameter TVatRPareto(kap = .99, shape = 5, scale = 0.5) # With rate parameter TVatRPareto(kap = .99, shape = 5, rate = 2)# With scale parameter dPareto(x = 2, shape = 2, scale = 5) # With rate parameter dPareto(x = 2, shape = 2, rate = .20) # With scale parameter pPareto(q = 2, shape = 2, scale = 5) # With rate parameter pPareto(q = 2, shape = 2, rate = 0.20) # Survival function pPareto(q = 2, shape = 2, rate = 0.20, lower.tail = FALSE) # With scale parameter expValPareto(shape = 5, scale = 0.5) # With rate parameter expValPareto(shape = 5, rate = 2) # With scale parameter varPareto(shape = 5, scale = 0.5) # With rate parameter varPareto(shape = 5, rate = 2) # With scale parameter kthMomentPareto(k = 4, shape = 5, scale = 0.5) # With rate parameter kthMomentPareto(k = 4, shape = 5, rate = 2) # With scale parameter expValLimPareto(d = 4, shape = 5, scale = 0.5) # With rate parameter expValLimPareto(d = 4, shape = 5, rate = 2) # With scale parameter expValTruncPareto(d = 4, shape = 5, scale = 0.5) # With rate parameter expValTruncPareto(d = 4, shape = 5, rate = 2) # With scale parameter stopLossPareto(d = 2, shape = 5, scale = 0.5) # With rate parameter stopLossPareto(d = 2, shape = 5, rate = 2) # With scale parameter meanExcessPareto(d = 6, shape = 5, scale = 0.5) # With rate parameter meanExcessPareto(d = 6, shape = 5, rate = 2) # With scale parameter VatRPareto(kap = .99, shape = 5, scale = 0.5) # With rate parameter VatRPareto(kap = .99, shape = 5, rate = 2) # With scale parameter TVatRPareto(kap = .99, shape = 5, scale = 0.5) # With rate parameter TVatRPareto(kap = .99, shape = 5, rate = 2)
Poisson distribution with rate parameter .
expValPois(lambda) varPois(lambda) expValTruncPois(d, lambda, k0, less.than.d = TRUE) TVatRPois(kap, lambda, k0) mgfPois(t, lambda) pgfPois(t, lambda)expValPois(lambda) varPois(lambda) expValTruncPois(d, lambda, k0, less.than.d = TRUE) TVatRPois(kap, lambda, k0) mgfPois(t, lambda) pgfPois(t, lambda)
lambda |
Rate parameter |
d |
cut-off value. |
k0 |
point up to which to sum the distribution for the approximation. |
less.than.d |
logical; if |
kap |
probability. |
t |
t. |
The Poisson distribution with rate parameter
has probability mass function :
for , and
Function :
expValPois gives the expected value.
varPois gives the variance.
expValTruncPois gives the truncated mean.
TVatRPois gives the Tail Value-at-Risk.
mgfPois gives the moment generating function (MGF).
pgfPois gives the probability generating function (PGF).
Invalid parameter values will return an error detailing which parameter is problematic.
expValPois(lambda = 3) varPois(lambda = 3) expValTruncPois(d = 0, lambda = 2, k0 = 2E2, less.than.d = FALSE) expValTruncPois(d = 2, lambda = 2, k0 = 2E2, less.than.d = TRUE) TVatRPois(kap = 0.8, lambda = 3, k0 = 2E2) mgfPois(t = 1, lambda = 3) pgfPois(t = 1, lambda = 3)expValPois(lambda = 3) varPois(lambda = 3) expValTruncPois(d = 0, lambda = 2, k0 = 2E2, less.than.d = FALSE) expValTruncPois(d = 2, lambda = 2, k0 = 2E2, less.than.d = TRUE) TVatRPois(kap = 0.8, lambda = 3, k0 = 2E2) mgfPois(t = 1, lambda = 3) pgfPois(t = 1, lambda = 3)
Uniform distribution with min and max .
expValUnif(min = 0, max = 1) varUnif(min = 0, max = 1) kthMomentUnif(k, min = 0, max = 1) expValLimUnif(d, min = 0, max = 1) expValTruncUnif(d, min = 0, max = 1, less.than.d = TRUE) stopLossUnif(d, min = 0, max = 1) meanExcessUnif(d, min = 0, max = 1) VatRUnif(kap, min = 0, max = 1) TVatRUnif(kap, min = 0, max = 1) mgfUnif(t, min = 0, max = 1)expValUnif(min = 0, max = 1) varUnif(min = 0, max = 1) kthMomentUnif(k, min = 0, max = 1) expValLimUnif(d, min = 0, max = 1) expValTruncUnif(d, min = 0, max = 1, less.than.d = TRUE) stopLossUnif(d, min = 0, max = 1) meanExcessUnif(d, min = 0, max = 1) VatRUnif(kap, min = 0, max = 1) TVatRUnif(kap, min = 0, max = 1) mgfUnif(t, min = 0, max = 1)
min, max
|
lower and upper limits of the distribution. Must be finite. |
k |
kth-moment. |
d |
cut-off value. |
less.than.d |
logical; if |
kap |
probability. |
t |
t. |
The (continuous) uniform distribution with min and max parameters
and respectively has density:
for .
Function :
expValUnif gives the expected value.
varUnif gives the variance.
kthMomentUnif gives the kth moment.
expValLimUnif gives the limited mean.
expValTruncUnif gives the truncated mean.
stopLossUnif gives the stop-loss.
meanExcessUnif gives the mean excess loss.
VatRUnif gives the Value-at-Risk.
TVatRUnif gives the Tail Value-at-Risk.
Invalid parameter values will return an error detailing which parameter is problematic.
expValUnif(min = 3, max = 4) varUnif(min = 3, max = 4) kthMomentUnif(k = 2, min = 3, max = 4) expValLimUnif(d = 3, min = 2, max = 4) expValTruncUnif(d = 3, min = 2, max = 4) # Values greather than d expValTruncUnif(d = 3, min = 2, max = 4, less.than.d = FALSE) stopLossUnif(d = 3, min = 2, max = 4) meanExcessUnif(d = 2, min = 2, max = 4) VatRUnif(kap = .99, min = 3, max = 4) TVatRUnif(kap = .99, min = 3, max = 4) mgfUnif(t = 2, min = 0, max = 1)expValUnif(min = 3, max = 4) varUnif(min = 3, max = 4) kthMomentUnif(k = 2, min = 3, max = 4) expValLimUnif(d = 3, min = 2, max = 4) expValTruncUnif(d = 3, min = 2, max = 4) # Values greather than d expValTruncUnif(d = 3, min = 2, max = 4, less.than.d = FALSE) stopLossUnif(d = 3, min = 2, max = 4) meanExcessUnif(d = 2, min = 2, max = 4) VatRUnif(kap = .99, min = 3, max = 4) TVatRUnif(kap = .99, min = 3, max = 4) mgfUnif(t = 2, min = 0, max = 1)
Discrete uniform distribution with min and max .
pUnifD(q, min = 0, max = 1) dUnifD(x, min = 0, max = 1) varUnifD(min = 0, max = 1) expValUnifD(min = 0, max = 1)pUnifD(q, min = 0, max = 1) dUnifD(x, min = 0, max = 1) varUnifD(min = 0, max = 1) expValUnifD(min = 0, max = 1)
min, max
|
lower and upper limits of the distribution. Must be finite. |
x, q
|
vector of quantiles. |
The (discrete) uniform distribution with min and max parameters
and respectively has density:
for .
Function :
dUnifD gives the probability density function (PDF).
pUnifD gives the cumulative density function (CDF).
expValUnifD gives the expected value.
varUnifD gives the variance.
Invalid parameter values will return an error detailing which parameter is problematic.
pUnifD(q = 0.2, min = 0, max = 1) dUnifD(min = 0, max = 1) varUnifD(min = 0, max = 1) expValUnifD(min = 0, max = 1)pUnifD(q = 0.2, min = 0, max = 1) dUnifD(min = 0, max = 1) varUnifD(min = 0, max = 1) expValUnifD(min = 0, max = 1)
Weibull distribution with shape parameter and rate parameter
.
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)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)
shape |
shape parameter |
rate |
rate parameter |
scale |
alternative parameterization to the rate parameter, scale = 1 / rate. |
k |
kth-moment. |
d |
cut-off value. |
less.than.d |
logical; if |
kap |
probability. |
The Weibull distribution with shape parameter and rate parameter
has density:
for , ,
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.
# With scale parameter expValWeibull(shape = 2, scale = 5) # With rate parameter expValWeibull(shape = 2, rate = 0.2) # With scale parameter varWeibull(shape = 2, scale = 5) # With rate parameter varWeibull(shape = 2, rate = 0.2) # With scale parameter kthMomentWeibull(k = 2, shape = 2, scale = 5) # With rate parameter kthMomentWeibull(k = 2, shape = 2, rate = 0.2) # With scale parameter expValLimWeibull(d = 2, shape = 2, scale = 5) # With rate parameter expValLimWeibull(d = 2, shape = 2, rate = 0.2) # With scale parameter expValTruncWeibull(d = 2, shape = 2, scale = 5) # With rate parameter expValTruncWeibull(d = 2, shape = 2, rate = 0.2) # Mean of values greater than d expValTruncWeibull(d = 2, shape = 2, rate = 0.2, less.than.d = FALSE) # With scale parameter stopLossWeibull(d = 2, shape = 3, scale = 4) # With rate parameter stopLossWeibull(d = 2, shape = 3, rate = 0.25) # With scale parameter meanExcessWeibull(d = 2, shape = 3, scale = 4) # With rate parameter meanExcessWeibull(d = 2, shape = 3, rate = 0.25) # With scale parameter VatRWeibull(kap = .2, shape = 3, scale = 4) # With rate parameter VatRWeibull(kap = .2, shape = 3, rate = 0.25) # With scale parameter TVatRWeibull(kap = .2, shape = 3, scale = 4) # With rate parameter TVatRWeibull(kap = .2, shape = 3, rate = 0.25)# With scale parameter expValWeibull(shape = 2, scale = 5) # With rate parameter expValWeibull(shape = 2, rate = 0.2) # With scale parameter varWeibull(shape = 2, scale = 5) # With rate parameter varWeibull(shape = 2, rate = 0.2) # With scale parameter kthMomentWeibull(k = 2, shape = 2, scale = 5) # With rate parameter kthMomentWeibull(k = 2, shape = 2, rate = 0.2) # With scale parameter expValLimWeibull(d = 2, shape = 2, scale = 5) # With rate parameter expValLimWeibull(d = 2, shape = 2, rate = 0.2) # With scale parameter expValTruncWeibull(d = 2, shape = 2, scale = 5) # With rate parameter expValTruncWeibull(d = 2, shape = 2, rate = 0.2) # Mean of values greater than d expValTruncWeibull(d = 2, shape = 2, rate = 0.2, less.than.d = FALSE) # With scale parameter stopLossWeibull(d = 2, shape = 3, scale = 4) # With rate parameter stopLossWeibull(d = 2, shape = 3, rate = 0.25) # With scale parameter meanExcessWeibull(d = 2, shape = 3, scale = 4) # With rate parameter meanExcessWeibull(d = 2, shape = 3, rate = 0.25) # With scale parameter VatRWeibull(kap = .2, shape = 3, scale = 4) # With rate parameter VatRWeibull(kap = .2, shape = 3, rate = 0.25) # With scale parameter TVatRWeibull(kap = .2, shape = 3, scale = 4) # With rate parameter TVatRWeibull(kap = .2, shape = 3, rate = 0.25)