Computes various risk measures (mean, variance, Value-at-Risk (VaR), and Tail Value-at-Risk (TVaR)) for the compound Negative Binomial distribution.
p_BNCOMP(
x,
size,
prob,
shape,
rate = 1/scale,
scale = 1/rate,
k0,
distr_severity = "Gamma"
)E_BNCOMP(
size,
prob,
shape,
rate = 1/scale,
scale = 1/rate,
distr_severity = "Gamma"
)
V_BNCOMP(
size,
prob,
shape,
rate = 1/scale,
scale = 1/rate,
distr_severity = "Gamma"
)
VaR_BNCOMP(
kap,
size,
prob,
shape,
rate = 1/scale,
scale = 1/rate,
k0,
distr_severity = "Gamma"
)
TVaR_BNCOMP(
kap,
vark,
size,
prob,
shape,
rate = 1/scale,
scale = 1/rate,
k0,
distr_severity = "Gamma"
)
quantile.
Number of successful trials.
Probability of success in each trial.
shape parameter
alternative parameterization to 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.
Function :
p_BNCOMP
gives the cumulative density function.
E_BNCOMP
gives the expected value.
V_BNCOMP
gives the variance.
TVaR_BNCOMP
gives the Tail Value-at-Risk.
VaR_BNCOMP
gives the Value-at-Risk.
Returned values are approximations for the cumulative density function, TVaR, and VaR.
The compound Negative Binomial Distribution has density ....
# NOT RUN {
p_BNCOMP(x = 2, size = 1, prob = 0.2, shape = log(1000) - 0.405,
rate = 0.9^2, k0 = 1E2, distr_severity = "Gamma")
E_BNCOMP(size = 4, prob = 0.2, shape = 0, scale = 1,
distr_severity = "Lognormal")
V_BNCOMP(size = 1, prob = 0.2, shape = log(1000) - 0.405, rate = 0.9^2,
distr_severity = "Lognormale")
VaR_BNCOMP(kap = 0.9, size = 1, prob = 0.2, shape = 0.59,
rate = 0.9^2, k0 = 1E2, distr_severity = "Gamma")
vark_calc <- VaR_BNCOMP(kap = 0.9, size = 1, prob = 0.2, shape = 0.59,
rate = 0.9^2, k0 = 1E2, distr_severity = "Gamma")
TVaR_BNCOMP(kap = 0.9, size = 1, prob = 0.2, shape = 0.59, rate = 0.9^2,
vark = vark_calc, k0 = 1E2, distr_severity = "Gamma")
# }
Run the code above in your browser using DataLab