outmgvf:

Usage Arguments Examples

Usage

1
outmgvf(x, y = NA, plotit = TRUE, outfun = outbox, se = TRUE, ...)

Arguments

x
y
plotit
outfun
se
...

Examples

 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
##---- 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, plotit = TRUE, outfun = outbox, se = TRUE, 
    ...) 
{
    if (is.na(y[1])) 
        m <- x
    if (!is.na(y[1])) 
        m <- cbind(x, y)
    m <- elimna(m)
    if (se) {
        for (i in 1:ncol(m)) m[, i] <- (m[, i] - median(m[, i]))/mad(m[, 
            i])
    }
    iflag <- rep(T, nrow(m))
    dval <- 0
    for (i in 1:nrow(m)) {
        dval[i] <- gvar(m[-i, ])
    }
    temp2 <- outfun(dval, ...)
    if (plotit && ncol(m) == 2) {
        x <- m[, 1]
        y <- m[, 2]
        plot(x, y, type = "n", xlab = "X", ylab = "Y")
        points(x[temp2$keep], y[temp2$keep], pch = "*")
        if (!is.null(temp2$out.id)) 
            points(x[temp2$out.id], y[temp2$out.id], pch = "o")
    }
    list(n = temp2$n, out.id = temp2$out.id, keep = temp2$keep, 
        out.val = m[temp2$out.id, ], depth.values = dval)
  }

musto101/wilcox_R documentation built on May 23, 2019, 10:52 a.m.