1 |
x |
|
y |
|
z |
|
pt |
|
fr |
|
est |
|
regfun |
|
testit |
|
... |
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 | ##---- 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, z, pt = median(z), fr = 0.8, est = onestep, regfun = tsreg,
testit = FALSE, ...)
{
m <- cbind(x, y, z)
m <- elimna(m)
x <- m[, 1]
y <- m[, 2]
z <- m[, 3]
flag <- (z < pt)
runmean2g(x[flag], y[flag], x[!flag], y[!flag], fr = fr,
est = est, ...)
output <- "Done"
if (testit) {
abline(regfun(x[flag], y[flag])$coef)
abline(regfun(x[!flag], y[!flag])$coef, lty = 2)
output <- reg2ci(x[flag], y[flag], x[!flag], y[!flag],
regfun = regfun, plotit = FALSE)
}
output
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.