sintv2:

Usage Arguments Examples

Usage

1
sintv2(x, alpha = 0.05, nullval = 0, null.value = NULL, pr = TRUE)

Arguments

x
alpha
nullval
null.value
pr

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
##---- 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, alpha = 0.05, nullval = 0, null.value = NULL, pr = TRUE) 
{
    if (!is.null(null.value)) 
        nullval = null.value
    if (pr) {
        if (sum(duplicated(x) > 0)) 
            print("Duplicate values detected; hdpb might have more power")
    }
    ci <- sint(x, alpha = alpha, pr = FALSE)
    alph <- c(1:99)/100
    for (i in 1:99) {
        irem <- i
        chkit <- sint(x, alpha = alph[i], pr = FALSE)
        if (chkit[1] > nullval || chkit[2] < 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 <- sint(x, alpha = alph[i], pr = FALSE)
            if (chkit[1] > nullval || chkit[2] < 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 <- sint(x, alpha = alph[i], pr = FALSE)
            if (chkit[1] > nullval || chkit[2] < nullval) 
                break
        }
    }
    list(n = length(elimna(x)), ci.low = ci[1], ci.up = ci[2], 
        p.value = p.value)
  }

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