signt:

Usage Arguments Examples

Usage

1
signt(x, y = NULL, alpha = 0.05, AC = TRUE, SD = FALSE)

Arguments

x
y
alpha
AC
SD

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
##---- 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 = NULL, alpha = 0.05, AC = TRUE, SD = FALSE) 
{
    if (is.null(y[1])) {
        if (ncol(as.matrix(x)) != 2) 
            stop("y is null so x should be a matrix or data frame with two columns")
        if (is.matrix(x) || is.data.frame(x)) 
            dif <- x[, 1] - x[, 2]
        if (is.list(x)) 
            dif <- x[[1]] - x[[2]]
    }
    if (!is.null(y[1])) 
        dif <- x - y
    dif = elimna(dif)
    n <- length(dif)
    dif <- dif[dif != 0]
    flag <- (dif < 0)
    if (!AC) 
        temp <- binomcipv(y = flag, alpha = alpha)
    if (AC) 
        temp <- acbinomcipv(y = flag, alpha = alpha)
    if (SD) 
        temp = binomLCO(y = flag, alpha = alpha)
    list(Prob_x_less_than_y = temp$phat, ci = temp$ci, n = n, 
        N = length(flag), p.value = temp$p.value)
  }

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