hdci:

Usage Arguments Examples

Usage

1
hdci(x, q = 0.5, alpha = 0.05, nboot = 100, SEED = TRUE, pr = TRUE)

Arguments

x
q
alpha
nboot
SEED
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
##---- 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, q = 0.5, alpha = 0.05, nboot = 100, SEED = TRUE, 
    pr = TRUE) 
{
    if (alpha != 0.05) 
        stop("Use the function qcipb. Generally works well even when alpha is not equal to .05")
    x = elimna(x)
    if (pr) {
        if (sum(duplicated(x) > 0)) 
            print("Duplicate values detected; use hdpb")
    }
    se <- hdseb(x, q, nboot, SEED = SEED)
    crit <- 0.5064/(length(x)^(0.25)) + 1.96
    if (q <= 0.2 || q >= 0.8) {
        if (length(x) <= 20) 
            crit <- (-6.23)/length(x) + 5.01
    }
    if (q <= 0.1 || q >= 0.9) {
        if (length(x) <= 40) 
            crit <- 36.2/length(x) + 1.31
    }
    if (length(x) <= 10) {
        print("The number of observations is less than 11.")
        print("Accurate critical values have not been determined for this case.")
    }
    low <- hd(x, q) - crit * se
    hi <- hd(x, q) + crit * se
    list(ci = c(low, hi), crit = crit, se = se)
  }

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