outproadMC:

Usage Arguments Examples

Usage

1
outproadMC(m, center = NA, plotit = TRUE, op = TRUE, MM = FALSE, cop = 3, xlab = "VAR 1", ylab = "VAR 2", rate = 0.05, iter = 100, ip = 6, pr = TRUE, SEED = TRUE)

Arguments

m
center
plotit
op
MM
cop
xlab
ylab
rate
iter
ip
pr
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
29
30
31
32
33
34
35
36
37
38
39
40
41
##---- 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 (m, center = NA, plotit = TRUE, op = TRUE, MM = FALSE, 
    cop = 3, xlab = "VAR 1", ylab = "VAR 2", rate = 0.05, iter = 100, 
    ip = 6, pr = TRUE, SEED = TRUE) 
{
    library(parallel)
    m = elimna(m)
    n = nrow(m)
    z = array(rmul(n * iter * ncol(m)), c(iter, n, ncol(m)))
    newq = 0
    gtry = NA
    for (itry in 1:ip) {
        newq = newq + 9/10^itry
        gtry[itry] = newq
    }
    gtry = c(0.95, 0.975, gtry[-1])
    if (pr) 
        print("Computing adjustment")
    if (SEED) 
        set.seed(2)
    for (itry in 1:ip) {
        for (i in 1:iter) {
            temp = outproMC(z[i, , ], gval = sqrt(qchisq(gtry[itry], 
                ncol(m))), center = center, plotit = FALSE, op = op, 
                MM = MM, cop = cop)$out.id
            val[i] = length(temp)
        }
        erate = mean(val)/n
        if (erate < rate) {
            newgval = sqrt(qchisq(gtry[itry], ncol(m)))
            break
        }
    }
    res = outproMC(m, gval = newgval, center = center, plotit = TRUE, 
        op = op, MM = MM, cop = cop, xlab = "VAR 1", ylab = "VAR 2")
    list(results = res, used.gval = newgval)
  }

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