wwwmcp:

Usage Arguments Examples

Usage

1
wwwmcp(J, K, L, x, tr = 0.2, alpha = 0.05, dif = TRUE, op = FALSE, grp = NA)

Arguments

J
K
L
x
tr
alpha
dif
op
grp

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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
##---- 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 (J, K, L, x, tr = 0.2, alpha = 0.05, dif = TRUE, op = FALSE, 
    grp = NA) 
{
    if (is.data.frame(x)) 
        x = as.matrix(x)
    JKL <- J * K * L
    if (is.matrix(x)) 
        x <- listm(x)
    if (!is.na(grp[1])) {
        yy <- x
        x <- list()
        for (j in 1:length(grp)) x[[j]] <- yy[[grp[j]]]
    }
    if (!is.list(x)) 
        stop("Data must be stored in list mode or a matrix.")
    for (j in 1:JKL) {
        xx <- x[[j]]
        x[[j]] <- xx[!is.na(xx)]
    }
    if (JKL != length(x)) 
        warning("The number of groups does not match the number of contrast coefficients.")
    for (j in 1:JKL) {
        temp <- x[[j]]
        temp <- temp[!is.na(temp)]
        x[[j]] <- temp
    }
    temp <- con3way(J, K, L)
    conA <- temp$conA
    conB <- temp$conB
    conC <- temp$conC
    conAB <- temp$conAB
    conAC <- temp$conAC
    conBC <- temp$conBC
    conABC <- temp$conABC
    Factor.A <- rmmcp(x, con = conA, tr = tr, alpha = alpha, 
        dif = dif)
    Factor.B <- rmmcp(x, con = conB, tr = tr, alpha = alpha, 
        dif = dif)
    Factor.C <- rmmcp(x, con = conC, tr = tr, alpha = alpha, 
        dif = dif)
    Factor.AB <- rmmcp(x, con = conAB, tr = tr, alpha = alpha, 
        dif = dif)
    Factor.AC <- rmmcp(x, con = conAC, tr = tr, alpha = alpha, 
        dif = dif)
    Factor.BC <- rmmcp(x, con = conBC, tr = tr, alpha = alpha, 
        dif = dif)
    Factor.ABC <- rmmcp(x, con = conABC, tr = tr, alpha = alpha, 
        dif = dif)
    list(Factor.A = Factor.A, Factor.B = Factor.B, Factor.C = Factor.C, 
        Factor.AB = Factor.AB, Factor.AC = Factor.AC, Factor.BC = Factor.BC, 
        Factor.ABC = Factor.ABC, conA = conA, conB = conB, conC = conC, 
        conAB = conAB, conAC = conAC, conBC = conBC, conABC = conABC)
  }

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