1 | tauall(m)
|
m |
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 | ##---- 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 (m)
{
if (!is.matrix(m))
stop("Data must be stored in an n by p matrix")
taum <- matrix(0, ncol(m), ncol(m))
siglevel <- matrix(NA, ncol(m), ncol(m))
for (i in 1:ncol(m)) {
ip1 <- i
for (j in ip1:ncol(m)) {
if (i < j) {
pbc <- tau(m[, i], m[, j])
taum[i, j] <- pbc$cor
taum[j, i] <- pbc$cor
siglevel[i, j] <- pbc$siglevel
siglevel[j, i] <- siglevel[i, j]
}
}
}
list(taum = taum, p.value = siglevel)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.