discmcp:

Usage Arguments Examples

Usage

1
discmcp(x, alpha = 0.05, nboot = 500, SEED = TRUE, ...)

Arguments

x
alpha
nboot
SEED
...

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
31
32
33
34
35
36
37
38
39
##---- 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, alpha = 0.05, nboot = 500, SEED = TRUE, ...) 
{
    if (is.matrix(x)) 
        x <- listm(x)
    if (!is.list(x)) 
        stop("Data must be stored in list mode or in matrix mode.")
    J <- length(x)
    ncon = (J^2 - J)/2
    Jm <- J - 1
    dvec = alpha/c(1:ncon)
    if (SEED) 
        set.seed(2)
    output <- matrix(NA, nrow = ncon, ncol = 4)
    dimnames(output) <- list(NULL, c("Group", "Group", "p.value", 
        "p.crit"))
    ic = 0
    for (j in 1:J) {
        for (k in 1:J) {
            if (j < k) {
                ic = ic + 1
                output[ic, 1] = j
                output[ic, 2] = k
                output[ic, 3] = disc2com(x[[j]], x[[k]], SEED = FALSE, 
                  nboot = nboot)$p.value
            }
        }
    }
    temp2 <- order(0 - output[, 3])
    zvec <- dvec[1:ncon]
    sigvec <- (test[temp2] >= zvec)
    output[temp2, 4] <- zvec
    num.sig <- sum(output[, 3] <= output[, 4])
    list(output = output, num.sig = num.sig)
  }

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