HCdetection: Higher Criticism for detecting rare and weak signals

Description Usage Arguments Details Value Author(s) References Examples

View source: R/HCdetection.R

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

1
HCdetection(p, alpha = 0.5, pvalcut = NA)

Arguments

p

A vector of size n containing p-values from data

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 NA is equivalent to setting it to 1/n.

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 H_0 the global null is rejected (1) or not rejected (0)

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

1
2
3
4
5
6
n = 1e5
data = rnorm(n)
p = 2*(1 - pnorm(abs(data)))
result = HCdetection(p)
print(result$H)
print(result$HCT)

ddpca documentation built on Sept. 15, 2019, 1:03 a.m.