50% off | Unlimited Data & AI Learning

Last chance! 50% off unlimited learning

Sale ends in


asymmetry.measures (version 0.2)

Rhostar.p.exact: Calculates the exact value of ρp, used in the implementation of the strong asymmetry measure η(X).

Description

Returns ρp, used in the calculation of the strong asymetry measure η(X).

Usage

Rhostar.p.exact(xin, p.param, dist, p1, p2)

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.

Value

Returns a scalar, the exact value of ρp.

Details

Implements the quantity

23pξ1pf2(x)(1F(x))dx+p2ξ1pf2(x)dx{pξ1pf3(x)dx(ξ1pf2(x)dx)2}1/2

defined on page 6 Patil, Bagkavos and Wood (2014), see also (5) in Bagkavos, Patil and Wood (2016). This implementation uses exact calculation of the functionals in the definition of ρp.

References

See Also

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

Examples

Run this code
# NOT RUN {
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
Rhostar.p.exact(xout,param,selected.r,shape,scale)  # calculate Rhostar.p.exact
#-0.05206678  # 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
Rhostar.p.exact(xout,param,selected.r2,mean,sd) # calculate Rhostar.p.exact
#-0.008687447 # 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
Rhostar.p.exact(xout,param,selected.r3,location,scale) # calculate Rhostar.p.exact
#0.0280602  # returns the result
  
# }

Run the code above in your browser using DataLab