pcorbv4:

Usage Arguments Examples

Usage

1
pcorbv4(x, y, SEED = TRUE)

Arguments

x
y
SEED

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
##---- 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 <- 599
    if (SEED) 
        set.seed(2)
    xy <- elimna(cbind(x, y))
    x <- xy[, 1]
    y <- xy[, 2]
    data <- matrix(sample(length(y), size = length(y) * nboot, 
        replace = TRUE), nrow = nboot)
    bvec <- apply(data, 1, pcorbsub, x, y)
    ilow <- 13
    ihi <- 586
    if (length(y) < 250) {
        ilow <- 12
        ihi <- 587
    }
    if (length(y) < 180) {
        ilow <- 11
        ihi <- 588
    }
    if (length(y) < 80) {
        ilow <- 8
        ihi <- 592
    }
    if (length(y) < 40) {
        ilow <- 7
        ihi <- 593
    }
    bsort <- sort(bvec)
    r <- cor(x, y)
    ci <- c(bsort[ilow], bsort[ihi])
    list(r = r, ci = ci)
  }

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