The OpenD Programming Language

generalizedParetoLPDF

Computes the generalized pareto log probability density function (LPDF).

@safe pure nothrow @nogc
T
generalizedParetoLPDF
(
T
)
(
const T x
,
const T mu
,
const T sigma
,
const T xi
)
if (
isFloatingPoint!T
)

Parameters

x T

value to evaluate LPDF

mu T

location parameter

sigma T

scale parameter

xi T

shape parameter

Examples

import mir.math.common: log;
import mir.test: shouldApprox;

1.0.generalizedParetoLPDF(1, 1, 0.5).shouldApprox == log(generalizedParetoPDF(1.0, 1, 1, 0.5));
2.0.generalizedParetoLPDF(1, 1, 0.5).shouldApprox == log(generalizedParetoPDF(2.0, 1, 1, 0.5));
3.0.generalizedParetoLPDF(2, 3, 0.25).shouldApprox == log(generalizedParetoPDF(3.0, 2, 3, 0.25));
5.0.generalizedParetoLPDF(2, 3, 0).shouldApprox == log(generalizedParetoPDF(5.0, 2, 3, 0));

See Also

Meta