ADMB Documentation  -a65f1c97
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions
cbetai.cpp File Reference

(Last Changed on May 26, 2016 for git-revision 3227a970bb4155b684d55f82eed26ae88c236cda.)

#include <fvar.hpp>
#include <math.h>

Go to the source code of this file.

Functions

double betai (const double a, const double b, const double x, int maxit)
 Incomplete beta function for constant objects. More...
 
double pbeta (const double x, const double a, const double b, int maxit)
 beta distribution function for constant objects (alias of ibeta function with same arguments order as in R). More...
 

Function Documentation

double betai ( const double  a,
const double  b,
const double  x,
int  maxit 
)

Incomplete beta function for constant objects.

Id:
cbetai.cpp 789 2010-10-05 01:01:09Z johnoel

Author: David Fournier Copyright (c) 2009, 2010 ADMB Foundation

Parameters
a$a$
b$b$
x$x$
maxitMaximum number of iterations for the continued fraction approximation in betacf.
Returns
Incomplete beta function $I_x(a,b)$ `

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

Definition at line 21 of file cbetai.cpp.

Referenced by inv_cumd_beta_stable(), old_inv_cumd_beta_stable(), and pbeta().

double pbeta ( const double  x,
const double  a,
const double  b,
int  maxit 
)

beta distribution function for constant objects (alias of ibeta function with same arguments order as in R).

Parameters
x$x$
a$a$
b$b$
maxitMaximum number of iterations for the continued fraction approximation in betacf.
Returns
Incomplete beta function $I_x(a,b)$



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

Definition at line 47 of file cbetai.cpp.