OMNI_ss: omni_ss.R

View source: R/omni_ss.R

OMNI_ssR Documentation

omni_ss.R

Description

Computes the omnibus test statistic combining GBJ, GHC, minP, and SKAT. This version of the function assumes you are using GWAS summary statistics. If you individual-level genotype data, use omni_individual().

Usage

OMNI_ss(test_stats, cor_mat, num_boots = 100)

Arguments

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.

num_boots

Number of bootstrap repetitions to find correlation matrix of set-based statistics.

Value

A list with the elements:

OMNI

The observed omnibus test statistic.

OMNI_pvalue

The p-value of the OMNI test

err_code

Sometimes if your p-value is very small (< 1*10^(-10)), R may run into numerical issues. This message will alert you if such a situation occurs.

Examples

cor_mat <- matrix(data=0.3, nrow=5, ncol=5)
diag(cor_mat) <- 1
test_stats <- as.numeric(mvtnorm::rmvnorm(n=1, sigma=cor_mat))
OMNI_ss(test_stats=test_stats, cor_mat=cor_mat, num_boots=5)

GBJ documentation built on May 29, 2024, 1:33 a.m.