allelicOR {bimetallic}R Documentation

Calculate an odds ratio from a 2x3 contigency table of genotype X phenotype

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

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

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

[Package bimetallic version 1.0 Index]