OR: Odds Ratio of two groups

View source: R/OR.R

ORR Documentation

Odds Ratio of two groups

Description

Odds ratio between two groups

Usage

  OR(y1, n1, y2, n2, conf.level=0.95)

Arguments

y1

positive event count of the test (the first) group

n1

total count of the test (the first) group

y2

positive event count of the control (the second) group

n2

total count of the control (the second) group

conf.level

confidence level

Details

It calculates the odds ratio of two groups. No continuity correction is done here. If you need the percent scale, multiply the output by 100.

Value

The result is a data.frame.

odd1

odds from the first group, y1/(n1 - y1)

odd2

odds from the second group, y2/(n2 - y2)

OR

odds ratio, odd1/odd2

SElog

standard error of log(OR)

lower

lower confidence limit of OR

upper

upper confidence limit of OR

Author(s)

Kyun-Seop Bae k@acr.kr

See Also

RD, RR, RDmn1, RRmn1, ORmn1, RDmn, RRmn, ORmn

Examples

  OR(104, 11037, 189, 11034) # no continuity correction

sasLM documentation built on June 15, 2026, 9:07 a.m.