pairwise.assoc.test.unconstrained.chisq(t0, t1) pairwise.assoc.test.unconstrained.gsq(t0, t1) pairwise.assoc.test.case.only(t1) pairwise.assoc.test.ind.3d(t0, t1) pairwise.assoc.test.pure.unconstrained(t0, t1) pairwise.assoc.test.kpy(t0, t1, prevalence, pen.initial = NULL, pxx.initial = NULL) pairwise.assoc.test.hwe.le.kpy(t0, t1, prevalence, pen.initial = NULL, f1.initial = NULL, f2.initial = NULL) pairwise.assoc.test.kpx.kpy(t0, t1, prevalence, pxx, pen.initial = NULL) pairwise.assoc.test.pop.kpy(t0, t1, tp, prevalence, pen.initial = NULL, pxx.initial = NULL) pairwise.assoc.test.pop.hwe.le.kpy(t0, t1, tp1, tp2, prevalence, pen.initial = NULL, f1.initial = NULL, f2.initial = NULL) pairwise.assoc.test.pure.pop.kpy(t0, t1, tp, prevalence, pen.initial = NULL, pxx.initial = NULL) pairwise.assoc.test.pure.pop.hwe.le.kpy(t0, t1, tp1, tp2, prevalence, pen.initial = NULL, f1.initial = NULL, f2.initial = NULL) conditional.assoc.test.pure.pop.hwe.le.kpy(t0, t1, tp1, tp2, prevalence, pen.initial = NULL, f1.initial = NULL, f2.initial = NULL)
t0/t1
rows) locus in the population cohortt0/t1
columns) locus in the population cohortPr(y=1) < 0.5
Pr(x1,x2)
Pr(y=1|x1,x2)
Pr(x1,x2)
Pr(y=1|x,ascertained)
marginal.assoc.tests
,
## 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)
Run the code above in your browser using DataLab