1 | bootdep(x, tr = 0.2, nboot = 500)
|
x |
|
tr |
|
nboot |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | ##---- 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, tr = 0.2, nboot = 500)
{
if (is.matrix(x))
m1 <- x
if (is.list(x)) {
m1 <- matrix(NA, ncol = length(x))
for (j in 1:length(x)) m1[, j] <- x[[j]]
}
data <- matrix(sample(nrow(m1), size = nrow(m1) * nboot,
replace = TRUE), nrow = nboot)
bvec <- matrix(NA, ncol = ncol(m1), nrow = nboot)
for (j in 1:ncol(m1)) {
temp <- m1[, j]
bvec[, j] <- apply(data, 1, bootdepsub, temp, tr)
}
bvec
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.