HC | R Documentation |
Calculate the Higher Criticism test statistic and p-value.
HC(test_stats, cor_mat = NULL, pairwise_cors = NULL)
test_stats |
Vector of test statistics for each factor in the set (i.e. marginal test statistic for each SNP in a gene). |
cor_mat |
d*d matrix of the correlations between all the test statistics in the set, where d is the total number of test statistics in the set. You only need to specify EITHER cor_mat OR pairwise_cors. |
pairwise_cors |
A vector of all d(d-1)/2 pairwise correlations between the test statistics. You only need to specify EITHER cor_mat OR pairwise_cors. |
A list with the elements:
HC |
The observed Higher Criticism test statistic. |
HC_pvalue |
The p-value of this observed value, given the size of the set and correlation structure. |
# Should return statistic = 2.067475 and p_value = 0.2755146
set.seed(100)
Z_vec <- rnorm(5) + rep(1,5)
cor_Z <- matrix(data=0.2, nrow=5, ncol=5)
diag(cor_Z) <- 1
HC(test_stats=Z_vec, cor_mat=cor_Z)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.