bbmcp:

Usage Arguments Examples

Usage

1
bbmcp(J, K, x, tr = 0.2, alpha = 0.05, grp = NA, op = FALSE)

Arguments

J
K
x
tr
alpha
grp
op

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
##---- 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, x, tr = 0.2, alpha = 0.05, grp = NA, op = FALSE) 
{
    JK <- J * K
    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:JK) {
        xx <- x[[j]]
        x[[j]] <- xx[!is.na(xx)]
    }
    if (JK != length(x)) 
        warning("The number of groups does not match the number of contrast coefficients.")
    for (j in 1:JK) {
        temp <- x[[j]]
        temp <- temp[!is.na(temp)]
        x[[j]] <- temp
    }
    temp <- con2way(J, K)
    conA <- temp$conA
    conB <- temp$conB
    conAB <- temp$conAB
    if (!op) {
        Factor.A <- lincon(x, con = conA, tr = tr, alpha = alpha)
        Factor.B <- lincon(x, con = conB, tr = tr, alpha = alpha)
        Factor.AB <- lincon(x, con = conAB, tr = tr, alpha = alpha)
    }
    All.Tests <- NA
    if (op) {
        Factor.A <- NA
        Factor.B <- NA
        Factor.AB <- NA
        con <- cbind(conA, conB, conAB)
        All.Tests <- lincon(x, con = con, tr = tr, alpha = alpha)
    }
    list(Factor.A = Factor.A, Factor.B = Factor.B, Factor.AB = Factor.AB, 
        All.Tests = All.Tests, conA = conA, conB = conB, conAB = conAB)
  }

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