outmgv:

Usage Arguments Examples

Usage

1
outmgv(x, y = NULL, plotit = TRUE, outfun = outbox, se = TRUE, op = 1, cov.fun = rmba, xlab = "X", ylab = "Y", SEED = TRUE, STAND = FALSE, ...)

Arguments

x
y
plotit
outfun
se
op
cov.fun
xlab
ylab
SEED
STAND
...

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
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 = NULL, plotit = TRUE, outfun = outbox, se = TRUE, 
    op = 1, cov.fun = rmba, xlab = "X", ylab = "Y", SEED = TRUE, 
    STAND = FALSE, ...) 
{
    if (is.null(y[1])) 
        m <- x
    if (!is.null(y[1])) 
        m <- cbind(x, y)
    m = elimna(m)
    m = as.matrix(m)
    nv = nrow(m)
    temp <- mgvar(m, se = se, op = op, cov.fun = cov.fun, SEED = SEED)
    temp[is.na(temp)] <- 0
    if (ncol(m) == 1) {
        temp2 = outpro(m)
        nout = temp2$n.out
        keep = temp2$keep
        temp2 = temp2$out.id
    }
    if (ncol(m) > 1) {
        if (ncol(m) == 2) 
            temp2 <- outfun(temp, ...)
        if (ncol(m) > 2) {
            temp2 <- outbox(temp, mbox = TRUE, gval = sqrt(qchisq(0.975, 
                ncol(m))))
        }
        if (plotit && ncol(m) == 2) {
            x <- m[, 1]
            y <- m[, 2]
            plot(x, y, type = "n", xlab = xlab, ylab = ylab)
            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")
        }
        nout = 0
        if (!is.na(temp2[1])) 
            nout = length(temp2$out.id)
    }
    list(n = nv, n.out = nout, out.id = temp2$out.id, keep = temp2$keep)
  }

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