srank.boot {equivalence}R Documentation

~~function to do ... ~~

Description

~~ A concise (1-5 lines) description of what the function does. ~~

Usage

srank.boot(x, i, q1 = pnorm(-0.5 * sqrt(2)), q2 = pnorm(+0.5 * sqrt(2)))

Arguments

x ~~Describe x here~~
i ~~Describe i here~~
q1 ~~Describe q1 here~~
q2 ~~Describe q2 here~~

Details

~~ If necessary, more details than the description above ~~

Value

~Describe the value returned If it is a LIST, use

comp1 Description of 'comp1'
comp2 Description of 'comp2'

...

Warning

....

Note

~~further notes~~

~Make other sections like Warning with section{Warning }{....} ~

Author(s)

~~who you are~~

References

~put references to the literature/web site here ~

See Also

~~objects to See Also as help, ~~~

Examples

##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--    or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function(x, i, q1=pnorm(-0.5*sqrt(2)), q2=pnorm(+0.5*sqrt(2)))
{
   x <- x[i]
   n <- length(x)
   U <- .C("sumU", as.double(x), as.integer(n), result=as.integer(0))$result
   q <- .C("sumq", as.double(x), as.integer(n), result=as.integer(0))$result
   U <- U / choose(n,2)
   q <- q / choose(n,3) / 3

   VarU <- VarU(U, q, n)
   q1 <- pnorm(-0.5*sqrt(2))
   q2 <- pnorm(+0.5*sqrt(2))
   Ustat <- Ustatistic(U, q1, q2, VarU)

   VarU <- max(VarU, 0.001)
   C <- Ucutoff(0.05, q1, q2, VarU)

   result <- (Ustat < C)
  }

[Package equivalence version 0.4.1 Index]