dlevy: The Levy Distribution

Description Usage Arguments Value Details References Examples

View source: R/RcppExports.R

Description

Density, distribution, random generation, and quantile functions for the Levy distribution, where mu is a location parameter and sigma is a scale parameter.

Usage

1
2
3
4
5
6
7
dlevy(x, mu, sigma, ln = FALSE)

plevy(q, mu, sigma, lower_tail = TRUE, ln = FALSE)

qlevy(p, mu, sigma)

rlevy(n, mu, sigma)

Arguments

x, q

a vector of quantiles (must be greater than mu).

mu

a vector of location parameters.

sigma

a vector of scale parameters (sigma > 0).

ln

logical; if TRUE, probabilities are given as log(p).

lower_tail

logical; if TRUE (default), probabilities are P(X ≤ x) otherwise P( X > x).

n

the number of draws for random generation.

Value

dlevy gives the density, plevy gives the distribution function, qlevy gives the quantile function and rlevy generates random deviates.

The length of the result is determined by n for rlevy, and is the maximum of the lengths of the numerical arguments for the other functions.

The numerical arguments other than n are recycled to the length of the result.

Details

A Levy distribution, among other things, can describe the finishing times for a one boundary wiener process when the drift rate is fixed to zero.

The mean and variance for the Levy distribution are non-finite.

References

Applebaum, D. (2010). Lectures on Levy processes and stochastic calculus, Braunschweig; Lecture 2: Levy processes. Retrieved from http://www.applebaum.staff.shef.ac.uk/Brauns2notes.pdf.

Siegrist, K. (1997). The Levy distribution. Retrieved from http://www.math.uah.edu/stat/special/Levy.html

Examples

1
2
3
4
5
6
7
8
9
# Density
dlevy( x = 2.199, mu = 0.0, sigma = 1.0 )
# Distribution function
plevy( q = 2.199, mu = 0.0, sigma = 1.0 )
# Quantile function
qlevy( p = .5, mu = 0.0, sigma = 1.0 )

# Simulations
sim <- rlevy( n = 1000, mu = 0.0, sigma = 1.0 )

rettopnivek/seqmodels documentation built on May 1, 2020, 2:59 p.m.