allelicOR: Calculate an odds ratio from a 2x3 contigency table of...

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Find the odds ratio, per allele, in biallelic marker in a diploid individual. The locus must be under Hardy-Weinburg at the margin, ie, alleles are independent, for this calculation to hold.

Usage

1
allelicOR(xtable)

Arguments

xtable

A 2x3 contingency table of frequencies or counts of individuals.

Details

The OR is calculated as (2*#AA.Case + #Aa.Case) * (2*#AA.Control + #Aa.Control) / ((2*#aa.Case + #Aa.Case) * (2*#aa.Control + #Aa.Control))

Value

The odds ratio, floating point.

Author(s)

Andrew McDavid

See Also

chisq.sim.factory, ~~~

Examples

1
2
cont.table = matrix(c(5, 4, 1, 4, 3, 4), nrow=2, ncol=3, byrow=TRUE)
allelicOR(cont.table)

Example output

[1] 2.333333

bimetallic documentation built on May 2, 2019, 1:27 p.m.