Learn R Programming

RNOmni (version 0.6.0)

OINT: Omnibus-INT

Description

Association test that synthesizes the DINT and IINT tests. The first approach is most powerful for traits that could have arisen from a rank-preserving transformation of a latent normal trait. The second approach is most powerful for traits that are linear in covariates, yet have skewed or kurtotic residual distributions. During the omnibus test, the direct and indirect tests are separately applied. An omnibus statistic is calculated based on whichever approach provides more evidence of an association. Details of the method are discussed in the vignette.

Usage

OINT(y, G, X = NULL, method = "AvgCorr", k = 3/8, B = 100,
  set.rho = NULL, keep.rho = FALSE, keep.stats = FALSE,
  parallel = FALSE)

Arguments

y

Numeric phenotype vector.

G

Obs by locus genotype matrix.

X

Model matrix of covariates and structure adjustments. Should include an intercept. Omit to perform marginal tests of association.

method

Method used to estimate correlation for the omnibus test, either "AvgCorr", "Bootstrap", or "Manual".

k

Offset applied during rank-normalization. See rankNorm.

B

If using method=="Bootstrap", number of bootstrap samples for correlation estimation.

set.rho

If using method=="Manual", the fixed value of rho, either a single value or a vector with one element per column in G.

keep.rho

Logical indicating whether to return the correlation parameter estimated during omnibus calculation. Defaults to FALSE.

keep.stats

Logical indicating whether to return the interim test statistics calculated by DINT and IINT. Defaults to FALSE.

parallel

Logical indicating whether to run in parallel. Must register parallel backend first.

Value

A numeric matrix of p-values, three for each column of G. If keep.stats=T, the D-INT and I-INT Z statistics are returned. If keep.rho=T, the correlation between the p-values provided is returned.

Details

Assigning a p-value to the omnibus statistic requires an estimate of the correlation between the test statistics estimated by DINT and IINT under the null. When many loci are under consideration, a computationally efficient approach is to take the correlation of the observed test statistics across loci (method="AvgCorr"). Alternatively, when there are fewer loci, or when locus-specific estimates are desired, the correlation may be estimated using bootstrap (method="Bootstrap"). When using the bootstrap approach, consider registering a parallel backend and setting parallel=T. To manually provide an estimate of the correlation between the test statistics, set (method="Manual") and specify (set.rho).

See Also

Basic association test BAT, direct INT DINT, indirect INT IINT.

Examples

Run this code
# NOT RUN {
set.seed(100);
# Design matrix
X = cbind(1,rnorm(1e3));
# Genotypes
G = replicate(1e3,rbinom(n=1e3,size=2,prob=0.25));
storage.mode(G) = "numeric";
# Phenotype
y = exp(as.numeric(X%*%c(1,1))+rnorm(1e3));
# Average correlation
p = OINT(y=y,G=G,X=X,method="AvgCorr");
# Bootstrap correlation
p = OINT(y=y,G=G[,1:10],X=X,method="Bootstrap",B=100);
# Manual correlation
p = OINT(y=y,G=G,X=X,method="Manual",set.rho=0.5);
# }

Run the code above in your browser using DataLab