[R] Ratio of gammas

Ravi Varadhan RVaradhan at jhmi.edu
Wed Aug 27 17:32:41 CEST 2008

This will work:

exp( lgamma(nu/2) - lgamma((nu+1)/2) ) 



Ravi Varadhan, Ph.D.

Assistant Professor, The Center on Aging and Health

Division of Geriatric Medicine and Gerontology 

Johns Hopkins University

Ph: (410) 502-2619

Fax: (410) 614-9625

Email: rvaradhan at jhmi.edu

Webpage:  http://www.jhsph.edu/agingandhealth/People/Faculty/Varadhan.html



-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On
Behalf Of Erwann.Rogard at sanofi-aventis.com
Sent: Wednesday, August 27, 2008 11:14 AM
To: r-help at r-project.org
Subject: [R] Ratio of gammas


gamma(a) works fine for a<173, but gamma(173) returns [1] Inf Warning
value out of range in 'gammafn' 

What I really need is the ratio

gamma(nu/2) / gamma((nu+1)/2)

is anyone aware of a way to re-express this in a form that pushes the
threshold past which a warning message is generated?


R-help at r-project.org mailing list
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

More information about the R-help mailing list