tworegwb:

Usage Arguments Examples

Usage

1
tworegwb(x1, y1, x2, y2, nboot = 599, RAD = FALSE, alpha = 0.05, SEED = TRUE, xout = FALSE, outfun = out)

Arguments

x1
y1
x2
y2
nboot
RAD
alpha
SEED
xout
outfun

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
##---- 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, nboot = 599, RAD = FALSE, alpha = 0.05, 
    SEED = TRUE, xout = FALSE, outfun = out) 
{
    xy = elimna(cbind(x1, y1))
    if (ncol(xy) > 2) 
        stop("This function only allows one covariate")
    if (xout) {
        m <- cbind(x1, y1)
        flag <- outfun(x1, plotit = FALSE)$keep
        m <- m[flag, ]
        x1 <- m[, 1]
        y1 <- m[, 2]
        m <- cbind(x2, y2)
        flag <- outfun(x2, plotit = FALSE)$keep
        m <- m[flag, ]
        x2 <- m[, 1]
        y2 <- m[, 2]
    }
    x = c(x1, x2)
    y = c(y1, y2)
    g = c(rep(0, length(x1)), rep(1, length(x2)))
    xgy = elimna(cbind(x, g, x * g, y))
    xg = xgy[, 1:3]
    y = xgy[, 4]
    res = olswbtest(xg, y, nboot = nboot, SEED = SEED, RAD = RAD, 
        alpha = alpha)
    res[3, 6]
  }

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