Skip to contents

Takes a pair of binary vectors and computes the log ratio, log-odds, standard error of the log-odds, and 95% CI of the log-odds.

Usage

get.odds.ratio(x,y);

Arguments

x

A binary vector

y

A binary vector

Value

A vector containing: odds-ratio, log odds-ratio, standard error of the log odds-ratio, and 95% CIs of the log-odds ratio

Author

Paul C. Boutros

Examples

x <- sample(0:1, 100, replace = TRUE);
y <- sample(0:1, 100, replace = TRUE);
get.odds.ratio(x,y);
#> [1]  0.8934169 -0.1127019  0.4073110 -0.9110314  0.6856276