Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

dist.Normal.Laplace

Normal-Laplace Distribution: Univariate Asymmetric


Description

These functions provide the density and random generation for the univariate, asymmetric, normal-Laplace distribution with location parameter mu, scale parameter σ, and tail-behavior parameters alpha and beta.

Usage

dnormlaplace(x, mu=0, sigma=1, alpha=1, beta=1, log=FALSE)
rnormlaplace(n, mu=0, sigma=1, alpha=1, beta=1)

Arguments

x

This is a vector of data.

n

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

mu

This is the location parameter mu.

sigma

This is the scale parameter sigma, which must be positive.

alpha

This is shape parameter alpha for left-tail behavior.

beta

This is shape parameter beta for right-tail behavior.

log

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

Details

  • Application: Continuous Univariate

  • Density: p(theta) = [(alpha*beta)/(alpha + beta)] phi [(theta - mu) / sigma] [R(alpha*sigma - [(theta - mu) / sigma]) + R(beta*sigma + [(theta - mu) / sigma])]

  • Inventor: Reed (2006)

  • Notation 1: theta ~ NL(mu, sigma, alpha, beta)

  • Notation 2: p(theta) = NL(theta | mu, sigma, alpha, beta)

  • Parameter 1: location parameter mu

  • Parameter 2: scale parameter sigma > 0

  • Parameter 3: shape parameter alpha > 0

  • Parameter 4: shape parameter beta > 0

  • Mean:

  • Variance:

  • Mode:

The normal-Laplace (NL) distribution is the convolution of a normal distribution and a skew-Laplace distribution. When the NL distribution is symmetric (when alpha = beta), it behaves somewhat like the normal distribution in the middle of its range, somewhat like the Laplace distribution in its tails, and functions generally between the normal and Laplace distributions. Skewness is parameterized by including a skew-Laplace component. It may be applied, for example, to the logarithmic price of a financial instrument.

Parameters alpha and beta determine the behavior in the left and right tails, respectively. A small value corresponds to heaviness in the corresponding tail. As sigma approaches zero, the NL distribution approaches a skew-Laplace distribution. As beta approaches infinity, the NL distribution approaches a normal distribution, though it never quite reaches it.

Value

dnormlaplace gives the density, and rnormlaplace generates random deviates.

References

Reed, W.J. (2006). "The Normal-Laplace Distribution and Its Relatives". In Advances in Distribution Theory, Order Statistics and Inference, p. 61–74, Birkhauser, Boston.

See Also

Examples

library(LaplacesDemon)
x <- dnormlaplace(1,0,1,0.5,2)
x <- rnormlaplace(100,0,1,0.5,2)

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

LaplacesDemon

Complete Environment for Bayesian Inference

v16.1.4
MIT + file LICENSE
Authors
Byron Hall [aut], Martina Hall [aut], Statisticat, LLC [aut], Eric Brown [ctb], Richard Hermanson [ctb], Emmanuel Charpentier [ctb], Daniel Heck [ctb], Stephane Laurent [ctb], Quentin F. Gronau [ctb], Henrik Singmann [cre]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.