| PearsonIII {PearsonDS} | R Documentation |
The Pearson Type III (aka Gamma) Distribution
Description
Density, distribution function, quantile function and random generation for the Pearson type III (aka Gamma) distribution.
Usage
dpearsonIII(x, shape, location, scale, params, log = FALSE)
ppearsonIII(q, shape, location, scale, params, lower.tail = TRUE,
log.p = FALSE)
qpearsonIII(p, shape, location, scale, params, lower.tail = TRUE,
log.p = FALSE)
rpearsonIII(n, shape, location, scale, params)
Arguments
x, q |
vector of quantiles. |
p |
vector of probabilities. |
n |
number of observations. |
shape |
shape parameter of Pearson type III distribution. |
location |
location parameter of Pearson type III distribution. |
scale |
scale parameter of Pearson type III distribution. |
params |
vector/list of length 3 containing parameters |
log, log.p |
logical; if |
lower.tail |
logical; if |
Details
Essentially, the above functions are wrappers for dgamma,
pgamma, qgamma and rgamma contained in package
stats.
As a minor (but important) extension, negative scale parameters
(which reflect the distribution at location) are
permitted to allow for negative skewness.
The probability density function with parameters shape=a,
scale=s and location=\lambda
is thus given by
f(x)= \frac{1}{|s|^a \Gamma(a)} |x-\lambda|^{a-1}
e^{-\frac{x-\lambda}{s}}
for s\ne 0, a>0 and
\frac{x-\lambda}{s}\ge 0.
Value
dpearsonIII gives the density, ppearsonIII gives the
distribution function, qpearsonIII gives the quantile function,
and rpearsonIII generates random deviates.
Author(s)
Martin Becker martin.becker@mx.uni-saarland.de
References
See the references in GammaDist.
See Also
GammaDist,
PearsonDS-package,
Pearson
Examples
## define Pearson type III parameter set with shape=3, location=1, scale=-2
pIIIpars <- list(shape=3, location=1, scale=-0.5)
## calculate probability density function
dpearsonIII(-4:1,params=pIIIpars)
## calculate cumulative distribution function
ppearsonIII(-4:1,params=pIIIpars)
## calculate quantile function
qpearsonIII(seq(0.1,0.9,by=0.2),params=pIIIpars)
## generate random numbers
rpearsonIII(5,params=pIIIpars)