odds_ratio: A simple function for calculating odds ratios from 2x2 tables

Description Usage Arguments Examples

View source: R/odds_ratio.R

Description

This function allows for odds ratio calculations.

Usage

1
odds_ratio(a, b, c, d, ci = FALSE, alpha = 0.05, paired = FALSE)

Arguments

a

The exposed + disease + count

b

The exposed + disease - count

c

The exposed - disease + count

d

The exposed - disease - count

ci

Return a confidence interval instead of point estimate

alpha

The confidence level of the interval

paired

Is the study design based on matched pairs?

Examples

1
2
odds_ratio(30,40,10,50)
odds_ratio(30,40,10,50,ci = TRUE)

carter-allen/oddsR documentation built on May 28, 2019, 7:14 p.m.