UNPKG

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