cidv2:

Usage Arguments Examples

Usage

1
cidv2(x, y, alpha = 0.05, plotit = FALSE, pop = 0, fr = 0.8, rval = 15, xlab = "", ylab = "")

Arguments

x
y
alpha
plotit
pop
fr
rval
xlab
ylab

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
46
47
##---- 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, alpha = 0.05, plotit = FALSE, pop = 0, fr = 0.8, 
    rval = 15, xlab = "", ylab = "") 
{
    nullval <- 0
    ci <- cid(x, y, alpha = alpha, plotit = plotit, pop = pop, 
        fr = fr, rval = rval)
    alph <- c(1:99)/100
    for (i in 1:99) {
        irem <- i
        chkit <- cid(x, y, alpha = alph[i], plotit = FALSE)
        if (chkit[[3]] > nullval || chkit[[4]] < nullval) 
            break
    }
    p.value <- irem/100
    if (p.value <= 0.1) {
        iup <- (irem + 1)/100
        alph <- seq(0.001, iup, 0.001)
        for (i in 1:length(alph)) {
            p.value <- alph[i]
            chkit <- cid(x, y, alpha = alph[i], plotit = FALSE, 
                xlab = xlab, ylab = ylab)
            if (chkit[[3]] > nullval || chkit[[4]] < nullval) 
                break
        }
    }
    if (p.value <= 0.001) {
        alph <- seq(1e-04, 0.001, 1e-04)
        for (i in 1:length(alph)) {
            p.value <- alph[i]
            chkit <- cid(x, y, alpha = alph[i], plotit = FALSE)
            if (chkit[[3]] > nullval || chkit[[4]] < nullval) 
                break
        }
    }
    phat <- (1 - ci$d)/2
    pci = c((1 - ci$cu)/2, (1 - ci$cl)/2)
    d.ci = c(ci$cl, ci$cu)
    dval = cid(x, y)$summary.dvals
    list(n1 = length(elimna(x)), n2 = length(elimna(y)), d.hat = ci$d, 
        d.ci = d.ci, p.value = p.value, p.hat = phat, p.ci = pci, 
        summary.dvals = dval)
  }

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