pdfsq {asymmetry.measures} | R Documentation |
Calculate
Description
Calculates the square of a density.
Usage
pdfsq(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 , used in the definitions of
,
and their exact versions.
Supported distributions (along with the corresponding dist
values) are:
weib: The weibull distribution is implemented as
with
where
is the shape parameter and
the scale parameter.
lognorm: The lognormal distribution is implemented as
where
is the mean and
is the standard deviation of the distirbution.
norm: The normal distribution is implemented as
where
is the mean and the
is the standard deviation of the distirbution.
uni: The uniform distribution is implemented as
for
.
cauchy: The cauchy distribution is implemented as
where
is the location parameter and
the scale parameter.
fnorm: The half normal distribution is implemented as
where
and
.
normmixt:The normal mixture distribution is implemented as
where
is a mixture component(scalar) and
a vector of parameters for the mean and variance of the two mixture components
.
skewnorm: The skew normal distribution with parameter
is implemented as
.
fas: The Fernandez and Steel distribution is implemented as
where
is the p.d.f. of the
distribution with
degrees of freedom.
controls the skewness of the distribution with values between
and
denotes the degrees of freedom.
shash: The Sinh-Arcsinh distribution is implemented as
where
,
and
.
is the vector of skewness,
is the scale parameter,
is the location parameter and
the 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
pdfsq(xout,selected.dens,shape,scale) # calculate the square density at xout