View source: R/higher_criticism.R
hc_cal | R Documentation |
For ordered p-values p(1)<p(2)<...<p(n).Define Sn(t)=sum_i=1^n 1_p_(i)<=t. Then define the statistic T as T=(Sn(p(i))-n x p(i))/sqrt(n x p(i) x (1-p(i))). The higher criticism is calculated with HCmax=max T_(i). where 0<i<=(t0ratio x n)
hc_cal(pm, t0ratio = 1, filter = 0)
pm |
is a statistics matrix of P-values or weighted pvalues, each row represents a gene (independent tests) and each column represents a dataset (e.g. a permutation or an observation). Pm are not encouraged to have only 1 rows, if that happend, warning massage will produced. |
t0ratio |
is the ratio for the region c(0,t0ratio) of pvalues for statistic calculation. |
filter |
is the threshold to exclude extremely small pvalues to avoid them driving all signals.default 0. |
a numeric vector with each elements is a Higher criticism values calculated from each colum of the Pm
Donoho, D., & Jin, J. (2004). Higher Criticism for Detecting Sparse Heterogeneous Mixtures. The Annals of Statistics, 32(3), 962–994.
pval=matrix(runif(200,0,1),ncol=4,nrow=50) w0=seq(0.5,1.5,length=50) pwval=cal_cdf(pval,w=w0) hc_cal(pwval,t0ratio=0.4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.