PearsonI | R Documentation |
Density, distribution function, quantile function and random generation for the Pearson type I (aka Beta) distribution.
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)
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 |
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
.
dpearsonI
gives the density, ppearsonI
gives the
distribution function, qpearsonI
gives the quantile function,
and rpearsonI
generates random deviates.
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
).
Martin Becker martin.becker@mx.uni-saarland.de
See the references in Beta
.
Beta
,
PearsonDS-package
,
Pearson
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.