Learn R Programming

sasLM (version 1.0.1)

OR: Odds Ratio of two groups

Description

Odds ratio between two groups

Usage

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

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

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

Author

Kyun-Seop Bae k@acr.kr

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.

See Also

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

Examples

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

Run the code above in your browser using DataLab