PearsonI {PearsonDS} | R Documentation |
The Pearson Type I (aka Beta) Distribution
Description
Density, distribution function, quantile function and random generation for the Pearson type I (aka Beta) distribution.
Usage
dpearsonI(x, a, b, location, scale, params, log = FALSE)
ppearsonI(q, a, b, location, scale, params, lower.tail = TRUE,
log.p = FALSE)
qpearsonI(p, a, b, location, scale, params, lower.tail = TRUE,
log.p = FALSE)
rpearsonI(n, a, b, location, scale, params)
Arguments
x , q |
vector of quantiles. |
p |
vector of probabilities. |
n |
number of observations. |
a |
first shape parameter of Pearson type I distribution. |
b |
second shape parameter of Pearson type I distribution. |
location |
location parameter of Pearson type I distribution. |
scale |
scale parameter of Pearson type I distribution. |
params |
vector/list of length 4 containing parameters |
log , log.p |
logical; if |
lower.tail |
logical; if |
Details
Essentially, Pearson type I distributions are (location-scale transformations
of) Beta distributions, the above
functions are thus simple wrappers for dbeta
, pbeta
,
qbeta
and rbeta
contained in package stats
.
The probability density function with parameters a
, b
,
scale
=s
and location
=\lambda
is given by
f(x)=\frac{1}{|s|}\frac{\Gamma(a+b)}{\Gamma(a)\Gamma(b)}\left(\frac{x-\lambda}{s}
\right)^{a-1}\left(1-\frac{x-\lambda}{s}\right)^{b-1}
for a>0
, b>0
, s\ne 0
,
0<\frac{x-\lambda}{s}<1
.
Value
dpearsonI
gives the density, ppearsonI
gives the
distribution function, qpearsonI
gives the quantile function,
and rpearsonI
generates random deviates.
Note
Negative values for scale
are not excluded, albeit negative skewness
is usually obtained by switching a
and b
(such that a
>b
) and not by using negative values for
scale
(and a
<b
).
Author(s)
Martin Becker martin.becker@mx.uni-saarland.de
References
See the references in Beta
.
See Also
Beta
,
PearsonDS-package
,
Pearson
Examples
## define Pearson type I parameter set with a=2, b=3, location=1, scale=2
pIpars <- list(a=2, b=3, location=1, scale=2)
## calculate probability density function
dpearsonI(seq(1,3,by=0.5),params=pIpars)
## calculate cumulative distribution function
ppearsonI(seq(1,3,by=0.5),params=pIpars)
## calculate quantile function
qpearsonI(seq(0.1,0.9,by=0.2),params=pIpars)
## generate random numbers
rpearsonI(5,params=pIpars)