| mwhit.boot {equivalence} | R Documentation |
~~ A concise (1-5 lines) description of what the function does. ~~
mwhit.boot(xy, i, q1 = pnorm(-0.5 * sqrt(2)), q2 = pnorm(+0.5 * sqrt(2)))
xy |
~~Describe xy here~~ |
i |
~~Describe i here~~ |
q1 |
~~Describe q1 here~~ |
q2 |
~~Describe q2 here~~ |
~~ If necessary, more details than the description above ~~
~Describe the value returned If it is a LIST, use
comp1 |
Description of 'comp1' |
comp2 |
Description of 'comp2' |
...
....
~~further notes~~
~Make other sections like Warning with section{Warning }{....} ~
~~who you are~~
~put references to the literature/web site here ~
~~objects to See Also as help, ~~~
##---- 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)
}