Usage
iterNPC(P, tol = 1, maxIter = 10, plotIt = TRUE, combFun1 = function(x) { -2 * sum(log(x), na.rm = TRUE) }, combFun2 = function(x) { sum(qnorm(1 - x), na.rm = TRUE) }, combFun3 = function(x) { -min(x, na.rm = TRUE) }, test = c("SSQ", "ABS", "NORM2", "EDF"), Pmat = FALSE, onlyCombined = FALSE)
Arguments
P
input matrix containing the test
statistic in the form of p.values (permutation or
asymptotic)
tol
integer representing the desired
tolerance, the actual one being
$tol/B$ where $B$ is the number of
permutations
maxIter
integer maximum number of
iterations to be performed, default 10
plotIt
logical, if TRUE (default)
plots the diagnostic grahp of $p$-values obtained with
each combining function vs. iteration index
combFun1
first combining function needed
for the algorithm, default is Fisher's: $-2 * sum(log(p_i))$
combFun2
second combining function, default
is Liptak: $sum(\Phi^{-1} (1-p_i))$
combFun3
third combining function, default
is Tippett: $-min_i p_i$
test
character, it is the stopping rule
used to check for convergence, each one of the 4 kinds
currently implemented takes as input the vector with the
result of the combination with the different combining
functions for one permutation. There are 4 choices for
this argument:
"SSQ"- Sum of
SQuares, the algorithm stops when
$square root of (n-1)*(s^2)$ is
smaller than the actual tolerance; here where $s$ is
the sample variance of the vector.
"ABS"-
The algorithm stops if not all pairwise absolute
differences between the elements are smaller than the
actual tolerance
"NORM2"- The algorithm
stops if the euclidean distance between two consecutive
iterations is smaller than the actual tolerance.
"EDF"- It is based on the Empirical
Distribution Function of the p.values. The algorithm
stops if the standardized absolute difference between the
average of two consecutive iterations is smaller than the
actual tolerance. The standardization involves the
variance of the numerator, it is a sort of t-test.
Pmat
logical, if TRUE returns the
final matrix of combined $p$-values, default is
FALSE
onlyCombined
logical, if TRUE
returns only the first column of the final matrix, in
case only the distribution of combined $p$-values is
needed