Description Usage Arguments Value References Examples
View source: R/eff_nbr_tests.R
Calculates the effective number of tests performed in a GWAS, given the LD structure among the SNPs. SNPs that are highly correlated are not counted twice.
1  | eff_nbr_tests(mat, cor.true = FALSE)
 | 
mat | 
 matrix, either individual by SNPs (n x p) matrix, or correlation matrix between SNPs  | 
cor.true | 
 indicates if option mat is a correlation matrix or not  | 
zhc.correction number of effective tests
Implemented from https://www.ncbi.nlm.nih.gov/pubmed/18271029
1 2 3  | dat.sim <- data.frame(g = rnorm(100)) %>% dplyr::mutate(g2 = g * 2)
eff_nbr_tests(diag(10), cor.true = TRUE) ## 10, because all are independent
eff_nbr_tests(dat.sim, cor.true = FALSE)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.