1 |
x |
|
y |
|
HD |
|
qval |
|
xlab |
|
ylab |
|
fr |
|
sm |
|
nboot |
|
SEED |
|
eout |
|
xout |
|
... |
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 40 41 42 43 44 45 | ##---- 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, HD = FALSE, qval = c(0.2, 0.5, 0.8), xlab = "X",
ylab = "Y", fr = 1, sm = FALSE, nboot = 40, SEED = TRUE,
eout = FALSE, xout = FALSE, ...)
{
rmd1 <- NA
xx <- cbind(x, y)
p <- ncol(xx) - 1
xx <- elimna(xx)
x <- xx[, 1:p]
y <- xx[, ncol(xx)]
plot(x, y, xlab = xlab, ylab = ylab)
sx1 <- sort(x)
xorder1 <- order(x)
for (it in 1:length(qval)) {
if (!sm) {
if (!HD)
temp <- rungen(x, y, est = qest, fr = fr, pyhat = TRUE,
plotit = FALSE, q = qval[it])
if (HD)
temp <- rungen(x, y, est = hd, fr = fr, pyhat = TRUE,
plotit = FALSE, q = qval[it])
rmd1 <- temp[1]$output
sysm1 <- rmd1[xorder1]
lines(sx1, sysm1)
}
if (sm) {
if (!HD)
temp <- runmbo(x, y, est = qest, fr = fr, pyhat = TRUE,
plotit = FALSE, SEED = SEED, nboot = nboot,
eout = FALSE, xout = FALSE, q = qval[it])
if (HD)
temp <- runmbo(x, y, est = hd, fr = fr, pyhat = TRUE,
plotit = FALSE, SEED = SEED, nboot = nboot,
eout = FALSE, xout = FALSE, q = qval[it])
rmd1 <- temp
sysm1 <- rmd1[xorder1]
lines(sx1, sysm1)
}
}
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.