Learn R Programming

wtest (version 3.0)

odds.ratio: Odds ratio

Description

Function to calculate odds ratio of both main effect and pair wise interaction. Odds ratio of pair wise interaction is calculated by the coefficient of the interaction term in Logistic Regression.

Usage

odds.ratio(data, y, w.order, which.pair)

Arguments

data

a data frame or matrix contains genotypes in the columns. Genotypes should be coded as (0, 1, 2) or (0, 1).

y

a numeric vector.

w.order

a numeric number taking values 1 or 2. If w.order = 1, main effect is calculated. If w.order = 2, pairwise interaction effect is calculated.

which.pair

a numeric vector with length = w.order indicates which pair to calculate the odds ratio.

Value

The odds ratio of one marker

Examples

Run this code
# NOT RUN {
data(mydata)
data(phenotype1)
y<-as.numeric(phenotype1)
result <- odds.ratio(mydata,y,w.order=2,which.pair=c(4,8))
# }

Run the code above in your browser using DataLab