1 |
x |
|
y |
|
adfun |
|
gfun |
|
xlab |
|
ylab |
|
plotfun |
|
xout |
|
outfun |
|
... |
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 | ##---- 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, adfun = adrun, gfun = runm3d, xlab = "Additive Fit",
ylab = "Gen. Fit", plotfun = lplot, xout = FALSE, outfun = out,
...)
{
x = as.matrix(x)
p = ncol(x)
p1 = p + 1
temp = elimna(cbind(x, y))
x = temp[, 1:p]
y = temp[, p1]
if (xout) {
flag <- outfun(x, ...)$keep
x <- as.matrix(x)
x <- x[flag, ]
y <- y[flag]
x <- as.matrix(x)
}
fit1 <- adfun(x, y, pyhat = TRUE, plotit = FALSE, ...)
if (is.list(fit1))
fit1 = fit1[[length(fit1)]]
fit2 <- gfun(x, y, pyhat = TRUE, plotit = FALSE, pr = FALSE,
...)
if (is.list(fit2))
fit2 = fit2[[length(fit2)]]
plotfun(fit1, fit2, xlab = xlab, ylab = ylab)
abline(0, 1)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.