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"
)

## Arguments

x vector of quantiles. Number of successful trials. Probability of success in each trial. shape parameter $$\alpha$$, must be positive. rate parameter $$\beta$$, must be positive. alternative parameterization to the rate parameter, scale = 1 / rate. point up to which to sum the distribution for the approximation. Choice of severity distribution. "gamma" (default) "lognormal" only for the expected value and variance. probability. Value-at-Risk (VaR) calculated at the given probability kap.

## Value

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.

## Details

The compound negative binomial distribution has density ....

## Examples

pCompNBinom(x = 2, size = 1, prob = 0.2, shape = log(1000) - 0.405,
rate = 0.9^2, k0 = 1E2, distr_severity = "Gamma")#>  0.2004906

expValCompNBinom(size = 4, prob = 0.2, shape = 0, scale = 1,
distr_severity = "Lognormal")#>  26.37954
varCompNBinom(size = 1, prob = 0.2, shape = log(1000) - 0.405, rate = 0.9^2,
distr_severity = "Lognormale")#>  5011632
VatRCompNBinom(kap = 0.9, size = 1, prob = 0.2, shape = 0.59,
rate = 0.9^2, k0 = 1E2, distr_severity = "Gamma")#>  7.833102
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")#>  11.75336