Description Usage Arguments Details Value Author(s) References See Also Examples
Returns the quantiles of selected distributions at user specified locations.
1 |
s |
A scalar or vector: the probabilities where the quantile function will be evaluated. |
dist |
Character string, used as a switch to the user selected distribution function (see details below). |
p1 |
A scalar. Parameter 1 (vector or object) of the selected distribution. |
p2 |
A scalar. Parameter 2 (vector or object) of the selected distribution. |
Based on user-specified argument dist
, the function returns the value of the quantile function at s
.
Supported distributions (along with the corresponding dist
values) are:
weib: The quantile function for the weibull distribution is implemented as
Q(s) = p_1 (-\log(1-s))^{1/{p_2}}
where p_1 is the shape parameter and p_2 the scale parameter.
lognorm: The lognormal distribution has quantile function implemented as
Q(s)= \exp≤ft \{ p_1 +√{2p_2^2} \mathrm{erf}^{-1} (2s-1) \right \}
where p_1 is the mean, p_2 is the standard deviation and \mathrm{erf} is the Gauss error function.
norm: The normal distribution has quantile function implemented as
Q(p)=Φ^{-1}(s; p_1, p_2)
where p_1 is the mean and the p_2 is the standard deviation.
uni: The uniform distribution has quantile function implemented as
Q(s; p_1, p_2)=s(p_2-p_1)+p_1
for p_1 < s < p_2.
cauchy: The cauchy distribution has quantile function implemented as
Q(s)=p_1 + p_2 \tan ≤ft \{ π ≤ft (s- \frac{1}{2} \right ) \right \}
where p_1 is the location parameter and p_2 the scale parameter.
fnorm: The half normal distribution has quantile function implemented as
Q(s)= p_1√{2} \mathrm{erf}^{-1}(s)
where and p_1 is the standard deviation of the distribution.
normmix: The quantile function normal mixture distribution is estimated numericaly, based on the built in quantile function.
skewnorm: There is no closed form expression for the quantile function of the skew normal distribution. For this reason, the quantiles are calculated through the qsn
function of the sn package.
fas:There is no closed form expression for the quantile function of the Fernandez and Steel distribution. For this reason, the quantiles are calculated through the qskt
function of the skewt package.
shash:There is no closed form expression for the quantile function of the Sinh-Arcsinh distribution. For this reason, the quantiles are calculated through the qSHASHo
function of the gamlss package.
A vector containing the quantile values at the user specified points s
.
Dimitrios Bagkavos and Lucia Gamez Gallardo
R implementation and documentation: Dimitrios Bagkavos <dimitrios.bagkavos@gmail.com> , Lucia Gamez Gallardo <gamezgallardolucia@gmail.com>
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.