repl.txt (1621B)
1 2 {{alias}}( x, α, β ) 3 Evaluates the natural logarithm of the probability density function (PDF) 4 for an inverse gamma distribution with shape parameter `α` and scale 5 parameter `β` at a value `x`. 6 7 If `α <= 0` or `β <= 0`, the function returns `NaN`. 8 9 If provided `NaN` as any argument, the function returns `NaN`. 10 11 Parameters 12 ---------- 13 x: number 14 Input value. 15 16 α: number 17 Shape parameter. 18 19 β: number 20 Scale parameter. 21 22 Returns 23 ------- 24 out: number 25 Evaluated logPDF. 26 27 Examples 28 -------- 29 > var y = {{alias}}( 2.0, 0.5, 1.0 ) 30 ~-2.112 31 > y = {{alias}}( 0.2, 1.0, 1.0 ) 32 ~-1.781 33 > y = {{alias}}( -1.0, 4.0, 2.0 ) 34 -Infinity 35 36 > y = {{alias}}( NaN, 1.0, 1.0 ) 37 NaN 38 > y = {{alias}}( 0.0, NaN, 1.0 ) 39 NaN 40 > y = {{alias}}( 0.0, 1.0, NaN ) 41 NaN 42 43 // Negative shape parameter: 44 > y = {{alias}}( 2.0, -1.0, 1.0 ) 45 NaN 46 47 // Negative scale parameter: 48 > y = {{alias}}( 2.0, 1.0, -1.0 ) 49 NaN 50 51 52 {{alias}}.factory( α, β ) 53 Returns a function for evaluating the natural logarithm of the probability 54 density function (PDF) for an inverse gamma distribution with shape 55 parameter `α` and scale parameter `β`. 56 57 Parameters 58 ---------- 59 α: number 60 Shape parameter. 61 62 β: number 63 Scale parameter. 64 65 Returns 66 ------- 67 logpdf: Function 68 Logarithm of probability density function (PDF). 69 70 Examples 71 -------- 72 > var mylogPDF = {{alias}}.factory( 6.0, 7.0 ); 73 > var y = mylogPDF( 2.0 ) 74 ~-1.464 75 76 See Also 77 -------- 78