DINT: Direct-INT

View source: R/DINT.R

DINTR Documentation

Direct-INT

Description

Applies the rank-based inverse normal transformation (RankNorm) to the phenotype y. Conducts tests of association between the loci in G and transformed phenotype, adjusting for the model matrix X.

Usage

DINT(
  y,
  G,
  X = NULL,
  k = 0.375,
  test = "Score",
  ties.method = "average",
  simple = FALSE
)

Arguments

y

Numeric phenotype vector.

G

Genotype matrix with observations as rows, SNPs as columns.

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.

test

Either Score or Wald.

ties.method

Method of breaking ties, passed to base::rank.

simple

Return the p-values only?

Value

If simple = TRUE, returns a vector of p-values, one for each column of G. If simple = FALSE, returns a numeric matrix, including the Wald or Score statistic, its standard error, the Z-score, and the p-value.

See Also

  • Basic association test BAT.

  • Indirect INT test IINT.

  • Omnibus INT test OINT.

Examples

set.seed(100)
# Design matrix
X <- cbind(1, stats::rnorm(1e3))
# Genotypes
G <- replicate(1e3, stats::rbinom(n = 1e3, size = 2, prob = 0.25))
storage.mode(G) <- "numeric"
# Phenotype
y <- exp(as.numeric(X %*% c(1, 1)) + stats::rnorm(1e3))
# Association test
p <- DINT(y = y, G = G, X = X)

RNOmni documentation built on Sept. 11, 2023, 9:07 a.m.