normalp (version 0.7.2)

pnormp: Probability function of an exponential power distribution

Description

Probability function for the exponential power distribution with location parameter mu, scale parameter sigmap and shape parameter p.

Usage

pnormp(q, mu=0, sigmap=1, p=2, lower.tail=TRUE, log.pr=FALSE)

Value

pnormp gives the probability of an exponential power distribution.

Arguments

q

Vector of quantiles.

mu

Vector of location parameters.

sigmap

Vector of scale parameters.

p

Shape parameter.

lower.tail

Logical; if TRUE (default), probabilities are \(P [X\leq x]\), otherwise, \(P[X>x]\).

log.pr

Logical; if TRUE, probabilities \(pr\) are given as \(log(pr)\).

Author

Angelo M. Mineo

Details

If mu, sigmap or p are not specified they assume the default values 0, 1 and 2, respectively. The exponential power distribution has density function

$$f(x) = \frac{1}{2 p^{(1/p)} \Gamma(1+1/p) \sigma_p} e^{-\frac{|x - \mu|^p}{p \sigma_p^p}}$$

where \(\mu\) is the location parameter, \(\sigma_p\) the scale parameter and \(p\) the shape parameter. When \(p=2\) the exponential power distribution becomes the Normal Distribution, when \(p=1\) the exponential power distribution becomes the Laplace Distribution, when \(p\rightarrow\infty\) the exponential power distribution becomes the Uniform Distribution.

See Also

Normal for the Normal distribution, Uniform for the Uniform distribution, and Special for the Gamma function.

Examples

Run this code
## Compute the distribution function for a vector x with mu=0, sigmap=1 and p=1.5
## At the end we have the graph of the exponential power distribution function with p=1.5.
x <- c(-1, 1)
pr <- pnormp(x, p=1.5)
print(pr)
plot(function(x) pnormp(x, p=1.5), -4, 4,
          main = "Exponential Power Distribution Function (p=1.5)", ylab="F(x)")

Run the code above in your browser using DataCamp Workspace