dist.Skew.Laplace: Skew-Laplace Distribution: Univariate

dist.Skew.LaplaceR Documentation

Skew-Laplace Distribution: Univariate

Description

These functions provide the density, distribution function, quantile function, and random generation for the univariate, skew-Laplace distribution with location parameter \mu, and two mixture parameters: \alpha and \beta.

Usage

dslaplace(x, mu, alpha, beta, log=FALSE)
pslaplace(q, mu, alpha, beta)
qslaplace(p, mu, alpha, beta)
rslaplace(n, mu, alpha, beta)

Arguments

x, q

These are each a vector of quantiles.

p

This is a vector of probabilities.

n

This is the number of observations, which must be a positive integer that has length 1.

mu

This is the location parameter \mu.

alpha

This is a mixture parameter \alpha, which must be positive.

beta

This is a mixture parameter \beta, which must be positive.

log

Logical. If log=TRUE, then the logarithm of the density is returned.

Details

  • Application: Continuous Univariate

  • Density 1: p(\theta) = \frac{1}{\alpha + \beta} \exp(\frac{\theta - \mu}{\alpha}), \theta \le \mu

  • Density 2: p(\theta) = \frac{1}{\alpha + \beta} \exp(\frac{\mu - \theta}{\beta}), \theta > \mu

  • Inventor: Fieller, et al. (1992)

  • Notation 1: \theta \sim \mathcal{SL}(\mu, \alpha, \beta)

  • Notation 2: p(\theta) = \mathcal{SL}(\theta | \mu, \alpha, \beta)

  • Parameter 1: location parameter \mu

  • Parameter 2: mixture parameter \alpha > 0

  • Parameter 3: mixture parameter \beta > 0

  • Mean: E(\theta) = \mu + \beta - \alpha

  • Variance: var(\theta) = \alpha^2 + \beta^2

  • Mode: mode(\theta) = \mu

This is the three-parameter general skew-Laplace distribution, which is an extension of the two-parameter central skew-Laplace distribution. The general form allows the mode to be shifted along the real line with parameter \mu. In contrast, the central skew-Laplace has mode zero, and may be reproduced here by setting \mu=0.

The general skew-Laplace distribution is a mixture of a negative exponential distribution with mean \beta, and the negative of an exponential distribution with mean \alpha. The weights of the positive and negative components are proportional to their means. The distribution is symmetric when \alpha=\beta, in which case the mean is \mu.

These functions are similar to those in the HyperbolicDist package.

Value

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

References

Fieller, N.J., Flenley, E.C., and Olbricht, W. (1992). "Statistics of Particle Size Data". Applied Statistics, 41, p. 127–146.

See Also

dalaplace, dexp, dlaplace, dlaplacep, and dsdlaplace.

Examples

library(LaplacesDemon)
x <- dslaplace(1,0,1,1)
x <- pslaplace(1,0,1,1)
x <- qslaplace(0.5,0,1,1)
x <- rslaplace(100,0,1,1)

#Plot Probability Functions
x <- seq(from=0.1, to=3, by=0.01)
plot(x, dslaplace(x,0,1,1), ylim=c(0,1), type="l", main="Probability Function",
     ylab="density", col="red")
lines(x, dslaplace(x,0,0.5,2), type="l", col="green")
lines(x, dslaplace(x,0,2,0.5), type="l", col="blue")
legend(1.5, 0.9, expression(paste(mu==0, ", ", alpha==1, ", ", beta==1),
     paste(mu==0, ", ", alpha==0.5, ", ", beta==2),
     paste(mu==0, ", ", alpha==2, ", ", beta==0.5)),
     lty=c(1,1,1), col=c("red","green","blue"))

LaplacesDemonR/LaplacesDemon documentation built on April 1, 2024, 7:22 a.m.