Description Usage Arguments Details Value Author(s) References See Also Examples
Returns the value of the selected cumulative distribution function at user supplied grid points.
1 |
s |
A scalar or vector: the x-axis grid points where the cumulative distribution function is 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 the user-specified argument dist
, the function returns the value of the cumulative distribution function at s
.
Supported distributions (along with the corresponding dist
values) are:
weib: The Weibull distribution is implemented as
F(s) = 1 - \exp ≤ft \{- ≤ft ( \frac{s}{p_2} \right )^{p_1} \right \}
with s > 0 where p_1 is the shape parameter and p_2 the scale parameter.
lognorm: The lognormal distribution is implemented as
F(s)=Φ ≤ft ( \frac{\ln s-p_1 }{p_2} \right )
where p_1 is the mean,p_2 is the standard deviation and Φ is the cumulative distribution function of the standard normal distribution.
norm: The normal distribution is implemented as
Φ(s)={\frac {1}{√ {2π}p_2 }}\int_{-∞ }^s e^{-\frac{(t-p_1)^2}{2p_2^2}}\,dt
where p_1 is the mean and the p_2 is the standard deviation.
uni: The uniform distribution is implemented as
F(s)=\frac{s-p_1}{p_2-p_1}
for p_1 ≤ s ≤ p_2.
cauchy: The cauchy distribution is implemented as
F(s;p_1,p_2)=\frac{1}{π}\arctan ≤ft ( \frac{s-p_1}{p_2} \right ) + \frac{1}{2}
where p_1 is the location parameter and p_2 the scale parameter.
fnorm: The half normal distribution is implemented as
F_S(s;σ)=\int_0^s \frac{√{2/π}}{σ} \exp ≤ft \{ -\frac{x^2}{2σ^2} \right \} \,dx
where mean=0 and sd=√{π/2}/p_1.
normmixt: The normal mixture distribution is implemented as
F(s)=p_1\frac{1}{p_2[2]√{2π}}\int_{-∞ }^{s}e^{-\frac{(t - p_2[1])^2}{2p_2[2]^2}}\,dt + (1-p_1) \frac{1}{p_2[4]√{2π}} \int_{-∞ }^s e^{-\frac{(t - p2[3])^2}{2p_2[4]^2}}\,dt
where p_1 is a mixture component(scalar) and p_2 a vector of parameters for the mean and variance of the two mixture components p_2=c(mean1,sd1,mean2,sd2).
skewnorm: The skew normal distribution is implemented as
F(y; p_1) = Φ ≤ft ( \frac{y-ξ}{ω} \right )-2 T ≤ft ( \frac{y-ξ}{ω},p_1 \right )
where location=ξ=0, scale=ω=1, parameter=p_1 and T(h, a) is the Owens T function, defined by
T(h,a) = \frac{1}{2π}\int_{0}^{a} \exp ≤ft \{ \frac{- 0.5 h^2 (1+x^2) }{1+x^2} \right \} \,dx, -∞ ≤ h, a ≤ ∞
fas: The Fernandez and Steel distribution is implemented as
F(s;p_1,p_2) = \frac{2}{p_1+\frac{1}{p_1}} ≤ft \{ \int_{-∞}^s f_t(x/p_1; p_2)I_{\{x ≥ 0\}} \,dx + \int_{-∞}^s f_t(p_1 x; p_2)I_{\{x<0\}}\, dx \right \}
where f_t(x; ν) is the p.d.f. of the t distribution with ν = 5 degrees of freedom.p_1 controls the skewness of the distribution with values between (0, +∞) and p_2 is the degrees of freedom.
shash: The Sinh-Arcsinh distribution is implemented as
F(s;μ, p_2, p_1, τ) =\int_{-∞}^s \frac{ce^{-r^2/2}}{√{2π }} \frac{1}{p_2} \frac{1}{2} √{1+z^2}\,dz
where r=\sinh(\sinh(z)- p_1), c=\cosh(\sinh(z)- p_1) and z=(s-μ)/p_2. p_1 is the vector of skewness, p_2 is the scale parameter, μ=0 is the location parameter and τ=1 the kurtosis parameter.
A vector containing the cumulative distribution function 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 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.