Learn R Programming

rmutil (version 1.1.9)

PowerExponential: Power Exponential Distribution

Description

These functions provide information about the power exponential distribution with mean parameter equal to m, dispersion equal to s, and family parameter equal to f: density, cumulative distribution, quantiles, log hazard, and random generation.

The power exponential distribution has density $$ f(y) = \frac{\exp(-(abs{y-\mu}/\sqrt{\sigma})^{2 \nu}/2)}{ \sqrt{\sigma} Gamma(1+1/(2 \nu)) 2^{1+1/(2 \nu)}}$$

where \(\mu\) is the mean of the distribution, \(\sigma\) is the dispersion, and \(\nu\) is the family parameter. \(\nu=1\) yields a normal distribution, \(\nu=0.5\) a Laplace distribution, and \(\nu=\infty\) a uniform distribution.

Usage

dpowexp(y, m=0, s=1, f=1, log=FALSE)
ppowexp(q, m=0, s=1, f=1)
qpowexp(p, m=0, s=1, f=1)
rpowexp(n, m=0, s=1, f=1)

Arguments

y

vector of responses.

q

vector of quantiles.

p

vector of probabilities

n

number of values to generate

m

vector of means.

s

vector of dispersion parameters.

f

vector of family parameters.

log

if TRUE, log probabilities are supplied.

Author

J.K. Lindsey

Examples

Run this code
dpowexp(5, 5, 1, 2)
ppowexp(5, 5, 1, 2)
qpowexp(0.5, 5, 1, 2)
rpowexp(10, 5, 1, 2)

Run the code above in your browser using DataLab