BEhypergeo function

Barnes Extended Hypergeometric Function

Barnes Extended Hypergeometric Function

This function computes the Barnes Extended Hypergeometric function, which in lmomco is useful in applications involving expectations of order statistics for the Generalized Exponential Poisson (GEP) distribution (see lmomgep). The function is [REMOVE_ME]Fp,q(n,d;λ)=k=0λkΓ(k+1)Πi=1pΓ(ni+k)Γ1(ni)Πi=1qΓ(di+k)Γ1(di)\mbox,[REMOVEME2] F_{p,q}(\bm{\mathrm{n}},\bm{\mathrm{d}}; \lambda) = \sum_{k=0}^\infty \frac{\lambda^k}{\Gamma(k+1)}\frac{\Pi_{i=1}^{p} \Gamma(n_i + k)\Gamma^{-1}{(n_i)}}{\Pi_{i=1}^{q} \Gamma(d_i + k)\Gamma^{-1}{(d_i)}}\mbox{,} [REMOVE_ME_2]

where n=[n1,n2,,np]\bm{\mathrm{n}} = [n_1, n_2, \ldots, n_p] for pp operands and d=[d1,d2,,dq]\bm{\mathrm{d}} = [d_1, d_2, \ldots, d_q] for qq operands, and λ>0\lambda > 0 is a parameter.

Description

This function computes the Barnes Extended Hypergeometric function, which in lmomco is useful in applications involving expectations of order statistics for the Generalized Exponential Poisson (GEP) distribution (see lmomgep). The function is

Fp,q(n,d;λ)=k=0λkΓ(k+1)Πi=1pΓ(ni+k)Γ1(ni)Πi=1qΓ(di+k)Γ1(di)\mbox, F_{p,q}(\bm{\mathrm{n}},\bm{\mathrm{d}}; \lambda) = \sum_{k=0}^\infty \frac{\lambda^k}{\Gamma(k+1)}\frac{\Pi_{i=1}^{p} \Gamma(n_i + k)\Gamma^{-1}{(n_i)}}{\Pi_{i=1}^{q} \Gamma(d_i + k)\Gamma^{-1}{(d_i)}}\mbox{,}

where n=[n1,n2,,np]\bm{\mathrm{n}} = [n_1, n_2, \ldots, n_p] for pp operands and d=[d1,d2,,dq]\bm{\mathrm{d}} = [d_1, d_2, \ldots, d_q] for qq operands, and λ>0\lambda > 0 is a parameter.

BEhypergeo(p,q, N,D, lambda, eps=1E-12, maxit=500)

Arguments

  • p: An integer value.
  • q: An integer value.
  • N: A scalar or vector associated with the pp summation (see Details).
  • D: A scalar or vector associated with the qq summation (see Details).
  • lambda: A real value λ>0\lambda > 0.
  • eps: The relative convergence error on which to break an infinite loop.
  • maxit: The maximum number of interations before a mandatory break on the loop, and a warning will be issued.

Details

For the GEP both n\bm{\mathrm{n}} and d\bm{\mathrm{d}} are vectors of the same value, such as n=[1,,1]\bm{\mathrm{n}} = [1, \ldots, 1] and d=[2,,2]\bm{\mathrm{d}} = [2, \ldots, 2]. This implementation is built around this need by the GEP and if the length of either vector is not equal to the operand then the first value of the vector is repeated the operand times. For example for n\bm{\mathrm{n}}, if n = 1, then n = rep(n[1], length(p)) and so on for d\bm{\mathrm{d}}. Given that n and d are vectorized for the GEP, then a shorthand is used for the GEP mathematics shown herein:

F2212(h(j+1))F2,2([1,,1],[2,,2];h(j+1))\mbox, F^{12}_{22}(h(j+1)) \equiv F_{2,2}([1,\ldots,1], [2,\ldots,2]; h(j+1))\mbox{,}

for the hh parameter of the distribution.

Lastly, for lmomco and the GEP the arguments only involve p=q=2p = q = 2 and N=1N = 1, D=2D = 2, so the function is uniquely a function of the hh parameter of the distribution:

H <- 10^seq(-10,10, by=0.01)
  F22 <- sapply(1:length(H), function(i) BEhypergeo(2,2,1,1, H[i])$value
  plot(log10(H), log10(F22), type="l")

For this example, the solution increasingly wobbles towards large hh, which is further explored by

plot(log10(H[1:(length(H)-1)]), diff(log10(F22)), type="l", xlim=c(0,7))
  plot(log10(H[H > 75 & H < 140]), c(NA,diff(log10(F22[H > 75 & H < 140]))),
  type="b"); lines(c(2.11,2.11), c(0,10))

It can be provisionally concluded that the solution to F2212()F^{12}_{22}(\cdot) begins to be suddenly questionable because of numerical difficulties beyond log(h)=2.11\log(h) = 2.11. Therefore, it is given that h<128h < 128 might be an operational numerical upper limit.

Returns

An list is returned.

  • value: The value for the function.

  • its: The number of iterations jj.

  • error: The error of convergence.

Author(s)

W.H. Asquith

References

Kus, C., 2007, A new lifetime distribution: Computational Statistics and Data Analysis, v. 51, pp. 4497--4509.

See Also

lmomgep

Examples

BEhypergeo(2,2,1,2,1.5)