Learn R Programming

RNOmni (version 0.5.0)

IINT: Indirect-INT

Description

Two-stage association testing procedure. In the first stage, phenotype y and genotype G are each regressed on the model matrix X to obtain residuals. Next, the rank-based inverse normal transformation rankNorm is applied to the phenotypic residuals. In the second stage, tests of association are conducted between the genotypic residuals and the transformed phenotypic residuals.

Usage

IINT(y, G, X = NULL, k = 3/8, parallel = F)

Arguments

y

Numeric phenotype vector.

G

Obs by snp genotype matrix.

X

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

k

Offset applied during rank-normalization. See rankNorm.

parallel

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

Value

A numeric matrix of Wald statistics and p-values, one for each locus (column) in G, assessing the null hypothesis of no genetic effect.

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));
# Association test
p = IINT(y=y,G=G,X=X);
# }
# NOT RUN {
;
# }

Run the code above in your browser using DataLab