multipleSNP: Association analysis with multiple SNPs

Description Usage Arguments Value See Also Examples

View source: R/CCMO.R

Description

Multiple SNPs can be analyzed utilizing multiple CPU cores (requires the R package doMC), which calls singleSNP. Estimation results include the parameter estimates and their estimated standard errors, the p-values for significance tests (need to call OmnibusTest), some model information, and omnibus test if required (the argument test should be specified).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
multipleSNP(
  Y,
  Gc,
  Gm,
  Xo = NULL,
  Xc = NULL,
  Xm = NULL,
  X.Gm = NULL,
  G.main = c("Gc", "Gm"),
  G.int = FALSE,
  mode = "add",
  prev = 0.01,
  ind = FALSE,
  HWE = TRUE,
  normalized.genotype = FALSE,
  test = NULL,
  cores = NULL
)

Arguments

Y

a n-vector of disease statuses for n offspring (1 for case and 0 for control).

Gc

a n x m matrix of genotypes for offspring (n: number of offspring; m: number of SNPs). The possible values should be 0, 1, 2, or 1/2 (see normalized.genotype for details).

Gm

a n x m matrix of genotypes for mothers (n: number of mothers; m: number of SNPs). The possible values should be 0, 1, 2, or 1/2 (see normalized.genotype for details).

Xo

a n x n_o matrix of maternal covariates for main effects (n: number of mothers; n_o: the numbers of genotypes; default value: NULL)

Xc

a n x n_c matrix of maternal covariates for intercation effects with offspring genotypes (n: number of mothers; n_c: the numbers of genotypes; default value: NULL)

Xm

a n x n_m matrix of maternal covariates for intercation effects with maternal genotypes (n: number of mothers; n_m: the numbers of genotypes; default value: NULL)

X.Gm

a n x n_g matrix of maternal covariates potentially associated with maternal genotypes (n: number of mothers; n_g: the numbers of genotypes; default value: NULL)

G.main

a vector containing the main SNP effects taking values 'Gc' and/or 'Gm' (default value: c('Gc','Gm'))

G.int

an indicator for the presence of Gc x Gm interaction (TRUE for yes and FALSE for no; default value: FALSE)

mode

mode of inheritance ('rec' for recessive, 'add' for additive, 'dom' for dominant; default value: 'add')

prev

specified disease prevalence (default value: 0.01)

ind

a logical variable indicating whether Gm and X.Gm are independent (TRUE for independence and FALSE for dependence, default value: FALSE)

HWE

a logical variable indicating whether the HWE assumption is incorporated (TRUE for incorprated and FALSE otherwise; default value: TRUE)

normalized.genotype

a logical variable indicating whether the genotypes are normalized (TRUE for normalized and FALSE otherwise, default value: FALSE). If FALSE, Gc and Gm should take values 0 (genotype AA), 1 (genotype AB), 2 (genotype BB); otherwise, their values depend on the mode of inheritance ('add': 0 for genotype AA, 0.5 for genotype AB, 1 for genotype BB; 'rec': 0 for genotype AA or AB, 1 for genotype BB; 'dom': 0 for genotype AA, 1 for genotype AB or BB).

test

a vector of predictor indices in Omnibus test (default value: NULL; if not NULL, call OmnibusTest)

cores

the number of CPU cores used for parallele execution. If not specified, the system will determine its value.

Value

a list of length m, each element is a list with the following elements

new

estimation and significance test results for the new method

log

estimation and significance test results for the standard logistic regression method

cov.new

covariance matrix of the estimated parameters by the new method

cov.log

covariance matrix of the estimated parameters by the standard logistic regression method)

penetrance

logistic regression model for the penetrance function

daLOG

daLOG model relating maternal genotype and maternal covariates

Omnibus

Omnibus test results (test statistic, degrees of freedom, p-value) if test is not NULL

See Also

singleSNP OmnibusTest

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
library(foreach)
data(SampleData)
Y = SampleData[,1]
M = 10 # the number of SNPs
Gc = SampleData[,1+1:M]
Gm = SampleData[,1+M+(1:M)]
X = SampleData[,-(1:(1+2*M))]
res = multipleSNP(Y,Gc,Gm,Xo=X,Xc=X,Xm=X,X.Gm=X)

## End(Not run)

zhanghfd/CCMO documentation built on March 18, 2021, 12:18 a.m.