1 |
dfvec |
|
iter |
|
alpha |
|
SEED |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | ##---- 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 (dfvec, iter = 10000, alpha = 0.05, SEED = TRUE)
{
if (SEED)
set.seed(1)
dfv <- length(dfvec)/sum(1/dfvec)
vals <- NA
tvals <- NA
J <- length(dfvec)
for (i in 1:iter) {
for (j in 1:J) {
tvals[j] <- rt(1, dfvec[j])
}
vals[i] <- max(tvals) - min(tvals)
}
vals <- sort(vals)
ival <- round((1 - alpha) * iter)
qval <- vals[ival]
qval
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.