meemul:

Usage Arguments Examples

Usage

1
meemul(x, alpha = 0.05)

Arguments

x
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
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) 
{
    if (!is.list(x)) 
        stop("Data must be stored in list mode.")
    J <- length(x)
    CC <- (J^2 - J)/2
    test <- matrix(NA, CC, 5)
    for (j in 1:J) {
        xx <- !is.na(x[[j]])
        val <- x[[j]]
        x[[j]] <- val[xx]
    }
    dimnames(test) <- list(NULL, c("Group", "Group", "phat", 
        "ci.lower", "ci.upper"))
    jcom <- 0
    crit <- smmcrit(200, CC)
    if (alpha != 0.05) 
        crit <- smmcrit01(200, CC)
    alpha <- 1 - pnorm(crit)
    for (j in 1:J) {
        for (k in 1:J) {
            if (j < k) {
                temp <- mee(x[[j]], x[[k]], alpha)
                jcom <- jcom + 1
                test[jcom, 1] <- j
                test[jcom, 2] <- k
                test[jcom, 3] <- temp$phat
                test[jcom, 4] <- temp$ci[1]
                test[jcom, 5] <- temp$ci[2]
            }
        }
    }
    list(test = test)
  }

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