levy: The Levy Distribution

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Density, distribution function, quantile function, and random number generation for the Levy distribution a.k.a alpha-stable distribution with index 1/2 and skewness 1.

Usage

1
2
3
4
   dlevy(x, location=0, scale=1, use.names=TRUE)
	plevy(q, location=0, scale=1, use.names=TRUE)
	qlevy(p, location=0, scale=1, use.names=TRUE)
	rlevy(n, location=0, scale=1, use.names=TRUE)

Arguments

x,q

vector of quantiles

p

vector of probabilities

n

number of samples to generate

location

the location parameter

scale

the scale parameter

use.names

Default is TRUE

Details

The Levy distribution is a special case of the alpha-stable distribution.

The density for the Levy distribution has the form

√(σ/(2*π)) * (x - μ)^(-(3/2)) * \exp(-(σ/(2*(x-μ))))

where μ is the location parameter and σ is the scale parameter.

It is supported on (μ, ∞). The distribution for the Levy distribution with location 0 has the form

F(x) = 2 * (1 - Φ(√(σ/x)))

.

Quantiles are found by solving F(x) = p.

Random numbers from the Levy distribution can be generated via the transformation σ Z^{-2} + μ, where Z is drawn from the standard normal distribution.

Value

The Levy distribution will be evaluated at each point in x (or p or q). The output will be an array whose dimensions are the given by the lengths of x, location, and scale. Any dimension with length 1 will be dropped.

Author(s)

Christopher G. Green christopher.g.green@gmail.com

References

Samorodnitsky, Gennady and Taqqu, Murad S. (1994) Stable Non-Gaussian Random Processes, Chapman \& Hall / CRC, Boca Raton.

See Also

There is an implementation of the PDF, etc., of the general alpha-stable distribution in the stabledist package; see the dstable, pstable, qstable, and rstable functions in that package.

Examples

1
2
dlevy( seq(-5,5,0.1) )
plevy( seq(-5,5,0.1), location=3, scale=2 )

christopherggreen/cggmisc documentation built on May 13, 2019, 7:04 p.m.