ancdet.pv:

Usage Arguments Examples

Usage

1
ancdet.pv(n1, n2, nreps = 2000, alpha = 0.05, npts = 25, tr = 0.2, MC = FALSE, SEED = TRUE)

Arguments

n1
n2
nreps
alpha
npts
tr
MC
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
##---- 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 (n1, n2, nreps = 2000, alpha = 0.05, npts = 25, tr = 0.2, 
    MC = FALSE, SEED = TRUE) 
{
    if (SEED) 
        set.seed(2)
    pvals = NA
    xy = list()
    n = max(c(n1, n2))
    nmiss = n - min(c(n1, n2))
    for (i in 1:nreps) {
        xy[[i]] = rmul(n, p = 4)
        xy[[i]][1:nmiss, 1:2] = NA
    }
    if (!MC) 
        pvals = lapply(xy, ancdet.sub, npts = npts, tr = tr)
    if (MC) {
        library(parallel)
        pvals = mclapply(xy, ancdet.sub, npts = npts, tr = tr)
    }
    pvals = matl(pvals)
    pv = hd(pvals, alpha)
    pv
  }

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