p.sample {asymmetry.measures} | R Documentation |
Switch between a range of available cumulative distribution functions.
Description
Returns the value of the selected cumulative distribution function at user supplied grid points.
Usage
p.sample(s,dist, p1,p2)
Arguments
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. |
Details
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
with
where
is the shape parameter and
the scale parameter.
lognorm: The lognormal distribution is implemented as
where
is the mean,
is the standard deviation and
is the cumulative distribution function of the standard normal distribution.
norm: The normal distribution is implemented as
where
is the mean and the
is the standard deviation.
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 is implemented as
where
,
,
and
is the Owens T function, defined by
fas: The Fernandez and Steel distribution is implemented as
where
is the p.d.f. of the t distribution with
degrees of freedom.
controls the skewness of the distribution with values between
and
is 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 cumulative distribution function 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.d <- "weib" #select Weibull as the CDF
shape <- 2 # specify shape parameter
scale <- 1 # specify scale parameter
xout <- seq(0.1,5,length=50) #design point where the CDF is evaluated
p.sample(xout,selected.d,shape,scale) # calculate CDF at xout