[R] Function to compute the multinomial beta function?
Robert A LaBudde
ral at lcfltd.com
Tue Jul 6 02:54:58 CEST 2010
At 05:10 PM 7/5/2010, Gregory Gentlemen wrote:
>Dear R-users,
>
>Is there an R function to compute the multinomial beta function?
>That is, the normalizing constant that arises in a Dirichlet
>distribution. For example, with three parameters the beta function
>is Beta(n1,n2,n2) = Gamma(n1)*Gamma(n2)*Gamma(n3)/Gamma(n1+n2+n3)
> beta3<- function (n1, n2, n3)
exp(lgamma(n1)+lgamma(n2)+lgamma(n3)-lgamma(n1+n2+n3))
> beta3(5,3,8)
[1] 1.850002e-07
================================================================
Robert A. LaBudde, PhD, PAS, Dpl. ACAFS e-mail: ral at lcfltd.com
Least Cost Formulations, Ltd. URL: http://lcfltd.com/
824 Timberlake Drive Tel: 757-467-0954
Virginia Beach, VA 23464-3239 Fax: 757-467-2947
"Vere scire est per causas scire"
More information about the R-help
mailing list