1 | ## Special Functions
|
2 |
|
3 | ### betafn( x, y )
|
4 |
|
5 | Evaluates the Beta function at `(x,y)`.
|
6 |
|
7 | ### betaln( x, y )
|
8 |
|
9 | Evaluates the log Beta function at `(x,y)`.
|
10 |
|
11 | ### betacf( x, a, b )
|
12 |
|
13 | Returns the continued fraction for the incomplete Beta function with parameters a and b modified by Lentz's method evaluated at `x`.
|
14 |
|
15 | ### ibetainv( p, a, b)
|
16 |
|
17 | Returns the inverse of the incomplete Beta function evaluated at `(p,a,b)`.
|
18 |
|
19 | ### ibeta( x, a, b)
|
20 |
|
21 | Returns the incomplete Beta function evaluated at `(x,a,b)`.
|
22 |
|
23 | ### gammafn( x )
|
24 |
|
25 | Returns the Gamma function evaluated at `x`. This is sometimes called the 'complete' gamma function.
|
26 |
|
27 | This function is tested against Mathematica's Gamma[x].
|
28 |
|
29 | ### gammaln( x )
|
30 |
|
31 | Returns the Log-Gamma function evaluated at `x`.
|
32 |
|
33 | ### gammap( a, x )
|
34 |
|
35 | Returns the lower incomplete gamma function evaluated at `(a,x)`.
|
36 | This function is usually written with a lower case greek gamma character, and is one of the two [incomplete gamma functions](http://mathworld.wolfram.com/IncompleteGammaFunction.html).
|
37 |
|
38 | This function is tested against Mathematica's Gamma[a, 0, x].
|
39 | It is additionally tested against gammainc(a,x)'s 'lowinc' output from teh 'pracma' library for R.
|
40 |
|
41 | ### lowRegGamma(a, x)
|
42 |
|
43 | Returns the lower regularized incomplete gamma function evaluated at `(a,x)`.
|
44 | It is defined as the quotient of the lower incomplete gamma function evaluated at (a, x) and the upper incomplete gamma function ('the gamma function') evaluated at (a).
|
45 | This function is usually written as P(x, a); and is one of the two [regularized gamma functions](http://mathworld.wolfram.com/RegularizedGammaFunction.html).
|
46 |
|
47 | This function is tested against gammainc(x, a)'s 'reginc' output from the 'pracma' library for R. Note that R and jStat switch the order of operators for this function.
|
48 |
|
49 | ### gammapinv( p, a )
|
50 |
|
51 | Returns the inverse of the lower regularized incomplete Gamma function evaluated at `(p,a)`.
|
52 | This function is the inverse of lowerRegularizedGamma(x, a).
|
53 |
|
54 | ### factorialln( n )
|
55 |
|
56 | Returns the natural log factorial of `n`.
|
57 |
|
58 | ### factorial( n )
|
59 |
|
60 | Returns the factorial of `n`.
|
61 |
|
62 | ### combination( n, m )
|
63 |
|
64 | Returns the number of combinations of `n`, `m`.
|
65 |
|
66 | ### permutation( n, m )
|
67 |
|
68 | Returns the number of permutations of `n`, `m`.
|
69 |
|
70 |
|
71 | ### erf( x )
|
72 |
|
73 | Returns the error function evaluated at `x`.
|
74 |
|
75 | ### erfc( x )
|
76 |
|
77 | Returns the complementary error function evaluated at `x`.
|
78 |
|
79 | ### erfcinv( p )
|
80 |
|
81 | Returns the inverse of the complementary error function evaluated at `p`.
|
82 |
|
83 | ### randn( n, m )
|
84 |
|
85 | Returns a normal deviate (mean 0 and standard deviation 1).
|
86 |
|
87 | ### randg( shape, n, m )
|
88 |
|
89 | Returns a Gamma deviate by the method of Marsaglia and Tsang.
|
90 |
|