marginal.assoc.test.unconstrained.chisq {CCpop}R Documentation

Marginal association tests


Tests for association of single SNP locus and a binary phenotype in case-control, case-population, and case-control-population designs, under various assumptions.


  marginal.assoc.test.unconstrained.chisq(t0, t1)
  marginal.assoc.test.unconstrained.gsq(t0, t1), t1)
  marginal.assoc.test.pop.hwe.kpy(t0, t1, tp, prevalence, 
    pen.initial = NULL, f.initial = NULL)
  marginal.assoc.test.kpx.kpy(t0, t1, prevalence, px, pen.initial = NULL)



A 3-component vector of genotype counts in the controls cohort


A 3-component vector of genotype counts in the cases cohort


A 3-component vector of genotype counts in the population cohort


The population prevalence of the phenotype Pr(y=1) < 0.5


A 3-component vector of known genotypic distribution in the population Pr(x)


A 3-component vector of initial guess for phenotypic penetrance Pr(y=1|x)


Initial guess for the SNP's minor allele frequency (MAF)


marginal.assoc.test.unconstrained.chisq – Pearson's chi-squared test for the 2x3 contingency table of a standard case-control design.

marginal.assoc.test.unconstrained.gsq – Likelihood ratio ("G") test for the 2x3 contingency table of a standard case-control design. – A test for association in a standard case-control design, assuming HWE among the controls (Chen and Chatterjee, 2007).

marginal.assoc.test.pop.hwe.kpy – GLRT based on constrained maximum likelihood estimation assuming HWE in the general population, and that disease prevalence is known.

marginal.assoc.test.kpx.kpy – GLRT based on constrained maximum likelihood estimation assuming the marginal genotypic and phenotypic distributions are known.



P-value indicating significance of the association


Value of the relevant test statistic


The estimated case-control peneterance Pr(y=1|x,ascertained)


The implementation assumes that contingency tables are provided with homozygote major allele as the first element.

In order to perform case-population testing, the user may set t0 to a vector of zeros.

An inferior alternative to case-control-population analysis which may be desirable in the interest of analysis speed and can be acceptable for low prevalence phenotypes is to extend the controls cohort with any population samples. This can be achieved by providing = t0.old + tp.old and using one of the case-control tests.

Tests based on the 2x9 contingency table treat the two SNPs as one 9-category variable.


Shachar Kaufman


Chen J., & Chatterjee, N. (2007). Exploiting hardy-weinberg equilibrium for effcient screening of single SNP associations from case-control studies. Human heredity, 63(3-4), 196-204.

Kaufman, S., & Rosset, S. (2014). Exploiting Population Samples To Enhance Genome-Wide Association Studies of Disease. Genetics, 114 (early electronic).

See Also



  ## An example marginal/pairwise association
  # Controls
  t0 = matrix(c(375,  240,   46,
                640,  405,   62,
                300,  169,   19), nrow = 3, byrow = TRUE)
  # Cases
  t1 = matrix(c(317,  162,   15,
                459,  209,   22,
                120,   76,   13), nrow = 3, byrow = TRUE)
  # Independent population sample, marginalized for SNP1 and SNP2
  tp1 = c(2410, 4253, 1945)
  tp2 = c(4972, 3140,  496)
  ## The prevalence of the studied disease in the population
  prevalence = 0.001

  marginal.assoc.test.pop.hwe.kpy(t0 = rowSums(t0), t1 = rowSums(t1), tp = tp1, prevalence)
  marginal.assoc.test.pop.hwe.kpy(t0 = colSums(t0), t1 = colSums(t1), tp = tp2, prevalence)
  pairwise.assoc.test.pop.hwe.le.kpy(t0, t1, tp1, tp2, prevalence)  
  conditional.assoc.test.pure.pop.hwe.le.kpy(t0, t1, tp1, tp2, prevalence)

[Package CCpop version 1.0 Index]