Package Bio :: Package Phylo :: Package PAML :: Module chi2
[hide private]
[frames] | no frames]

Module chi2

source code

Functions [hide private]
 
cdf_chi2(df, stat) source code
 
_ln_gamma_function(alpha)
Compute the log of the gamma function for a given alpha.
source code
 
_incomplete_gamma(x, alpha)
Compute an incomplete gamma ratio.
source code
Variables [hide private]
  __package__ = 'Bio.Phylo.PAML'
Function Details [hide private]

_ln_gamma_function(alpha)

source code 
Compute the log of the gamma function for a given alpha.

Comments from Z. Yang:
Returns ln(gamma(alpha)) for alpha>0, accurate to 10 decimal places.
Stirling's formula is used for the central polynomial part of the procedure.
Pike MC & Hill ID (1966) Algorithm 291: Logarithm of the gamma function.
Communications of the Association for Computing Machinery, 9:684

_incomplete_gamma(x, alpha)

source code 
Compute an incomplete gamma ratio.

Comments from Z. Yang:
Returns the incomplete gamma ratio I(x,alpha) where x is the upper
       limit of the integration and alpha is the shape parameter.
returns (-1) if in error
ln_gamma_alpha = ln(Gamma(alpha)), is almost redundant.
(1) series expansion     if alpha>x or x<=1
(2) continued fraction   otherwise
RATNEST FORTRAN by
Bhattacharjee GP (1970) The incomplete gamma integral.  Applied Statistics,
19: 285-287 (AS32)