1 | bmpmul(x, alpha = 0.05)
|
x |
|
alpha |
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 (x, alpha = 0.05)
{
if (is.matrix(x))
x <- listm(x)
if (!is.list(x))
stop("Data must be stored in a matrix or in list mode.")
J <- length(x)
CC <- (J^2 - J)/2
test <- matrix(NA, CC, 7)
for (j in 1:J) {
xx <- !is.na(x[[j]])
val <- x[[j]]
x[[j]] <- val[xx]
}
dimnames(test) <- list(NULL, c("Group", "Group", "P.hat",
"ci.lower", "ci.upper", "df", "p.value"))
jcom <- 0
for (j in 1:J) {
for (k in 1:J) {
if (j < k) {
temp <- bmp(x[[j]], x[[k]], alpha)
crit <- 0 - smmcrit(temp$df, CC)
if (alpha != 0.05)
crit <- 0 - smmcrit01(temp$df, CC)
temp <- bmp(x[[j]], x[[k]], crit = crit)
jcom <- jcom + 1
test[jcom, 1] <- j
test[jcom, 2] <- k
test[jcom, 3] <- temp$phat
test[jcom, 4] <- temp$ci.p[1]
test[jcom, 5] <- temp$ci.p[2]
test[jcom, 6] <- temp$df
test[jcom, 7] <- temp$sig.level
}
}
}
list(test = test)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.