Learn R Programming

BMS (version 0.3.4)

f21hyper: Gaussian Hypergeometric Function F(a,b,c,z)

Description

Computes the value of a Gaussian hypergeometric function $ F(a,b,c,z) $ for $-1 \leq z \leq 1$ and $a,b,c \geq 0$

Usage

f21hyper(a, b, c, z)

Arguments

a
The parameter a of the Gaussian hypergeometric function, must be a positive scalar here
b
The parameter b of the Gaussian hypergeometric function, must be a positive scalar here
c
The parameter c of the Gaussian hypergeometric function, must be a positive scalar here
z
The parameter z of the Gaussian hypergeometric function, must be between -1 and 1 here

Value

The value of the Gaussian hypergeometric function $ F(a,b,c,z) $

Details

The function f21hyper complements the analysis of the 'hyper-g prior' introduced by Liang et al. (2008). For parameter values, compare cf. http://en.wikipedia.org/wiki/Hypergeometric_function#The_series_2F1.

References

Liang F., Paulo R., Molina G., Clyde M., Berger J.(2008): Mixtures of g-priors for Bayesian variable selection. J. Am. Statist. Assoc. 103, p. 410-423

http://en.wikipedia.org/wiki/Hypergeometric_function#The_series_2F1

See Also

package hypergeo for a more proficient implementation.

Check http://bms.zeugner.eu for additional help.

Examples

Run this code
  
  f21hyper(30,1,20,.8) #returns about 165.8197
  
  f21hyper(30,10,20,0) #returns one
  
  f21hyper(10,15,20,-0.1) # returns about 0.4872972

Run the code above in your browser using DataLab