iterNPC: Iterated NonParametric Combination

Description Usage Arguments Details Value Author(s)

View source: R/iterNPC.r

Description

Iterated NonParametric Combination of the test statistic matrix, mostly for internal use.

Usage

1
2
3
4
5
6
7
8
  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(Φ^{-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

Details

It takes as input a matrix whose columns have to be combined with the iterated NPC procedure, default combining functions are 3: Fisher, Liptak (normal version), and Tippett (minP)

Value

The output is conditioned on some of the input argument. The default is a list containing only the element "P.iter": a matrix with 3 columns containing the observed p.values across iterations and for all combining functions (to manually check convergence). If Pmat is TRUE than the list contains also the element "P.final" that is the final permutation space of p.values obtained with all combining function. If onlyCombined is TRUE than the resulting output is just the vector containing the first column of "P.final".

Author(s)

Federico Mattiello <federico.mattiello@gmail.com>


SOUP documentation built on May 2, 2019, 8:18 a.m.

Related to iterNPC in SOUP...