1 |
x1 |
|
x2 |
|
est |
|
fr1 |
|
fr2 |
|
nboot |
|
SEED |
|
iter |
|
nmin |
|
MC |
|
alpha |
|
PRM |
|
pts |
|
... |
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 50 | ##---- 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 (x1, x2, est = tmean, fr1 = 1, fr2 = 1, nboot = 500,
SEED = TRUE, iter = 1000, nmin = 12, MC = TRUE, alpha = 0.05,
PRM = FALSE, pts = NULL, ...)
{
if (is.null(pts[1]))
stop("pts is null, use ancGLOB_pv")
x1 = elimna(x1)
x2 = elimna(x2)
n1 = length(x1)
n2 = length(x2)
if (SEED)
set.seed(45)
bvec = list()
np1 = min(c(n1, n2)) + 1
nmax = max(c(n1, n2))
for (i in 1:iter) {
bvec[[i]] = rmul(nmax, p = 4)
if (n1 != n2)
bvec[[i]][np1:nmax, 1:2] = NA
bvec[[i]][1:n1, 1] = x1
bvec[[i]][1:n2, 3] = x2
}
prm = NA
if (MC) {
library(parallel)
prm = mclapply(bvec, ancGLOB_sub4, fr1 = fr1, fr2 = fr2,
est = est, SEED = SEED, nboot = nboot, pts = pts,
...)
}
if (!MC) {
for (ij in 1:length(bvec)) {
bv = as.matrix(bvec[[ij]])
prm[ij] = ancGLOB_sub4(bv, fr1 = fr1, fr2 = fr2,
est = est, SEED = SEED, nboot = nboot, pts = pts,
nmin = nmin, ...)
}
}
prm = elimna(as.vector(matl(prm)))
ef.iter = length(prm)
p.crit = hd(prm, alpha)
prm = sort(elimna(prm))
if (!PRM)
prm = NULL
list(p.crit = p.crit, prm = prm, ef.iter = ef.iter)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.