Learn R Programming

bimetallic (version 1.0)

allelicOR: 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.

Value

The odds ratio, floating point.

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))

See Also

chisq.sim.factory, ~~~

Examples

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

Run the code above in your browser using DataLab