compute_OR: compute_OR

View source: R/compute_OR.R

compute_ORR Documentation

compute_OR

Description

compute_OR() calculates odds ratios from data of two vectors representing the frequencies of: numerator; denominator. The correction may be used if there is any frequency equals zero to avoid getting meaningless outputs.

Usage

compute_OR(numerator, denominator, correction = TRUE)

Arguments

numerator

the column whose data are the frequencies of the numerator

denominator

the column whose data are the frequencies of the denominator

correction

logical, if TRUE (the default) the odds ratio will be calculated by adding 0.5 to avoid meaningless results

Value

A vector of odds ratios

Examples

compute_OR(rbinom(10, 1000, 0.8), rbinom(10, 1000, 0.1), FALSE)


statcourses/dsEssex documentation built on Jan. 10, 2024, 4:32 p.m.