zepid.calc.utils.attributable_community_risk

zepid.calc.utils.attributable_community_risk(a, b, c, d)

Calculates the estimated attributable community risk (ACR) from count data. ACR is also known as Population Attributable Risk. Since this is commonly confused with the population attributable fraction, the name ACR is used to clarify differences in the formulas

Attributable community risk is calculated as

\[ACR = \frac{a + c}{a + b + c + d} - \frac{c}{c + d} = R - R_0\]
Parameters:
  • a (integer, float) – Count of exposed individuals with outcome
  • b (integer, float) – Count of unexposed individuals with outcome
  • c (integer, float) – Count of exposed individuals without outcome
  • d (integer, float) – Count of unexposed individuals without outcome
Returns:

Attributable community risk

Return type:

float

Examples

Return the attributable community risk

>>> from zepid.calc import attributable_community_risk
>>> attributable_community_risk(45, 55, 21, 79)