RD: Risk Difference between two groups

View source: R/RD.R

RDR Documentation

Risk Difference between two groups

Description

Risk (proportion) difference between two groups

Usage

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

Arguments

y1

positive event count of test (the first) group

n1

total count of the test (the first) group

y2

positive event count of control (the second) group

n2

total count of control (the second) group

conf.level

confidence level

Details

It calculates risk difference between the two groups. No continuity correction here. If you need percent scale, multiply the output by 100.

Value

The result is a data.frame.

p1

proportion from the first group

p2

proportion from the second group

RD

risk difference, p1 - p2

SE

standard error of RD

lower

lower confidence limit of RD

upper

upper confidence limit of RD

Author(s)

Kyun-Seop Bae k@acr.kr

See Also

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

Examples

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

sasLM documentation built on Nov. 19, 2023, 5:12 p.m.