skipogk:

Usage Arguments Examples

Usage

1
skipogk(x, y = NA, plotit = FALSE)

Arguments

x
y
plotit

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 = NA, plotit = FALSE) 
{
    if (!is.na(y[1])) 
        x <- cbind(x, y)
    x <- elimna(x)
    n <- nrow(x)
    keep <- outogk(x, plotit = plotit)$keep
    val <- cor(x[keep, ])
    p.value <- NA
    test <- NA
    crit.05 <- 15.49/n + 2.68
    vat <- val
    diag(vat) <- 0
    test <- abs(vat * sqrt((n - 2)/(1 - vat^2)))
    diag(test) <- NA
    if (ncol(val) == 2) {
        p.value <- c("Greater than .1")
        val <- val[1, 2]
        test <- abs(val * sqrt((n - 2)/(1 - val^2)))
        crit <- 4.8/n + 2.72
        if (test >= crit) 
            p.value <- c("Less than .1")
        crit <- 15.49/n + 2.68
        if (test >= crit) 
            p.value <- c("Less than .05")
        crit <- 14.22/n + 3.26
        if (test >= crit) 
            p.value <- c("Less than .025")
        crit <- 24.83/n + 3.74
        if (test >= crit) 
            p.value <- c("Less than .01")
    }
    list(cor = val, test.stat = test, p.value = p.value, crit.05 = crit.05)
  }

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