Rho.p {asymmetry.measures}R Documentation

Calculates \rho_p, used in the implementation of the strong asymmetry measure \eta(X).

Description

Estimates \rho_p, used in the calculation of the strong asymetry measure \eta(X).

Usage

  Rho.p(xin, p.param, dist, p1=0, p2=1)

Arguments

xin

A vector of data points - the available sample.

p.param

A parameter with the value greater than or equal to 1/2 and less than 1.

dist

Character string, specifies selected distribution function.

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

Implements the quantity:

\frac{ 2\sqrt{3}}{p} \frac{-\int_{-\infty}^{\xi_p} f^2(x)F(x)\,dx - \frac{p}{2}\int_{-\infty}^{\xi_p} f^2(x)\,dx}{ \left \{ p\int_{-\infty}^{\xi_p} f^3(x)\,dx-(\int_{-\infty}^{\xi_p} f^2(x)\,dx)^2 \right \}^{1/2} }

defined on page 6 Patil, Bagkavos and Wood, see also (4) in Bagkavos, Patil and Wood . Estimation of the p.d.f. and c.d.f. functions is currently performed by maximum likelihood as e.g. kernel estimates inherit large amount of variance to \rho_p.

Value

Returns a scalar, the value of \rho_p.

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

Rho.p.exact,Rhostar.p, Rhostar.p.exact

Examples

set.seed(1234)

selected.r <- "weib" #select Weibull as the distribution
shape <- 1 # specify shape parameter
scale <- 1  # specify scale parameter
n <- 100    # specify sample size
param <- 0.9 # specify parameter
xout<-r.sample(n,selected.r,shape,scale) # specify sample
Rho.p(xout,param,selected.r,shape,scale)  # calculate Rho.p
#-0.06665222  # returns the result

selected.r2 <- "norm" #select Normal as the distribution
n <- 100    # specify sample size
mean <- 0 # specify the mean
sd <- 1 # specify the variance
param <- 0.9 # specify parameter
xout <-r.sample(n,selected.r2,mean,sd) # specify sample
Rho.p(xout,param,selected.r2,mean,sd) # calculate Rho.p
#-0.1005591 # returns the result


selected.r3 <- "cauchy" #select Cauchy as the distribution
n <- 100    # specify sample size
location <- 0 # specify the location parameter
scale <- 1 # specify the scale parameter
param <- 0.9 # specify parameter
xout<-r.sample(n,selected.r3,location,scale) # specify sample
Rho.p(xout,param,selected.r3,location,scale) # calculate Rho.p
#-0.0580943  # returns the result

      

[Package asymmetry.measures version 0.2 Index]