Stata
Products Purchase Support Company
Search
   >> Home >> Resources & support >> FAQs >> Calculating the beta function

How do I calculate values of the beta function?

Title   Calculating the beta function
Author Nicholas J. Cox, Durham University, UK
Date November 2001

The beta function can be defined in terms of the gamma function and thus, calculated using the Stata functions exp() and lngamma(). On the latter, see help on math functions. Given arguments a and b, the beta function

        Β(a,b) = Γ(a) Γ(b) / Γ(a + b)

can be calculated from


        exp(lngamma(a) + lngamma(b) - lngamma(a + b))  

In this expression, each argument may be a number, a variable, or, more generally, itself an expression.

FAQs
What's new?
Statistics
Data management
Graphics
Programming Stata
Mata
Resources
Internet capabilities
Stata for Windows
Stata for Unix
Stata for Macintosh
Technical support
Resources & support
FAQs
Technical support
NetCourses
Short courses
Users Group meetings
Statalist
Links
Software updates
Software archives
Customer service
Manuals & supplements
Stata Journal
STB
Stata News
Stata Automation
Plugins

Site overview
Products
Resources & support
Company
Site index

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