MultipleSNP: Estimation of log-ORs (SEs) and significance test p-values...

Description Usage Arguments Value Examples

View source: R/MultipleSNP.R

Description

This function returns (1) log-OR estimates and the corresponding (2) standard errors and the significance test (3) p-values for multiple SNPs.

The imputs of this function include (1) disease status, (2) SNP genotype, (3) covariate(s), and (4) stratum indicator for each subject. Furthermore, the disease prevalence for each stratum is also required. Parallel computation can be used to speed up the analysis through specification of more than one CPU core. Because the function "mcapply" in the R package "parallel" is used, the core number can be greater than 1 with UNIX-like OS but it can be only 1 with Windows OS.

If a covariate is categorical, dummy variables should be constructed before using the function.

Usage

1
MultipleSNP(Gs, Y, Z, S, fs, par = NULL, link = "logit", modified=TRUE, cl.cores=1)

Arguments

Gs

SNP genotype matrix coded by 0, 1, or 2 according to the number of minor alleles, one colume per one SNP.

Y

Response variable (vector), which should take a value of 1 (case) or 0 (control).

Z

Covariate variable(s) (numerical vector for a single covariate or matrix for multiple covariates). Categorical variable should be coded as dummy variables.

S

Stratum variable (vector), which should take a value of 1, 2, ..., or K, where K is the number of strata.

fs

Prevalence(s) (vector). The ith entry is the prevalence for stratum i.

par

Initial regression parameters (list) including alpha, beta_G, beta_X, and beta_S, with the default value being NULL.

link

Link function, which should be either 'logit' (default value) or 'probit'.

modified

An indicator for modifiying the profile likelihood or not. If it is TRUE (default value), then the profile likelihood will be modified; otherwise the original profile likelihood function will be used.

cl.cores

CPU cores used, with a defaul value of 1.

Value

log-OR

Log odds ratios for SNP-disease associations.

SE

Estimated standard errors of log odds ratios

p-value

Significance test p-values for testing SNP-disease associations

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
  data(data);

  status = data[,1];

  stratum = data[,2];

  covariate = data[,3:5];

  Gs = data[,-(1:5)];

  fs = c(0.010869, 0.000867, 0.001707);

  res = MultipleSNP(Gs,Y=status,Z=covariate,S=stratum,fs=fs,cl.cores=1)

zhanghfd/CCGA documentation built on May 4, 2019, 10:16 p.m.