1 |
x |
|
y |
|
regfun |
|
outfun |
|
plotit |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ##---- 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, regfun = tsreg, outfun = outbox, plotit = TRUE)
{
m <- cbind(x, y)
m <- elimna(m)
flag <- outmgvf(m, outfun = outfun, plotit, SEED = SEED)$out.id
ivec <- rep(T, nrow(m))
ivec[flag] <- F
x <- as.matrix(x)
temp <- regfun(x[ivec, ], y[ivec])
coef <- temp$coef
if (plotit && ncol(m) == 2)
abline(coef)
residuals <- temp$residuals
list(coef = coef, residuals = residuals)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.