# pymc.AsymmetricLaplace#

class pymc.AsymmetricLaplace(name, *args, rng=None, dims=None, initval=None, observed=None, total_size=None, transform=UNSET, **kwargs)[source]#

Asymmetric-Laplace log-likelihood.

The pdf of this distribution is

$\begin{split}{f(x|\\b,\kappa,\mu) = \left({\frac{\\b}{\kappa + 1/\kappa}}\right)\,e^{-(x-\mu)\\b\,s\kappa ^{s}}}\end{split}$

where

$s = sgn(x-\mu)$
 Support $$x \in \mathbb{R}$$ Mean $$\mu-\frac{\\\kappa-1/\kappa}b$$ Variance $$\frac{1+\kappa^{4}}{b^2\kappa^2 }$$

AsymmetricLaplace distribution can be parameterized either in terms of kappa or q. The link between the two parametrizations is given by

$\kappa = \sqrt(\frac{q}{1-q})$
Parameters
kappa

Symmetry parameter (kappa > 0).

mu

Location parameter.

b

Scale parameter (b > 0).

q

Symmetry parameter (0 < q < 1).

Notes

The parametrization in terms of q is useful for quantile regression with q being the quantile of interest.

Methods

 AsymmetricLaplace.__init__(*args, **kwargs) AsymmetricLaplace.dist([kappa, mu, b, q]) Creates a tensor variable corresponding to the cls distribution. AsymmetricLaplace.get_kappa([kappa, q]) AsymmetricLaplace.logp(b, kappa, mu) AsymmetricLaplace.moment(size, b, kappa, mu)

Attributes

 rv_op