dist.Normal.Laplace: Normal-Laplace Distribution: Univariate Asymmetric

Description Usage Arguments Details Value References See Also Examples

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

1
2
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

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

dalaplace, dallaplace, daml, dlaplace, and dnorm

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
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 documentation built on July 9, 2021, 5:07 p.m.