ancom:

Usage Arguments Examples

Usage

1
ancom(x1, y1, x2, y2, dchk = FALSE, plotit = TRUE, plotfun = rplot, nboot = 500, alpha = 0.05, SEED = TRUE, PARTEST = FALSE, tr = 0, ...)

Arguments

x1
y1
x2
y2
dchk
plotit
plotfun
nboot
alpha
SEED
PARTEST
tr
...

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 (x1, y1, x2, y2, dchk = FALSE, plotit = TRUE, plotfun = rplot, 
    nboot = 500, alpha = 0.05, SEED = TRUE, PARTEST = FALSE, 
    tr = 0, ...) 
{
    flag1 <- rep(T, length(y1))
    flag2 <- rep(T, length(y2))
    if (dchk) {
        dep1 <- fdepth(x2, x1)
        dep2 <- fdepth(x1, x2)
        flag1 <- (dep1 > 0)
        flag2 <- (dep2 > 0)
    }
    n1 <- sum(flag1)
    n2 <- sum(flag2)
    n <- n1 + n2
    y <- c(n2 * y1[flag1]/n, 0 - n1 * y2[flag2]/n)
    x1 <- as.matrix(x1)
    x1 <- x1[flag1, ]
    x2 <- as.matrix(x2)
    x2 <- x2[flag2, ]
    x1 <- as.matrix(x1)
    x2 <- as.matrix(x2)
    x <- rbind(x1, x2)
    if (plotit) {
        if (ncol(x) <= 2) 
            plotfun(x, y, ...)
    }
    if (PARTEST) 
        output <- indt(x, y, tr = tr, nboot = nboot, alpha = alpha, 
            SEED = SEED)
    if (!PARTEST) 
        output <- indt0(x, y, nboot = nboot, alpha = alpha, SEED = SEED)
    list(dstat = output$dstat, critd = output$critd)
  }

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