From dankoc at gmail.com  Fri Sep 25 20:01:14 2009
From: dankoc at gmail.com (Charles Danko)
Date: Fri, 25 Sep 2009 14:01:14 -0400
Subject: [Rd] Problem with dgamma function.
Message-ID: <8adccabf0909251101h4e181baey87afaa7ecc30a0e4@mail.gmail.com>

Hi, All,

I am getting some funny results trying to use R's built in
distribution functions.

In R:
> dgamma(4.775972,1.37697964405418, 0.106516604930466)
[1] 0.05585295
> dgamma(4.775972,1.37697964405418, 0.106516604930466,TRUE)  ### THIS IS JUST WRONG!
[1] 0.01710129
> log(dgamma(4.775972,1.37697964405418, 0.106516604930466))
[1] -2.885033
>

In C:
dgamma(4.775972,1.37697964405418, 0.106516604930466,TRUE)
Returns: -41.046764

dgamma(4.775972,1.37697964405418, 0.106516604930466,FALSE)
Returns: 0.000000

SESSION INFO:
R version 2.9.0 (2009-04-17)
x86_64-unknown-linux-gnu

Any indication of what I may be doing wrong is very much appreciated.

Thanks,
Charles


-- 
Postdoctoral Fellow
Cornell University
169 Biotechnology Building
Ithaca, NY 14853

Phone (Lab, 467 Biotech Bldg.): 607-255-4743
E-mail: dankoc at gmail.com



[Rd] Problem with dgamma function.
Charles Danko