1 |
m |
|
beta |
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 | ##---- 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, beta = 0.1)
{
n <- nrow(m)
nu <- n - 2
a <- nu - 0.5
b <- 48 * a^2
nmm <- ncol(m) - 1
c <- matrix(0, ncol(m), ncol(m))
for (i in 1:nmm) {
ip1 <- i + 1
for (j in ip1:ncol(m)) {
tjk <- tjk * sqrt(nu/(1 - tjk^2))
c[i, j] <- sqrt(a * log(1 + tjk^2/nu))
c[i, j] <- c[i, j] + (c[i, j]^3 + 3 * c[i, j])/b
c[i, j] <- c[i, j] - (4 * c[i, j]^7 + 33 * c[i, j]^5 +
240 * c[i, j]^3 + 855 * c[i, j])/(10 * b^2 +
8 * b * c[i, j]^4 + 1000 * b)
}
}
h <- sum(c)
sig <- 1 - pchisq(h, ncol(m) * (ncol(m) - 1)/2)
list(teststat = h, p.value = sig)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.