1 |
J |
|
K |
|
x |
|
grp |
|
p |
|
tr |
|
alpha |
|
dif |
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 | ##---- 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, alpha = 0.05,
dif = FALSE)
{
Qa <- NA
Qab <- NA
if (is.list(x))
x <- elimna(matl(x))
if (is.data.frame(x))
x = as.matrix(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.")
tmeans <- 0
temp <- con2way(J, K)
Qa <- rmmcp(x, con = temp$conA, alpha = alpha, dif = dif,
tr = tr)
Qb <- rmmcp(x, con = temp$conB, alpha = alpha, dif = dif,
tr = tr)
Qab <- rmmcp(x, con = temp$conAB, alpha = alpha, dif = dif,
tr = tr)
list(Qa = Qa, Qb = Qb, Qab = Qab)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.