[R] hypergeometric

Robin Hankin rksh1 at cam.ac.uk
Wed Dec 3 12:20:16 CET 2008


The hypergeo package should be able to deal with this,
although the function you specify below looks like a degenerate case
(if I understand it correctly) so the convergence rate
is likely to be slow.

Let me know how you get on

best wishes

Robin (author of hypergeo)




Jarle Brinchmann wrote:
> The dhyper etc deal with the hypergeometric _distribution_ while what
> you appear to want have is the hypergeometric special function (the
> connection is that the regular  hypergeometric function is the
> generating function for the hypergeometric distribution if I recall
> correctly).
>
> Anyway, what you need, I believe, is the hypergeo library from CRAN.
>
>                  Cheers,
>                      Jarle.
>
> On Wed, Dec 3, 2008 at 9:17 AM, Zakaria, Roslinazairimah - zakry001
> <Roslinazairimah.Zakaria at postgrads.unisa.edu.au> wrote:
>   
>> Hi,
>>
>>
>>
>> I hope somebody can help me on how to use the hypergeometric function.
>> I did read through the R documentation on hypergeometric but not really
>> sure what it means.
>>
>>
>>
>> I would like to evaluate the hypergeometric function as follows:
>>
>> F((2*alpha+1)/2, (2*alpha+2)/2 , alpha+1/2, betasq/etasq).
>>
>>
>>
>> I'm not sure which function should be used- either phyper or  qhyper or
>> dhyper
>>
>>
>>
>> Where
>>
>> alpha <- .75; beta1 <- 7 ; beta2 <- 5.5;
>>
>> etasq <- ((beta1+beta2)/(2*beta1*beta2*(1-rho))) ^2
>>
>> betasq <-
>> ((beta1-beta2)^2+4*beta1*beta2*rho)/(4*beta1^2*beta2^2*(1-rho)^2)
>>
>>
>>
>> Thank you so much for your help.
>>
>>
>>
>>     


-- 
Robin K. S. Hankin
Uncertainty Analyst
University of Cambridge
19 Silver Street
Cambridge CB3 9EP
01223-764877



More information about the R-help mailing list