1 |
n1 |
|
n2 |
|
nreps |
|
MC |
|
qpts |
|
qvals |
|
nboot |
|
SEED |
|
est |
|
alpha |
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 | ##---- 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, MC = FALSE, qpts = FALSE, qvals = c(0.25,
0.5, 0.75), nboot = 500, SEED = TRUE, est = tmean, alpha = 0.05)
{
iter = nreps
if (SEED)
set.seed(45)
xy = list()
for (i in 1:iter) {
xy[[i]] = list()
xy[[i]][[1]] = rnorm(n1)
xy[[i]][[2]] = rnorm(n1)
xy[[i]][[3]] = rnorm(n2)
xy[[i]][[4]] = rnorm(n2)
}
if (!MC)
pv = lapply(xy, ancovaV2pv.sub, qpts = qpts, qvals = qvals,
nboot = nboot, MC = FALSE, est = est)
if (MC) {
library(parallel)
pv = mclapply(xy, ancovaV2pv.sub, qpts = qpts, qvals = qvals,
nboot = nboot, MC = FALSE, est = est)
}
pv = as.vector(matl(pv))
p = hd(pv, q = alpha)
list(p.crit = p)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.