# dist.Skew.Discrete.Laplace: Skew Discrete Laplace Distribution: Univariate In LaplacesDemonR/LaplacesDemon: Complete Environment for Bayesian Inference

## Description

These functions provide the density, distribution function, quantile function, and random generation for the univariate, skew discrete Laplace distribution with parameters p and q.

## Usage

 1 2 3 4 dsdlaplace(x, p, q, log=FALSE) psdlaplace(x, p, q) qsdlaplace(prob, p, q) rsdlaplace(n, p, q)

## Arguments

 x This is a vector of data. p This is a scalar or vector of parameter p in [0,1]. q This is a scalar or vector of parameter q in [0,1]. prob This is a probability scalar or vector. n This is the number of observations, which must be a positive integer that has length 1. log Logical. If log=TRUE, then the logarithm of the density is returned.

## Details

• Application: Discrete Univariate

• Density 1: p(theta) = (1-p)(1-q) / (1-pq)p^theta, theta=0,1,2,3,...

• Density 2: p(theta) = (1-p)(1-q) / (1-pq)q^(|theta|),; x=0,-1,-2,-3,...

• Inventor: Kozubowski, T.J. and Inusah, S. (2006)

• Notation 1: theta ~ DL(p, q)

• Notation 2: p(theta) = DL(theta | p, q)

• Parameter 1: p in [0,1]

• Parameter 2: q in [0,1]

• Mean 1: E(theta) = (1 / (1-p)) - (1 / (1-q)) = (p / (1-p)) - (q / (1-q))

• Mean 2: E(|theta|) = (q(1-p)^2+p(1-q)^2) / ((1-qp)(1-q)(1-p))

• Variance: var(theta) = (1 / ((1-p)^2(1-q)^2))[(q(1-p)^3(1+q)+p(1-q)^3(1+p)) / (1-pq) - (p-q)^2]

• Mode:

This is a discrete form of the skew-Laplace distribution. The symmetric discrete Laplace distribution occurs when p=q. DL(p,0) is a geometric distribution, and DL(0,q) is a geometric distribution of non-positive integers. The distribution is degenerate when DL(0,0). Since the geometric distribution is a discrete analog of the exponential distribution, the distribution of the difference of two geometric variables is a discrete Laplace distribution.

These functions are similar to those in the DiscreteLaplace package.

## Value

dslaplace gives the density, pslaplace gives the distribution function, qslaplace gives the quantile function, and rslaplace generates random deviates.

## References

Kozubowski, T.J. and Inusah, S. (2006). "A Skew Laplace Distribution on Integers". AISM, 58, p. 555–571.