Learn R Programming

CorDiff (version 1.0)

Qresid: Calculate statistic Q.

Description

For the purposes of computing type I error and power, we only need care about p-values that are smallish. If the pvalue is large, we do not care if it's 0.8 or 0.9. When we hit ratio=10, then our current pvalue is 10 standard deviations larger than zero, which is a safe crierion to stop and say we have enough permutations. Therefore we saved a ton of time.

Usage

Qresid(y, X, numperms = 10000, thresh = 10)

Arguments

y

Experimental condition/phenotypes, it can be discrete or continuous

X

The data matrix, each column is for each sample and each row is for different feature.

numperms

The number of permuations.

thresh

The threshold we set up to stop the permutation. The default value is 10 which comes from a 10 standard deviation criterion.

Value

myp

P value

i

The ith permutaion we stopped the algorithm.

References

Set-based differential covariance testing for genomics