| pdfthird {asymmetry.measures} | R Documentation |
Calculate f^3(x)
Description
Return the value of f^3(x).
Usage
pdfthird(s,dist, p1,p2)
Arguments
s |
A scalar or vector: the x-axis grid points where the probability density 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 density. |
p2 |
A scalar. Parameter 2 (vector or object) of the selected density. |
Details
Based on user-specified argument dist, the function returns the value of f^3(x)dx, used in the definitions of \rho_p^*, \rho_p and their exact versions.
Supported distributions (along with the corresponding dist values) are:
weib: The weibull distribution is implemented as
f(s;p_1,p_2)= \frac{p_1}{p_2} \left (\frac{s}{p_2}\right )^{p_1-1} \exp \left \{- \left (\frac{s}{p_2}\right )^{p_1} \right \}with
s \ge 0wherep_1is the shape parameter andp_2the scale parameter.lognorm: The lognormal distribution is implemented as
f(s) = \frac{1}{p_2s\sqrt{2\pi}}e^{-\frac{(log s -p_1)^2}{2p_2^2}}where
p_1is the mean andp_2is the standard deviation of the distirbution.norm: The normal distribution is implemented as
f(s) = \frac{1}{p_2\sqrt{2 \pi}}e^{-\frac{ (s - p_1)^2 }{ 2p_2^2 }}where
p_1is the mean and thep_2is the standard deviation of the distirbution.uni: The uniform distribution is implemented as
f(s) = \frac{1}{p_2-p_1}for
p_1 \le s \le p_2.cauchy: The cauchy distribution is implemented as
f(s)=\frac{1}{\pi p_2 \left \{1+( \frac{s-p_1}{p_2})^2\right \} }where
p_1is the location parameter andp_2the scale parameter.fnorm: The half normal distribution is implemented as
2 f(s)-1where
f(s) = \frac{1}{sd\sqrt{2 \pi} }e^{-\frac{s^2}{2 sd^2 }},and
sd=\sqrt{\pi/2}/p_1.normmixt:The normal mixture distribution is implemented as
f(s)=p_1\frac{1}{p_2[2] \sqrt{2\pi} } e^{- \frac{ (s - p_2[1])^2}{2p_2[2]^2}} +(1-p_1)\frac{1}{p_2[4]\sqrt{2\pi}} e^{-\frac{(s - p_2[3])^2}{2p_2[4]^2 }}where
p1is a mixture component(scalar) andp_2a vector of parameters for the mean and variance of the two mixture componentsp_2= c(mean1, sd1, mean2, sd2).skewnorm: The skew normal distribution with parameter
p_1is implemented asf(s)=2\phi(s)\Phi(p_1s).
fas: The Fernandez and Steel distribution is implemented as
f(s; p_1, p_2) = \frac{2}{p_1+\frac{1}{p_1}} \left \{ f_t(s/p_1; p_2) I_{\{s \ge 0\}} + f_t(p_1s; p_2)I_{\{s<0 \}}\right \}where
f_t(x;\nu)is the p.d.f. of thetdistribution with\nu = 5degrees of freedom.p_1controls the skewness of the distribution with values between(0, +\infty)andp_2denotes the degrees of freedom.shash: The Sinh-Arcsinh distribution is implemented as
f(s;\mu, p_1, p_2, \tau) = \frac{ce^{-r^2/2}}{\sqrt{2\pi }} \frac{1}{p_2} \frac{1}{2} \sqrt{1+z^2}where
r=\sinh(\sinh(z)-(-p_1)),c=\cosh(\sinh(z)-(-p_1))andz=((s-\mu)/p2).p_1is the vector of skewness,p_2is the scale parameter,\mu=0is the location parameter and\tau=1the kurtosis parameter.
Value
A vector containing the user selected density values at the user specified points s.
Author(s)
Dimitrios Bagkavos and Lucia Gamez Gallardo
R implementation and documentation: Dimitrios Bagkavos <dimitrios.bagkavos@gmail.com> ,Lucia Gamez Gallardo <gamezgallardolucia@gmail.com>
References
See Also
Examples
selected.dens <- "weib" #select Weibull
shape <- 2 # specify shape parameter
scale <- 1 # specify scale parameter
xout <- seq(0.1,5,length=50) #design point
pdfthird(xout,selected.dens,shape,scale) # calculate density to the cube at xout