HCdetection {ddpca} | R Documentation |
Higher Criticism for detecting rare and weak signals
Description
This function takes a bunch of p-values as input and ouput the Higher Criticism statistics as well as the decision (rejection or not).
Usage
HCdetection(p, alpha = 0.5, pvalcut = NA)
Arguments
p |
A vector of size |
alpha |
A number between 0 and 1. The smallest alpha*n p-values will be used to calculate the HC statistic. Default is 0.5. |
pvalcut |
A number between 0 and 1. Those small p-values (smaller than
pvalcut) will be taken away to avoid heavy tails of test
statistic. Set it to |
Details
This function is an adaptation of the Matlab code here http://www.stat.cmu.edu/~jiashun/Research/software/HC/
Value
Returns a list containing the following items
H |
0 or 1 scalar indicating whether |
HCT |
Higher Criticism test statistic |
Author(s)
Fan Yang <fyang1@uchicago.edu>
References
Donoho, D. and Jin, J., Higher criticism for detecting sparse heterogeneous mixtures. Ann. Statist. 32 (2004), no. 3, 962–994.
Ke, Z., Xue, L. and Yang, F., 2019. Diagonally Dominant Principal Component Analysis. Journal of Computational and Graphic Statistics, under review.
Examples
n = 1e5
data = rnorm(n)
p = 2*(1 - pnorm(abs(data)))
result = HCdetection(p)
print(result$H)
print(result$HCT)