1 |
J |
|
K |
|
x |
|
grp |
|
p |
|
tr |
|
nboot |
|
alpha |
|
SEED |
|
pr |
|
bhop |
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 | ##---- 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, grp = c(1:p), p = J * K, tr = 0.2, nboot = NA,
alpha = 0.05, SEED = TRUE, pr = TRUE, bhop = FALSE)
{
if (SEED)
set.seed(2)
if (is.list(x))
x <- elimna(matl(x))
if (is.matrix(x))
x <- elimna(x)
data <- x
if (is.matrix(data))
data <- listm(data)
if (!is.list(data))
stop("Data are not stored in list mode or a matrix")
if (p != length(data)) {
print("The total number of groups, based on the specified levels, is")
print(p)
print("The number of groups stored in x is")
print(length(data))
print("Warning: These two values are not equal")
}
if (p != length(grp))
stop("Apparently a subset of the groups was specified that does not match the total number of groups indicated by the values for J and K.")
temp = con2way(J, K)
conA <- temp$conA
conB <- temp$conB
conAB <- temp$conAB
if (pr)
print("Taking bootstrap samples")
Factor.A <- medpb(x, con = conA, alpha = alpha, nboot = nboot,
bhop = bhop, SEED = FALSE)
Factor.B <- medpb(x, con = conB, alpha = alpha, nboot = nboot,
bhop = bhop, SEED = FALSE)
Factor.AB <- medpb(x, con = conAB, alpha = alpha, nboot = nboot,
bhop = bhop, SEED = FALSE)
list(Factor.A = Factor.A, Factor.B = Factor.B, Factor.AB = Factor.AB,
bhop = bhop, SEED = FALSE)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.