SingleSNP: Estimation of regression parameters and their standard errors...

Description Usage Arguments Value Examples

View source: R/SingleSNP.R

Description

This function returns parameter estimates and their standard errors for the parameters in the model relating disease status and (1) SNP genotype, (2) stratum variable, and (3) covariate(s). The estimated parameters include (1) regression parameters and (2) minor allele frequency. If the original profile likelihood is maximized, If the outputs also include (3) Lagrange's multipliers.

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.

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

Usage

1
SingleSNP(Y, G, X, S, fs, par = NULL, link = "logit", modified = TRUE)

Arguments

Y

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

G

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

X

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.

Value

LOGIT

Standard logistic regression results including the MLEs of regression parameters, standard errors, and significance test p-values.

mpMLE

Modified profile MLEs, standard errors, and significance test p-values.

pMLE

The original prifile MLEs, standard errors, and significance test p-values, available when "modified" is FALSE.

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];

  genotype = data[,6];

  fs = c(0.010869, 0.000867, 0.001707);

  res = SingleSNP(Y=status,G=genotype,X=covariate,S=stratum,fs=fs);

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