PearsonIII {PearsonDS} | R Documentation |
Density, distribution function, quantile function and random generation for the Pearson type III (aka Gamma) distribution.
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)
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 |
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)= 1/(|s|^a Gamma(a)) |x-lambda|^(a-1) e^-((x-lambda)/s)
for s<>0, a>0 and (x-lambda)/s>=0.
dpearsonIII
gives the density, ppearsonIII
gives the
distribution function, qpearsonIII
gives the quantile function,
and rpearsonIII
generates random deviates.
Martin Becker martin.becker@mx.uni-saarland.de
See the references in GammaDist
.
GammaDist
,
PearsonDS-package
,
Pearson
## 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)