outogk:

Usage Arguments Examples

Usage

1
outogk(x, sigmamu = taulc, v = gkcov, op = TRUE, SEED = FALSE, beta = max(c(0.95, min(c(0.99, 1/nrow(x) + 0.94)))), n.iter = 1, plotit = TRUE, ...)

Arguments

x
sigmamu
v
op
SEED
beta
n.iter
plotit
...

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
##---- 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, sigmamu = taulc, v = gkcov, op = TRUE, SEED = FALSE, 
    beta = max(c(0.95, min(c(0.99, 1/nrow(x) + 0.94)))), n.iter = 1, 
    plotit = TRUE, ...) 
{
    if (!is.matrix(x)) 
        stop("x should be a matrix")
    x <- elimna(x)
    if (!op) {
        temp <- ogk.pairwise(x, sigmamu = sigmamu, v = v, beta = beta, 
            n.iter = n.iter, ...)
        vals <- hard.rejection(temp$distances, p = ncol(x), beta = beta, 
            ...)
        flag <- (vals == 1)
        vals <- c(1:nrow(x))
        outid <- vals[!flag]
        keep <- vals[flag]
        if (is.matrix(x)) {
            if (ncol(x) == 2 && plotit) {
                plot(x[, 1], x[, 2], xlab = "X", ylab = "Y", 
                  type = "n")
                points(x[flag, 1], x[flag, 2])
                if (sum(!flag) > 0) 
                  points(x[!flag, 1], x[!flag, 2], pch = "o")
            }
        }
    }
    if (op) {
        temp <- out(x, cov.fun = ogk, beta = beta, plotit = plotit, 
            SEED = SEED)
        outid <- temp$out.id
        keep <- temp$keep
    }
    list(out.id = outid, keep = keep, distances = temp$dis)
  }

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