1 |
x |
|
y |
|
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 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | ##---- 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, y, SEED = TRUE)
{
nboot <- 599
xy <- elimna(cbind(x, y))
x <- xy[, 1]
y <- xy[, 2]
if (SEED)
set.seed(2)
data <- matrix(sample(length(y), size = length(y) * nboot,
replace = TRUE), nrow = nboot)
bvec <- apply(data, 1, pcorbsub, x, y)
ilow <- 15
ihi <- 584
if (length(y) < 250) {
ilow <- 14
ihi <- 585
}
if (length(y) < 180) {
ilow <- 11
ihi <- 588
}
if (length(y) < 80) {
ilow <- 8
ihi <- 592
}
if (length(y) < 40) {
ilow <- 7
ihi <- 593
}
bsort <- sort(bvec)
r <- cor(x, y)
ci <- c(bsort[ilow], bsort[ihi])
list(r = r, ci = ci)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.