Skip to contents

Levin's formula (Rothman, Greenland and Lash 2008, chapter 5): $$PAF = p (RR - 1) / (1 + p (RR - 1)).$$

Usage

morie_envhealth_attributable_fraction(rr, exposure_prevalence)

Arguments

rr

Relative risk at the observed exposure level.

exposure_prevalence

Proportion of the population exposed, in [0, 1].

Value

The fraction of cases that would be avoided if the exposure were removed.

Examples

morie_envhealth_attributable_fraction(1.5, 0.4)
#> [1] 0.1666667