PearsonV {PearsonDS}R Documentation

The Pearson Type V (aka Inverse Gamma) Distribution

Description

Density, distribution function, quantile function and random generation for the Pearson type V (aka Inverse Gamma) distribution.

Usage


dpearsonV(x, shape, location, scale, params, log = FALSE)

ppearsonV(q, shape, location, scale, params, lower.tail = TRUE, 
          log.p = FALSE)

qpearsonV(p, shape, location, scale, params, lower.tail = TRUE, 
          log.p = FALSE)

rpearsonV(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 V distribution.
location location parameter of Pearson type V distribution.
scale scale parameter of Pearson type V distribution.
params vector/list of length 3 containing parameters shape, location, scale for Pearson type V distribution (in this order!).
log, log.p logical; if TRUE, probabilities p are given as log(p).
lower.tail logical; if TRUE, probabilities are P[X<=x], otherwise, P[X>x].

Details

The Pearson type V distributions are essentially Inverse Gamma distributions. Thus, all functions are implemented via calls to the corresponding functions for Gamma distributions, ie. dgamma, pgamma, qgamma and rgamma in package stats. 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 given by

f(x)= 1/(|s|^a Gamma(a)) |x-lambda|^(-a-1) e^-(s/(x-lambda))

for s<>0, a>0 and s/(x-lambda)>0.

Value

dpearsonV gives the density, ppearsonV gives the distribution function, qpearsonV gives the quantile function, and rpearsonV generates random deviates.

Note

The parameter scale corresponds to the reciprocal value of the usual scale parameter of the Inverse Gamma distribution.

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 V parameter set with shape=3, location=1, scale=-2
pVpars <- list(shape=3, location=1, scale=-0.5)
## calculate probability density function
dpearsonV(-4:1,params=pVpars)
## calculate cumulative distribution function
ppearsonV(-4:1,params=pVpars)
## calculate quantile function
qpearsonV(seq(0.1,0.9,by=0.2),params=pVpars)
## generate random numbers
rpearsonV(5,params=pVpars)

[Package PearsonDS version 0.91 Index]