A function from the fmsb package to compute risk difference. Calculate risk difference (a kind of attributable risk / excess risk) and its confidence intervals based on approximation, followed by null hypothesis (risk difference equals to 0) testing.

riskdifference(a, b, N1, N0, CRC = FALSE, conf.level = 0.95)

Arguments

a

The number of disease occurence among exposed cohort.

b

The number of disease occurence among non-exposed cohort.

N1

The population at risk of the exposed cohort.

N0

The population at risk of the unexposed cohort.

CRC

Logical. If TRUE, calculate confidence intervals for each risk. Default is FALSE.

conf.level

Probability for confidence intervals. Default is 0.95.

Value

A list with the results