regYciCV2G:

Usage Arguments Examples

Usage

1
regYciCV2G(n1, n2, crit = NULL, g = 0, h = 0, nboot = 1000, regfun = tsreg, ALL = TRUE, alpha = 0.05, SEED = TRUE, MC = FALSE, null.value = 0, pts = NULL, npts = 100, nmiss = 0, ...)

Arguments

n1
n2
crit
g
h
nboot
regfun
ALL
alpha
SEED
MC
null.value
pts
npts
nmiss
...

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
40
41
42
43
44
45
46
47
48
49
##---- 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, crit = NULL, g = 0, h = 0, nboot = 1000, regfun = tsreg, 
    ALL = TRUE, alpha = 0.05, SEED = TRUE, MC = FALSE, null.value = 0, 
    pts = NULL, npts = 100, nmiss = 0, ...) 
{
    if (nmiss > n) 
        stop("Number of missing values is greater than n")
    if (SEED) 
        set.seed(2)
    mv = NA
    chk = 0
    if (n1 != n2) 
        nmiss = max(c(n1, n2)) - min(c(n1, n2))
    if (MC) 
        library(parallel)
    xy = list()
    for (i in 1:nboot) {
        x1 = ghdist(n, g = g, h = h)
        x2 = ghdist(n, g = g, h = h)
        if (nmiss > 0) 
            x2[1:nmiss] = NA
        xx = c(x1, x2)
        xx = elimna(xx)
        if (is.null(pts)) {
            if (!ALL) 
                pts = seq(min(xx), max(xx), length.out = npts)
            if (ALL) 
                pts = unique(xx)
        }
        y1 = ghdist(n, g = g, h = h)
        y2 = ghdist(n, g = g, h = h)
        xy[[i]] = cbind(x1, y1, x2, y2)
    }
    if (!MC) 
        est = lapply(xy, regciCV2G.sub, regfun = regfun, null.value = null.value, 
            npts = npts, ...)
    if (MC) 
        est = mclapply(xy, regciCV2G.sub, regfun = regfun, null.value = null.value, 
            pts = pts, npts = npts, ...)
    est = as.vector(matl(est))
    type1 = NULL
    if (!is.null(crit)) 
        type1 = mean(est <= crit)
    list(global.p.value = type1, crit.est = hd(est, alpha))
  }

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