[ADMB Users] cumulative distribution function for beta distribution

Ben Bolker bbolker at gmail.com
Thu Sep 29 13:56:44 PDT 2011


On 09/29/2011 01:46 PM, Larry Jacobson wrote:
> Does anyone have code to get the cumulative beta distribution function?
> 
> ADMB V5.10.1 does not include the betai() function which was available
> previously to calculate the cumulative beta distribution function.
> 
> There is a single message about betai() on the admb listserver but no
> responses and nothing regarding the cumulative distribution function per
> se.
> 
> Of course, I can always use an earlier version of ADMB but prefer not to.
> 
> Thanks and cheers!
> 
  It's a little bit tedious, but could you adapt this ... ?
(You could substitute the built in log-gamma function instead of using
the one coded here, presumably)

http://people.sc.fsu.edu/~jburkardt/cpp_src/asa063/asa063.html
http://people.sc.fsu.edu/~jburkardt/cpp_src/asa063/asa063.C

  Presumably the reason that betai is gone is the comment on this page that
http://admb-foundation.org/documentation/api/default/cbetai_8cpp.html

'The implementation of this algorithm was inspired by "Numerical Recipes
in C", 2nd edition, Press, Teukolsky, Vetterling, Flannery, chapter 2'

  which would suggest some degree of intellectual property encumbrance ...

  What confuses me is that there's some sort of betai() function in
http://admb-project.org/documentation/api/vcumdbetainv_8cpp.html ... at
a quick glance, it looks as though it *might* be a beta CDF
implementation, but I can't tell for sure without spending more time ...

  Ben





More information about the Users mailing list