repl.txt (1485B)
1 2 {{alias}}( x, k, λ ) 3 Evaluates the logarithm of the probability density function (PDF) for a 4 Weibull distribution with shape parameter `k` and scale parameter `λ` at a 5 value `x`. 6 7 If provided `NaN` as any argument, the function returns `NaN`. 8 9 If provided a nonpositive value for `λ` or `k`, the function returns `NaN`. 10 11 Parameters 12 ---------- 13 x: number 14 Input value. 15 16 k: 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, 1.0, 0.5 ) 30 ~-3.307 31 > y = {{alias}}( 0.1, 1.0, 1.0 ) 32 ~-0.1 33 > y = {{alias}}( -1.0, 4.0, 2.0 ) 34 -Infinity 35 > y = {{alias}}( NaN, 0.6, 1.0 ) 36 NaN 37 > y = {{alias}}( 0.0, NaN, 1.0 ) 38 NaN 39 > y = {{alias}}( 0.0, 0.0, NaN ) 40 NaN 41 > y = {{alias}}( 2.0, 0.0, -1.0 ) 42 NaN 43 44 45 {{alias}}.factory( k, λ ) 46 Returns a function for evaluating the logarithm of the probability density 47 function (PDF) of a Weibull distribution with shape parameter `k` and scale 48 parameter `λ`. 49 50 Parameters 51 ---------- 52 k: number 53 Shape parameter. 54 55 λ: number 56 Scale parameter. 57 58 Returns 59 ------- 60 logpdf: Function 61 Logarithm of probability density function (PDF). 62 63 Examples 64 -------- 65 > var mylofpdf = {{alias}}.factory( 7.0, 6.0 ); 66 > y = mylofpdf( 7.0 ) 67 ~-1.863 68 69 See Also 70 -------- 71