cfN_Waring | R Documentation |
cfN_Waring(t,a,b,r)
evaluates the characteristic function cf(t)
of the
Waring distribution, with the parameters a
(a > 0), b
(b > 0), and r
(r > 0), i.e.
cf(t) = cfN_Waring(t,a,b,r) = ((gamma(a+r)*gamma(a+b)) / (gamma(a)*gamma(a+b+r)))* 2F1(r,b,a+b+r,e^(1i*t))
;
where 2F1 denotes the Gauss hypergeometric function. The Waring distribution is also known as beta negative binomial distribution. For
more details see [4], p. 643
cfN_Waring(t, a, b, r, cfX)
t |
vector or array of real values, where the CF is evaluated |
a |
vector of the 'shape' parameters |
b |
vector of the 'shape' parameters |
r |
number of successes until the experiment is stopped (integer but can be extended to real). |
cfX |
function. |
Characteristic function cf(t)
of the Waring distribution.
Ver.: 31-Jul-2021 12:47:54 (consistent with Matlab CharFunTool v1.5.1, 15-Nov-2016 13:36:26).
[1] WITKOVSKY V., WIMMER G., DUBY T. (2016). Computing the aggregate loss distribution based on numerical inversion of the compound empirical characteristic function of frequency and severity. Preprint submitted to Insurance: Mathematics and Economics.
[2] DUBY T., WIMMER G., WITKOVSKY V.(2016). MATLAB toolbox CRM for computing distributions of collective risk models. Preprint submitted to Journal of Statistical Software.
[3] WITKOVSKY V. (2016). Numerical inversion of a characteristic function: An alternative tool to form the probability distribution of output quantity in linear measurement models. Acta IMEKO, 5(3), 32-44.
[4] WIMMER G., ALTMANN G. (1999). Thesaurus of univariate discrete probability distributions. STAMM Verlag GmbH, Essen, Germany. ISBN 3-87773-025-6.
For more details see WIKIPEDIA: https://en.wikipedia.org/wiki/Beta_negative_binomial_distribution
Other Discrete Probability Distribution:
cfN_Binomial()
,
cfN_Delaporte()
,
cfN_GeneralizedPoisson()
,
cfN_Geometric()
,
cfN_Logarithmic()
,
cfN_NegativeBinomial()
,
cfN_Poisson()
,
cfN_PolyaEggenberger()
,
cfN_Quinkert()
## EXAMPLE1
# CF of the Waring distribution with a = 2.2, b = 3.3, r = 4
# The CF is not computed correctly!! Because the hypergeomtric function
# Hypergeom2F1(r,b,a+b+r,z) does not converege abs(z)>=1. Here z = exp(1i*t),
# ans abs(exp(1i*t)) = 1.
a <- 2.2
b <- 3.3
r <- 4
t <- seq(from = -5,
to = 5,
length.out =1001)
plotReIm(function(t)
cfN_Waring(t, a, b, r),
t,
title = "CF of the Waring distribution with a = 2.2, b = 3.3, r = 4")
##EXAMPLE2
#CF of the compound Waring-Exponential distribution
a <- 2.2
b <- 3.3
r <- 4
lambda <- 5
cfX <- function(t)
cfX_Exponential(t,lambda)
t <- seq(-10,10,length.out = 501)
plotReIm(function(t)
cfN_Waring(t, a, b, r, cfX),
t,
title = "CF of the compound Waring-Exponential distribution")
##EXAMPLE3
# PDF/CDF of the compound Waring-Exponential distribution
a <- 2.2
b <- 3.3
r <- 4
lambda <- 5;
cfX <- function(t)
cfX_Exponential(t,lambda)
cf <- function(t)
cfN_Waring(t, a, b, r, cfX)
x <- seq(0,35, length.out= 101)
prob <- c(0.9, 0.95, 0.99)
options <- list()
options$isCompound = TRUE
result <- cf2DistGP(cf,x,prob,options)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.