Skip to content
Back to formatted view

Raw Message

Message-ID: <Pine.LNX.4.61.0512131734140.5892@gannet.stats>
Date: 2005-12-13T17:37:27Z
From: Brian Ripley
Subject: Incomplete Beta
In-Reply-To: <XFMail.051213161837.Ted.Harding@nessie.mcc.ac.uk>

On Tue, 13 Dec 2005 Ted.Harding at nessie.mcc.ac.uk wrote:

> On 13-Dec-05 Thomas Lumley wrote:
>> On Tue, 13 Dec 2005, Albert Sorribas wrote:
>>
>>>
>>> Is there any function available in R for computing the incomplete Beta
>>> function?
>>
>> pbeta().  The incomplete Beta function is the cdf of the Beta
>> distribution
>
> But don't forget to multiply by beta(,):
>
>  ibeta(x,a,b) <- function(x,a,b){ pbeta(x,a,b)*beta(a,b) }
>
> !

Depends on which definition you use, as ?pbeta explains.  Thomas' advice 
was correct rather than yours for Abramowitz and Stegun's definition, for 
example.

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595