Attributable risk: Difference between revisions

From Opasnet
Jump to navigation Jump to search
(resolution links added)
(code updated etc)
Line 14: Line 14:
; Attributable fraction: the fraction of cases '''among the exposed''' that would not have occurred if the exposure would not have taken place:  
; Attributable fraction: the fraction of cases '''among the exposed''' that would not have occurred if the exposure would not have taken place:  
:<math>AF = \frac{RR - 1}{RR}</math>
:<math>AF = \frac{RR - 1}{RR}</math>
; Population attributable fraction: the fraction of cases '''among the whole population''' that would not have occurred if the exposure would not have taken place. The most useful formulas are
; Population attributable fraction: the fraction of cases '''among the total population''' that would not have occurred if the exposure would not have taken place. The most useful formulas are
::<math>PAF = 1 - \frac{1}{\sum_{i=0}^k p_i (RR_i)}</math>
::<math>PAF = 1 - \frac{1}{\sum_{i=0}^k p_i (RR_i)}</math>
::for use with several population subgroups (typically with different exposure levels). Not valid when confounding exists. Subscript i refers to the ith subgroup. p<sub>i</sub> = proportion of '''source population''' {{attack|# |This is a confusing term, I don't get the meaning of it|--[[User:Arja|Arja]] ([[User talk:Arja|talk]]) 07:19, 8 April 2016 (UTC)}} in ith subgroup.
::for use with several population subgroups (typically with different exposure levels). Not valid when confounding exists. Subscript i refers to the ith subgroup. p<sub>i</sub> = proportion of '''total population''' in ith subgroup.
::<math>PAF = 1- \sum_{i=0}^k \frac{p_{ci}}{RR_i} = \sum_i p_{ci} \frac{p_i(RR_i - 1)}{p_i(RR_i - 1) + 1}</math>
::<math>PAF = 1- \sum_{i=0}^k \frac{p_{ci}}{RR_i} = \sum_i p_{ci} \frac{p_{ei}(RR_i - 1)}{p_{ei}(RR_i - 1) + 1}</math>
::which produces valid estimates when confounding exists but with a problem that parameters are often not known. p<sub>ci</sub> is the proportion of '''cases''' falling in subgroup i (so that &Sigma;<sub>i</sub>p<sub>ci</sub> = 1), p<sub>i</sub> is the fraction of '''exposed''' people within subgroup i (and 1-p<sub>i</sub> is the fraction of unexposed)
::which produces valid estimates when confounding exists but with a problem that parameters are often not known. p<sub>ci</sub> is the proportion of '''cases''' falling in subgroup i (so that &Sigma;<sub>i</sub>p<sub>ci</sub> = 1), p<sub>ei</sub> is the proportion of '''exposed''' people within subgroup i (and 1-p<sub>i</sub> is the fraction of unexposed)
; Etiologic fraction: Fraction of cases among the exposed that would have occurred later (if at all) if the exposure would not have taken place. It cannot be calculated without understanding of the biological mechanism, but it is always between  
; Etiologic fraction: Fraction of cases among the exposed that would have occurred later (if at all) if the exposure would not have taken place. It cannot be calculated without understanding of the biological mechanism, but it is always between  
:<math>\frac{RR-1}{RR^{RR/(RR-1)}}</math> and 1.
:<math>\frac{RR-1}{RR^{RR/(RR-1)}}</math> and 1.


==Rationale==
==Rationale==
'''Definitions of terms
There are several different kinds of proportions that sound alike but are not. Therefore, we explain the specific meaning of several terms.
; Total population (N): The number of people in the total population considered, including cases, non-cases, exposed and non-exposed.
; Classifications: There are three classifications, and every person in the total population belongs to exactly one group in each classification.
:* Disease (D): classes case (C) and non-case (nc)
:* Exposure (E): classes exposed (1) and non-exposed (0)
:* Population subgroup (S): classes i = 1, 2, ..., k (typically based on different exposure levels)
; Attributable fraction (AF): The proportion of cases caused by exposure among all cases (in the subgroup)
; Proportion exposed (p<sub>e</sub>, p<sub>ei</sub>): proportion of exposed among the total population or within subgroup i: p<sub>e</sub> = N(E=1)/N, p<sub>ei</sub> = N(E=1,S=i)/N(S=i)
; Proportion of population (p<sub>i</sub>): proportion of population in subgroups i among the total population: N(S=i)/N
; Proportion of cases (p<sub>ci</sub>): proportion of cases in subgroups i among the total cases: N(D=c,S=i)/N(D=c)


=== Etiologic fraction ===
=== Etiologic fraction ===
Line 41: Line 54:
is the authoritative source of epidemiology. They first define ''attributable fraction AF'' for a cohort of people (pages 295-297). It is the fraction of cases among the exposed that would not have occurred if the exposure would not have taken place.{{reslink|Choosing the right fraction}}
is the authoritative source of epidemiology. They first define ''attributable fraction AF'' for a cohort of people (pages 295-297). It is the fraction of cases among the exposed that would not have occurred if the exposure would not have taken place.{{reslink|Choosing the right fraction}}


<math>AF = \frac{IP_1 - IP_0}{IP_1} = \frac{RR-1}{RR}</math>
{| {{prettytable}}
 
|+'''Different ways to calculate population attributable fraction AF and PAF.
is empirical approximation of  
!#
!Formula
!Description
|----
|1
|<math>AF = \frac{IP_1 - IP_0}{IP_1} = \frac{RR-1}{RR}</math>
|is empirical approximation of  


<math>\frac{P(D) - \sum_C P(D|C, \bar{E}) P(C)}{P(D)}</math>
<math>\frac{P(D) - \sum_C P(D|C, \bar{E}) P(C)}{P(D)}</math>


where IP<sub>1</sub> = cumulative proportion of total population developing disease over specified interval; IP<sub>0</sub> = cumulative proportion of unexposed persons who develop disease over interval. Valid only when no confounding of exposure(s) of interest exists. If disease is rare over time interval, ratio of average incidence rates I<sub>0</sub>/I<sub>1</sub> approximates ratio of cumulative incidence proportions, and thus formula can be written as (I<sub>1</sub> - I<sub>0</sub>)/I<sub>1</sub>. Both formulations found in many widely used epidemiology textbooks.
where IP<sub>1</sub> = cumulative proportion of total population developing disease over specified interval; IP<sub>0</sub> = cumulative proportion of unexposed persons who develop disease over interval. Valid only when no confounding of exposure(s) of interest exists. If disease is rare over time interval, ratio of average incidence rates I<sub>0</sub>/I<sub>1</sub> approximates ratio of cumulative incidence proportions, and thus formula can be written as (I<sub>1</sub> - I<sub>0</sub>)/I<sub>1</sub>. Both formulations found in many widely used epidemiology textbooks.
 
|----
{| {{prettytable}}
|2
|+'''Different ways to calculate population attributable fraction PAF
|<math>\frac{p_e(RR-1)}{p_e(RR-1)+1}</math>
|<math>\frac{p_e(RR-1)}{p_e(RR-1)+1}</math>
|Transformation of formula 1. {{attack|# |Which is formula 1? Same questions for the other ones below |--[[User:Arja|Arja]] ([[User talk:Arja|talk]]) 07:01, 8 April 2016 (UTC)}} Not valid when there is confounding of exposure-disease association. p<sub>e</sub> = proportion of source population exposed to the factor of interest. RR may be ratio of two cumulative incidence proportions (risk ratio), two (average) incidence rates (rate ratio), or an approximation of one of these ratios. Found in many widely used epidemiology texts, but often with no warning about invalidness when confounding exists.
|Transformation of formula 1. Not valid when there is confounding of exposure-disease association. p<sub>e</sub> = proportion of total population exposed to the factor of interest. RR may be ratio of two cumulative incidence proportions (risk ratio), two (average) incidence rates (rate ratio), or an approximation of one of these ratios. Found in many widely used epidemiology texts, but often with no warning about invalidness when confounding exists.
|----
|----
|3
|<math>\frac{\sum_{i=0}^k p_i (RR_i - 1)}{1 + \sum_{i=0}^k p_i (RR_i - 1)} = 1 - \frac{1}{\sum_{i=0}^k p_i (RR_i)}</math>
|<math>\frac{\sum_{i=0}^k p_i (RR_i - 1)}{1 + \sum_{i=0}^k p_i (RR_i - 1)} = 1 - \frac{1}{\sum_{i=0}^k p_i (RR_i)}</math>
|Extension of formula 2 for use with multicategory exposures. Not valid when confounding exists. Subscript i refers to the ith exposure level. p<sub>i</sub> = proportion of source population in ith exposure level, RR<sub>j</sub> = relative risk comparing ith exposure level with unexposed group (i = 0). Derived by Walter<ref name="walter">Walter SD. The estimation and interpretation of attributable fraction in health research. Biometrics. 1976;32:829-849.</ref>; given in Kleinbaum et al.<ref name="kleinbaum">Kleinbaum DG, Kupper LL, Morgenstem H. Epidemiologic Research. Belmont, Calif: Lifetime Learning Publications; 1982:163.</ref> but not in other widely used epidemiology texts.
|Extension of formula 2 for use with multicategory exposures. Not valid when confounding exists. Subscript i refers to the ith exposure level. p<sub>i</sub> = proportion of total population in ith exposure level, RR<sub>j</sub> = relative risk comparing ith exposure level with unexposed group (i = 0). Derived by Walter<ref name="walter">Walter SD. The estimation and interpretation of attributable fraction in health research. Biometrics. 1976;32:829-849.</ref>; given in Kleinbaum et al.<ref name="kleinbaum">Kleinbaum DG, Kupper LL, Morgenstem H. Epidemiologic Research. Belmont, Calif: Lifetime Learning Publications; 1982:163.</ref> but not in other widely used epidemiology texts.
|----
|----
|<math>\sum_i p_{ci} \frac{p_i(RR_i - 1)}{p_i(RR_i - 1) + 1}</math>
|4
|<math>\sum_i p_{ci} \frac{p_{ei}(RR_i - 1)}{p_{ei}(RR_i - 1) + 1}</math>
|A useful formulation where  
|A useful formulation where  
* p<sub>ci</sub> is the proportion of '''cases''' falling in subgroup i (so that &Sigma;<sub>i</sub>p<sub>ci</sub> = 1),
* p<sub>ci</sub> is the proportion of '''cases''' falling in subgroup i (so that &Sigma;<sub>i</sub>p<sub>ci</sub> = 1),
* p<sub>i</sub> is the fraction of '''exposed''' people within subgroup i (and 1-p<sub>i</sub> is the fraction of unexposed),
* p<sub>ei</sub> is the fraction of '''exposed''' people within subgroup i (and 1-p<sub>i</sub> is the fraction of unexposed),
* RR<sub>i</sub> is the risk ratio for subgroup i due to the subgroup-specific exposure level (assuming that everyone in that subgroup is exposed to that level or none).  
* RR<sub>i</sub> is the risk ratio for subgroup i due to the subgroup-specific exposure level (assuming that everyone in that subgroup is exposed to that level or none).  
|----
|----
|5
|<math>p_c(\frac{RR-1}{RR})</math>
|<math>p_c(\frac{RR-1}{RR})</math>
|Alternative expression. Produces internally valid estimate when confounding exists and when, as a result, adjusted relative risks must be used.<ref name="miettinen">Miettinen 0. Proportion of disease caused or
|Alternative expression of formula 3. Produces internally valid estimate when confounding exists and when, as a result, adjusted relative risks must be used.<ref name="miettinen">Miettinen 0. Proportion of disease caused or
prevented by a given exposure, trait, or intervention. Am JEpidemiol. 1974;99:325-332.</ref> p<sub>c</sub> = proportion of cases exposed to risk factor. In Kleinbaum et al.<ref name="kleinbaum"/> and Schlesselman.<ref name="schlesselman">Schlesselman JJ. Case-Control Studies: Design, Conduct, Analysis. New York, NY: Oxford University Press Inc; 1982.</ref>
prevented by a given exposure, trait, or intervention. Am JEpidemiol. 1974;99:325-332.</ref> p<sub>c</sub> = proportion of cases exposed to risk factor. In Kleinbaum et al.<ref name="kleinbaum"/> and Schlesselman.<ref name="schlesselman">Schlesselman JJ. Case-Control Studies: Design, Conduct, Analysis. New York, NY: Oxford University Press Inc; 1982.</ref>
|----
|----
|6
|<math>\sum_{i=0}^k p_{ci} (\frac{RR_i - 1}{RR_i}) = 1- \sum_{i=0}^k \frac{p_{ci}}{RR_i}</math>
|<math>\sum_{i=0}^k p_{ci} (\frac{RR_i - 1}{RR_i}) = 1- \sum_{i=0}^k \frac{p_{ci}}{RR_i}</math>
|Extension of formula 4 for use with multicategory exposures. Produces internally valid estimate when confounding exists and when, as a result, adjusted relative risks must be used. p<sub>ci</sub> = proportion of cases falling into ith exposure level; RR<sub>i</sub> = relative risk comparing ith exposure level with unexposed group (i = 0). See Bruzzi et al. <ref name="bruzzi">Bruzzi P, Green SB, Byar DP, Brinton LA, Schairer C. Estimating the population attributable risk for multiple risk factors using case-control data. Am J Epidemiol. 1985; 122: 904-914.</ref> and Miettinen<ref name="miettinen"/> for discussion and derivations; in Kleinbaum et al.<ref name="kleinbaum"/> and Schlesselman.<ref name="schlesselman"/>
|Extension of formula 5 for use with multicategory exposures. Produces internally valid estimate when confounding exists and when, as a result, adjusted relative risks must be used. p<sub>ci</sub> = proportion of cases falling into ith exposure level; RR<sub>i</sub> = relative risk comparing ith exposure level with unexposed group (i = 0). See Bruzzi et al. <ref name="bruzzi">Bruzzi P, Green SB, Byar DP, Brinton LA, Schairer C. Estimating the population attributable risk for multiple risk factors using case-control data. Am J Epidemiol. 1985; 122: 904-914.</ref> and Miettinen<ref name="miettinen"/> for discussion and derivations; in Kleinbaum et al.<ref name="kleinbaum"/> and Schlesselman.<ref name="schlesselman"/>
|}
|}


Line 108: Line 130:


<rcode name="AF" label="Initiate AF (only for developers)" embed=1>
<rcode name="AF" label="Initiate AF (only for developers)" embed=1>
# This is code Op_en6211/AF on page [[Attributable risk]]
# Parameters: none
library(OpasnetUtils)
library(OpasnetUtils)


# UPDATE AF TO REFLECT THE CURRENT IMPLEMENTATION OF ERF [[Exposure-response function]]
# AF = attributable fraction
### ESTIMATES OF ATTRIBUTABLE CASES BASED ON ATTRIBUTABLE FRACTION
# EF = etiologic fraction
# We estimate the number of cases and their attributable causes based on [[Population attributable fraction]].
# PAF = population attributable fraction using
EF <- Ovariable("EF",
dependencies = data.frame(Name = c(
"RR" # Risk ratio
)),
formula = function(...) {
 
R <- unkeep(RR, sources = TRUE, prevresults = TRUE)
EF <- (RR - 1) / R^(R/(R-1))
EF <- EF * Ovariable("temp", data = data.frame(
EFestimate = c("Low", "High"),
Result = 1
))
result(EF)[EF$EFestimate == "High"] <- 1
 
return(EF)
}
)


AF <- Ovariable("AF", # Cases attributed to specific (combinations of) causal exposures.
AF <- Ovariable("AF",  
dependencies = data.frame(Name = c(
dependencies = data.frame(Name = c(
"ERF", # Exposure-response function
"RR" # Risk ratio
"exposure", # Total exposure to an agent or pollutant
"frexposed", # fraction of population that is exposed
"bgexposure" # Background exposure to an agent (a level below which you cannot get in practice)
)),
)),
formula = function(...) {
formula = function(...) {


# First calculate risk ratio and remove redundant columns because they cause harm when operated with itself.
AF <- (RR - 1) / unkeep(RR, sources = TRUE, prevresults = TRUE)
RR <- frexposed * exp(log(ERF) * (exposure - bgexposure)) - frexposed + 1
PAF <- (RR - 1) / unkeep(RR, sources = TRUE, prevresults = TRUE)


# pollutants is a vector of pollutants considered.
return(AF)
pollutants <- as.character(unique(exposure@output$Pollutant))
}
)


expname <- paste(exposure@name, "Result", sep = "")
PAF <- Ovariable("PAF",  
 
dependencies = data.frame(Name = c(
out <- 1
"RR", # Risk ratio
for(i in 1:length(pollutants)) {
"pci", # proportion of cases falling subgroup i among all cases
"pei" # proportion of exposed people within subgroup i
# Attributable fraction of a particular pollutant is combined with all pollutant AFs.
)),
# The combination has 2^n rows (n = number of pollutants). Pollutant is either + or - depending on
# whether it caused the disease or not.
formula = function(...) {
temp <- Ovariable("temp", data = data.frame(
Pollutant = pollutants[i],
Temp1 = c(paste(pollutants[i], "-", sep = ""), paste(pollutants[i], "+", sep = "")),  
Result = c(-1, 1) # Non-causes are temporarily marked with negative numbers.
))
temp <- temp * PAF


# Non-causes are given the remainder (1-AF) of temporary attributable fraction AF.
peirri <- pei * (RR - 1)
result(temp) <- ifelse(result(temp) > 0, result(temp), 1 + result(temp))
peirri <- unkeep(peirri, sources = TRUE, prevresults = TRUE)
# Causes with 0 AF are marked 1. This must be corrected.
result(temp) <- ifelse(result(temp) == 1 & grepl("\\+", temp@output$Temp1), 0, result(temp))


#If exists, the exposureResult is renamed so that it can be kept without side effects.
PAF <- pci * peirri / (peirri + 1) # The population subgroup could be summed up.
#These should not be marginals but there seems to be problems in this respect.
if(expname != "Result"){
colnames(temp@output)[colnames(temp@output) == expname] <- paste("expo", pollutants[i], sep = "")
}
out <- out * temp
out <- unkeep(out, cols = "Pollutant", sources = TRUE, prevresults = TRUE)


# Combine and rename columns.
return(PAF)
if(i == 1) {
colnames(out@output)[colnames(out@output) == "Temp1"] <- "Causes"
} else {
out@output$Causes <- paste(out@output$Causes, out@output$Temp1)
out@output$Temp1 <- NULL
}
}
return(out)
}
}
)
)


objects.store(AF)
objects.store(EF, AF, PAF)
cat("Ovariable AF stored.\n")
cat("Ovariables EF, AF, PAF stored.\n")
</rcode>


</rcode>
A [http://en.opasnet.org/en-opwiki/index.php?title=Attributable_risk&oldid=39071#Calculations previous version of code] looked at RRs of all exposure agents and summed PAFs up.


=== Derivation of PAF ===
=== Derivation of PAF ===
Line 272: Line 289:
where RR<sub>i,j</sub> = exp(ln(ERF<sub>j</sub>) exposure<sub>i,j</sub>).
where RR<sub>i,j</sub> = exp(ln(ERF<sub>j</sub>) exposure<sub>i,j</sub>).


In addition, if only fraction p of the population is exposed, for the whole population we get
In addition, if only fraction p of the population is exposed, for the total population we get


<math>RR = \frac{p * N * background * RR_{exposed} + (1-p) * N * background * RR_{unexposed}}{N * background * RR_{unexposed}}</math>
<math>RR = \frac{p * N * background * RR_{exposed} + (1-p) * N * background * RR_{unexposed}}{N * background * RR_{unexposed}}</math>

Revision as of 10:45, 8 April 2016

Progression class
In Opasnet many pages being worked on and are in different classes of progression. Thus the information on those pages should be regarded with consideration. The progression class of this page has been assessed:
This page is a full draft
This page has been written through once, so all important content is already where it should be. However, the content has not been thoroughly checked yet, and for example important references might still be missing.
The content and quality of this page is/was being curated by the project that produced the page.


Attributable risk is a fraction of total risk that can be attributed to a particular cause. There are a few different ways to calculate it. Population attributable fraction of an exposure agent is the fraction of disease that would disappear if the exposure to that agent would disappear in a population. Etiologic fraction is the fraction of cases that have occurred earlier than they would have occurred (if at all) without exposure. Etiologic fracion cannot typically be calculated based on risk ratio (RR) alone, but it requires knowledge about biological mechanisms.

Question

How to calculate attributable risk? What different approaches there are, and what are their differences in interpretation and use?

Answer

Risk ratio (RR)
risk among the exposed divided by the risk among the non-exposed
Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle RR = \frac{R_1}{R_0}.}
Attributable fraction
the fraction of cases among the exposed that would not have occurred if the exposure would not have taken place:
Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle AF = \frac{RR - 1}{RR}}
Population attributable fraction
the fraction of cases among the total population that would not have occurred if the exposure would not have taken place. The most useful formulas are
Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle PAF = 1 - \frac{1}{\sum_{i=0}^k p_i (RR_i)}}
for use with several population subgroups (typically with different exposure levels). Not valid when confounding exists. Subscript i refers to the ith subgroup. pi = proportion of total population in ith subgroup.
Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle PAF = 1- \sum_{i=0}^k \frac{p_{ci}}{RR_i} = \sum_i p_{ci} \frac{p_{ei}(RR_i - 1)}{p_{ei}(RR_i - 1) + 1}}
which produces valid estimates when confounding exists but with a problem that parameters are often not known. pci is the proportion of cases falling in subgroup i (so that Σipci = 1), pei is the proportion of exposed people within subgroup i (and 1-pi is the fraction of unexposed)
Etiologic fraction
Fraction of cases among the exposed that would have occurred later (if at all) if the exposure would not have taken place. It cannot be calculated without understanding of the biological mechanism, but it is always between
Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \frac{RR-1}{RR^{RR/(RR-1)}}} and 1.

Rationale

Definitions of terms

There are several different kinds of proportions that sound alike but are not. Therefore, we explain the specific meaning of several terms.

Total population (N)
The number of people in the total population considered, including cases, non-cases, exposed and non-exposed.
Classifications
There are three classifications, and every person in the total population belongs to exactly one group in each classification.
  • Disease (D): classes case (C) and non-case (nc)
  • Exposure (E): classes exposed (1) and non-exposed (0)
  • Population subgroup (S): classes i = 1, 2, ..., k (typically based on different exposure levels)
Attributable fraction (AF)
The proportion of cases caused by exposure among all cases (in the subgroup)
Proportion exposed (pe, pei)
proportion of exposed among the total population or within subgroup i: pe = N(E=1)/N, pei = N(E=1,S=i)/N(S=i)
Proportion of population (pi)
proportion of population in subgroups i among the total population: N(S=i)/N
Proportion of cases (pci)
proportion of cases in subgroups i among the total cases: N(D=c,S=i)/N(D=c)

Etiologic fraction

Etiologic fraction is defined as the fraction of cases that is advanced in time because of exposure.[1]R↻ It can also be called probability of causation, which has importance in court. It can also be used to calculate premature cases, but that word is ambiguous and sometimes attributable fraction is used instead.R↻ Therefore, it is important to explicitly explain what is meant by the work premature.

The exact value of etiologic fraction cannot be estimated directly from risk ratio (RR) because some knowledge is needed about biological mechanisms (more precisely: timing of disease). In any case, the etiologic fraction always lies between f and 1, when f is

Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \frac{RR - 1}{RR^{RR/(RR-1)}}.}

The code below calculates the attributable fraction and lower and upper bounds of the etiological fraction for user-defined RRs.

Attributable fraction

Rockhill et al.[2] give an extensive description about different ways to calculate attributable fraction (AF) and population attributable fraction (PAF) and assumptions needed in each approach. Modern Epidemiology [3] is the authoritative source of epidemiology. They first define attributable fraction AF for a cohort of people (pages 295-297). It is the fraction of cases among the exposed that would not have occurred if the exposure would not have taken place.R↻

Different ways to calculate population attributable fraction AF and PAF.
# Formula Description
1 Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle AF = \frac{IP_1 - IP_0}{IP_1} = \frac{RR-1}{RR}} is empirical approximation of

Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \frac{P(D) - \sum_C P(D|C, \bar{E}) P(C)}{P(D)}}

where IP1 = cumulative proportion of total population developing disease over specified interval; IP0 = cumulative proportion of unexposed persons who develop disease over interval. Valid only when no confounding of exposure(s) of interest exists. If disease is rare over time interval, ratio of average incidence rates I0/I1 approximates ratio of cumulative incidence proportions, and thus formula can be written as (I1 - I0)/I1. Both formulations found in many widely used epidemiology textbooks.

2 Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \frac{p_e(RR-1)}{p_e(RR-1)+1}} Transformation of formula 1. Not valid when there is confounding of exposure-disease association. pe = proportion of total population exposed to the factor of interest. RR may be ratio of two cumulative incidence proportions (risk ratio), two (average) incidence rates (rate ratio), or an approximation of one of these ratios. Found in many widely used epidemiology texts, but often with no warning about invalidness when confounding exists.
3 Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \frac{\sum_{i=0}^k p_i (RR_i - 1)}{1 + \sum_{i=0}^k p_i (RR_i - 1)} = 1 - \frac{1}{\sum_{i=0}^k p_i (RR_i)}} Extension of formula 2 for use with multicategory exposures. Not valid when confounding exists. Subscript i refers to the ith exposure level. pi = proportion of total population in ith exposure level, RRj = relative risk comparing ith exposure level with unexposed group (i = 0). Derived by Walter[4]; given in Kleinbaum et al.[5] but not in other widely used epidemiology texts.
4 Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \sum_i p_{ci} \frac{p_{ei}(RR_i - 1)}{p_{ei}(RR_i - 1) + 1}} A useful formulation where
  • pci is the proportion of cases falling in subgroup i (so that Σipci = 1),
  • pei is the fraction of exposed people within subgroup i (and 1-pi is the fraction of unexposed),
  • RRi is the risk ratio for subgroup i due to the subgroup-specific exposure level (assuming that everyone in that subgroup is exposed to that level or none).
5 Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle p_c(\frac{RR-1}{RR})} Alternative expression of formula 3. Produces internally valid estimate when confounding exists and when, as a result, adjusted relative risks must be used.[6] pc = proportion of cases exposed to risk factor. In Kleinbaum et al.[5] and Schlesselman.[7]
6 Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \sum_{i=0}^k p_{ci} (\frac{RR_i - 1}{RR_i}) = 1- \sum_{i=0}^k \frac{p_{ci}}{RR_i}} Extension of formula 5 for use with multicategory exposures. Produces internally valid estimate when confounding exists and when, as a result, adjusted relative risks must be used. pci = proportion of cases falling into ith exposure level; RRi = relative risk comparing ith exposure level with unexposed group (i = 0). See Bruzzi et al. [8] and Miettinen[6] for discussion and derivations; in Kleinbaum et al.[5] and Schlesselman.[7]

Impact of confounders

The problem with the two PAF equations (see [[#Answer|]]) is that the former has easier-to-collect input, but it is not valid if there is confounding. It is still often mistakenly used. The latter equation would produce an unbiased estimate, but the data needed is harder to collect. Darrow and Steenland[9] have studied the impact of confounding on the bias in attributable fraction. This is their summary:

The impact of confounding on the bias in attributable fraction.
Bias in attributable fraction Confounding in RR Confounding in inputs
AF bias (-), calculated AF is smaller than true AF Conf RR (+), crude RR is larger than adjusted (true) RR Confounder is positively associated with exposure and disease (++)
Confounder is negatively associated with exposure and disease (--)
AF bias (+), calculated AF is larger than true AF Conf RR (-), crude RR is smaller than adjusted (true) RR Confounder is negatively associated with exposure and positively with disease (-+)
Confounder is positively associated with exposure and negatively with disease (+-)

Calculations

With this code, you can compare attributable fraction and lower and upper bounds of etiological fraction.

What is (are) the relative risk(s), i.e. RR?:

+ Show code

⇤--#: . UPDATE AF TO REFLECT THE CURRENT IMPLEMENTATION OF ERF Exposure-response function --Jouni (talk) 05:20, 13 June 2015 (UTC) (type: truth; paradigms: science: attack)

+ Show code

A previous version of code looked at RRs of all exposure agents and summed PAFs up.

Derivation of PAF

⇤--#: . Do we need this section? --Jouni (talk) 20:53, 7 April 2016 (UTC) (type: truth; paradigms: science: attack)

←--#: . I think that we do. It clearly shows how to add exposure to PAF calclualtions and how we are using it HIA. --Arja (talk) 07:31, 8 April 2016 (UTC) (type: truth; paradigms: science: defence)

The population attributable fraction PAF is that fraction among the whole cohort:

Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle PAF = \frac{N_1 (R_1 - R_0)}{N_1 R_1 + N_0 R_0} = \frac{N_1 (R_1 - R_0)/R_0}{N_1 R_1/R_0 + N_0 R_0/R_0} = \frac{N_1 (RR - 1)}{N_1 RR + N_0}}

Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle = \frac{ \frac{N_1 (RR - 1)}{N_1 + N_0} }{ \frac{N_1 RR + N_0}{N_1 + N_0}} = \frac{ p (RR - 1) }{ \frac{N_1 RR - N_1 + (N_1 + N_0)}{N_1 + N_0}} = \frac{p (RR - 1)}{p RR - p + 1} = \frac{p (RR - 1)}{p (RR - 1) + 1},}

where

  • N1 and N0 are the numbers of exposed and unexposed people, respectively,
  • R1 and R0 are the risks of disease in the exposed and unexposed group, respectively, and RR = R1 / R0,
  • p is the fraction of exposed people among the whole cohort.

Note that there is a typo in the Modern Epidemiology book: the denominator should be p(RR-1)+1, not p(RR-1)-1.

Population attributable fraction can be calculated as a weighted average based on subgroup data:

Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle PAF = \Sigma_i p_{ci} PAF_{i},}

where

  • pci is the proportion of cases falling in stratum (subgroup) i,
  • PAFi is the population attributable fraction calculated for the subgroup.

Specifically, we can divide the cohort into subgroups based on exposure (in the simplest case exposed and unexposed), so we get

Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle PAF = p_c \frac{1(RR - 1)}{1(RR - 1) + 1} + (1 - p_c) \frac{0(RR - 1)}{0(RR - 1) +1} = p_c \frac{RR - 1}{RR},}

where pc is the proportion of cases in the exposed group among all cases; this is the same as exposure prevalence among cases.

WHO approach

PAF is [10]

Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle PAF = \frac{\sum_{i=0}^k P_i RR_i - \Sigma_{i=0}^k P'_i RR_i}{\Sigma_{i=0}^k P_i RR_i}}

where i is a certain exposure level, P is the fraction of population in that exposure level, RR is the relative risk at that exposure level, and P' is the fraction of population in a counterfactual ideal situation (where the exposure is typically lower).

Based on this, we can limit our examination to a situation where there are only two population groups, one exposed to background level (with relative risk 1) and the other exposed to a higher level (with relative risk RR). In the counterfactual situation nobody is exposed. Thus, we get

Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle PAF = \frac{(P RR + (1-P)*1) - (0*RR + 1*1)}{P RR + (1-P)*1}}

Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle PAF = \frac{P RR - P}{P RR + 1 - P}}

Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle PAF = \frac{P(RR - 1)}{P(RR -1) + 1}}

This equation is used in e.g. Health impact assessment.

Constant background assumption

⇤--#: . Is this section necessary? --Jouni (talk) 20:53, 7 April 2016 (UTC) (type: truth; paradigms: science: attack)

pci can be calculated for each subgroup with the following equation if the background risk of disease is equal in all subgroups (and thus cancels out):

Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle p_{ci} = \frac{N_i \Pi_j RR_{i,j}}{\Sigma_i N_i \Pi_j RR_{i,j}},}

where

  • Ni is the number of people in each subgroup i,
  • RRi,j is the risk ratio in subgroup i due to pollutant j (accounting for the estimated exposure in the subgroup). Note that this assumes that multiplicative assumption holds between different pollutant effects.

This page does not contain R code. Instead, it is written as part of the model in Health impact assessment.

pc can be calculated by first calculating number of cases in each subgroup:

Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle cases_i = N_i * background * \Pi_j e^{ln(ERF_{j}) exposure_{i,j}},}

where

  • casesi is the number of cases in subgroup i,
  • Ni is the number of people in subgroup i,
  • background is the background risk of the disease in the unexposed; we assume that it is the same in all subgroups,
  • ERFj is the risk ratio for unit exposure for each pollutant j (if the exposure response function ERF assumes another form than relative risk, i.e. exponential, then another equations must be used),
  • exposurei,j is the amount of exposure in a subgroup i to pollutant j.

Therefore,

Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle p_{ci} = \frac{cases_i}{\Sigma_i cases_i} = \frac{N_i * background * \Pi e^{ln(ERF_{j}) exposure_{i,j}}}{background \Sigma N_i \Pi e^{ln(ERF_{j}) exposure_{i,j}}}}

Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle p_{ci} = \frac{N_i \Pi_j RR_{i,j}}{\Sigma_i N_i \Pi_j RR_{i,j}},}

where RRi,j = exp(ln(ERFj) exposurei,j).

In addition, if only fraction p of the population is exposed, for the total population we get

Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle RR = \frac{p * N * background * RR_{exposed} + (1-p) * N * background * RR_{unexposed}}{N * background * RR_{unexposed}}}

Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle = \frac{p e^{ln(ERF)exposure} + (1-p)1}{1} = p e^{ln(ERF)exposure} -p + 1}

See also

References

  1. Robins JM, Greenland S. Estimability and estimation of excess and etiologic fractions. Statistics in Medicine 1989 (8) 845-859.
  2. Rockhill B, Newman B, Weinberg C. use and misuse of population attributable fractions. American Journal of Public Health 1998: 88 (1) 15-19.[1]
  3. Kenneth J. Rothman, Sander Greenland, Timothy L. Lash: Modern Epidemiology. Lippincott Williams & Wilkins, 2008. 758 pages.
  4. Walter SD. The estimation and interpretation of attributable fraction in health research. Biometrics. 1976;32:829-849.
  5. 5.0 5.1 5.2 Kleinbaum DG, Kupper LL, Morgenstem H. Epidemiologic Research. Belmont, Calif: Lifetime Learning Publications; 1982:163.
  6. 6.0 6.1 Miettinen 0. Proportion of disease caused or prevented by a given exposure, trait, or intervention. Am JEpidemiol. 1974;99:325-332.
  7. 7.0 7.1 Schlesselman JJ. Case-Control Studies: Design, Conduct, Analysis. New York, NY: Oxford University Press Inc; 1982.
  8. Bruzzi P, Green SB, Byar DP, Brinton LA, Schairer C. Estimating the population attributable risk for multiple risk factors using case-control data. Am J Epidemiol. 1985; 122: 904-914.
  9. Darrow LA, Steenland NK. Confounding and bias in the attributable fraction. Epidemiology 2011: 22 (1): 53-58. [2] doi:10.1097/EDE.0b013e3181fce49b
  10. WHO: Health statistics and health information systems. [3]. Accessed 16 Nov 2013.