Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: gamma


From   David Hoaglin <dchoaglin@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: gamma
Date   Mon, 15 Oct 2012 07:22:27 -0400

Jason,

digamma() is the first derivative of the gamma function, and
trigamma() is the second derivative.

David Hoaglin

On Mon, Oct 15, 2012 at 5:47 AM, Jason Rosenberg <RSNJAS002@myuct.ac.za> wrote:
> Sorry to continue this thread,
>
> but I read the help function guide and help lngamma(), but I still get different results for the gamma function from that of RGui(32-bit) as in:
>
> I type this in stata:
> di lngamma(3/4)
>
> and get:
> .20328095
>
> but in R I get gamma(3/4)=1.225417
>
> I've tried digamma() and trigamma() in stata just to see and they of course also give me different results.
> any advice? I am modeling equations and it would be very helpful not to jump in between R and stata
>
> Also I'm sure the one R is evaluating is the correct one for my purposes.
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index