mwhit.boot {equivalence}R Documentation

~~function to do ... ~~

Description

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

Usage

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

Arguments

xy ~~Describe xy 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(xy, i, q1=pnorm(-0.5*sqrt(2)), q2=pnorm(+0.5*sqrt(2)))
{
   x <- xy[i, 1]
   y <- xy[i, 2]
   n1 <- length(x)
   n2 <- length(y)

   W <- .C("sumW", as.double(x), as.double(y), as.integer(n1), as.integer(n2),
            result=as.integer(0))$result / (n1*n2)

   piXXY <- .C("sumXXY", as.double(x), as.double(y), as.integer(n1), as.integer(n2),
            result=as.integer(0))$result * 2/(n1*n2)/(n1-1)
   piXYY <- .C("sumXYY", as.double(x), as.double(y), as.integer(n1), as.integer(n2),
            result=as.integer(0))$result * 2/(n1*n2)/(n2-1)

   VarW <- VarW(W, piXXY, piXYY, n1, n2)
   eps1 <- 1/2 - pnorm(-0.5/sqrt(2))
   eps2 <- pnorm(1.0/sqrt(2)) - 1/2
   Wstat <- Wstatistic(W, eps1, eps2, VarW)

   VarW <- max(VarW, 0.001)
   C <- Wcutoff(0.05, eps1, eps2, VarW)

   result <- (Wstat < C)
  }

[Package equivalence version 0.4.1 Index]