M1M2:

Usage Arguments Examples

Usage

1
M1M2(m1, m2, test = yuen, alpha = 0.05, ...)

Arguments

m1
m2
test
alpha
...

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
##---- 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 (m1, m2, test = yuen, alpha = 0.05, ...) 
{
    vals = 0
    if (is.list(m1)) 
        m1 = matl(m1)
    if (is.list(m2)) 
        m2 = matl(m2)
    m1 = as.matrix(m1)
    m2 = as.matrix(m2)
    ntest = ncol(m1)
    outp = matrix(0, ncol = 2, nrow = ntest)
    dimnames(outp) = list(NULL, c("p.value", "crit.p.value"))
    if (ncol(m1) != ncol(m2)) 
        stop("m1 and m2 do not have the same number of columns")
    for (i in 1:ncol(m1)) vals[i] = test(m1[, i], m2[, i], ...)$p.value
    outp[, 1] = vals
    dvec = alpha/(c(1:ntest))
    temp2 <- order(0 - vals)
    zvec <- dvec
    outp[temp2, 2] = zvec
    flag = (outp[, 1] <= outp[, 2])
    dd = sum(outp[, 1] <= outp[, 2])
    chk = c(1:ntest)
    list(results = outp, number.sig = dd, sig.tests = chk[flag])
  }

musto101/wilcox_R documentation built on May 23, 2019, 10:52 a.m.