yuen.effect.ci:

Usage Arguments Examples

Usage

1
yuen.effect.ci(x, y, SEED = TRUE, nboot = 400, tr = 0.2, alpha = 0.05)

Arguments

x
y
SEED
nboot
tr
alpha

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, SEED = TRUE, nboot = 400, tr = 0.2, alpha = 0.05) 
{
    if (SEED) 
        set.seed(2)
    x = elimna(x)
    y = elimna(y)
    bvec = 0
    datax <- matrix(sample(x, size = length(x) * nboot, replace = TRUE), 
        nrow = nboot)
    datay <- matrix(sample(y, size = length(x) * nboot, replace = TRUE), 
        nrow = nboot)
    for (i in 1:nboot) {
        bvec[i] = yuenv2(datax[i, ], datay[i, ], tr = tr, SEED = FALSE)$Effect.Size
    }
    bvec <- sort(abs(bvec))
    crit <- alpha/2
    icl <- round(crit * nboot) + 1
    icu <- nboot - icl
    ci <- NA
    ci[1] <- bvec[icl]
    pchk = yuen(x, y, tr = tr)$p.value
    if (pchk > alpha) 
        ci[1] = 0
    ci[2] <- bvec[icu]
    if (ci[1] < 0) 
        ci[1] = 0
    es = abs(yuenv2(x, y, tr = tr)$Effect.Size)
    list(CI = ci, Effect.Size = es)
  }

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