outmgvad:

Usage Arguments Examples

Usage

1
outmgvad(m, center = NA, plotit = TRUE, op = 1, xlab = "VAR 1", ylab = "VAR 2", rate = 0.05, iter = 100, ip = 6, pr = TRUE)

Arguments

m
center
plotit
op
xlab
ylab
rate
iter
ip
pr

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
##---- 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 = 1, xlab = "VAR 1", 
    ylab = "VAR 2", rate = 0.05, iter = 100, ip = 6, pr = TRUE) 
{
    m = elimna(m)
    n = nrow(m)
    newgval = sqrt(qchisq(0.975, ncol(m)))
    z = array(rmul(n * iter * ncol(m)), c(iter, n, ncol(m)))
    newq = 0
    gtry = NA
    val = NULL
    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")
    for (itry in 1:ip) {
        for (i in 1:iter) {
            temp = outmgv.v2(z[i, , ], gval = gval, op = op)$out.id
            val[i] = length(temp)
        }
        erate = mean(val)/n
        if (erate < rate) {
            newgval = sqrt(qchisq(gtry[itry], ncol(m)))
            break
        }
    }
    res = outmgv(m, gval = newgval, plotit = plotit, op = op, 
        xlab = xlab, ylab = ylab)
    list(n = res$n, n.out = res$n.out, out.id = res$out.id, keep = res$keep, 
        used.gval = newgval)
  }

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