1 |
x |
|
y |
|
q |
|
bop |
|
nboot |
|
se.val |
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 | ##---- 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 = NA, q = 0.5, bop = FALSE, nboot = 100, se.val = NA)
{
if (!is.na(y[1]))
x <- cbind(x, y)
if (!is.matrix(x))
stop("Something is wrong, with x or y")
x <- elimna(x)
y <- x[, 2]
x <- x[, 1]
n <- length(y)
df <- n - 1
if (is.na(se.val[1])) {
if (!bop)
se.val <- sedm(x, y, q = q)
if (bop)
se.val <- bootdse(x, y, est = qest, q = q, pr = FALSE,
nboot = nboot)
}
test <- (qest(x, q) - qest(y, q))/se.val
sig.level <- 2 * (1 - pt(abs(test), df))
list(test.stat = test, p.value = sig.level, se = se.val)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.