### Attributable risk measures

A general definition of the attributable fraction AF_{
x
} and number AN_{
x
} for a given exposure *x* can be provided by:

\begin{array}{ll}{\text{AF}}_{x}& =1-exp\left(-{\beta}_{x}\right)\phantom{\rule{2.77626pt}{0ex}},\phantom{\rule{2em}{0ex}}\end{array}

(1a)

\begin{array}{ll}{\text{AN}}_{x}& =n\xb7{\text{AF}}_{x}\phantom{\rule{2.77626pt}{0ex}},\phantom{\rule{2em}{0ex}}\end{array}

(1b)

with *n* as the total number of cases. The parameter *β*
_{
x
} used in Eq. (1a) represents the risk associated with the exposure, and it usually corresponds to the logarithm of a ratio measure such as relative risk, relative rate or odds ratio. It is generally obtained from regression models while adjusting for potential confounders. The general definition of *β*
_{
x
} used here refers to the association with a specific exposure intensity *x* compared to a reference value *x*
_{0}. For linear exposure-response relationships, the association can also be reported as *β*·*x*, where in this case *β* refer to a unit increase in *x*. For binary variables reporting presence/absence of the exposure, Eq. (1a) simplifies to AF=(RR−1)/RR, with RR as relative risk, as reported by Steenland and Armstrong [2]. We keep the more general definition of *β*
_{
x
}, which is easily applicable to non-linear exposure-response relationships, throughout the manuscript.

The theoretical nature of these effect measures is based on a *counterfactual*, where the observed condition is compared with a reference state which never occurred. This state postulates that the same population is followed in an identical situation where only the exposure level changes to the reference value *x*
_{0}. Typically, such a reference is represented by the absence of association, meaning *x*
_{0}=0 and {\beta}_{{x}_{0}}=0. However, different counterfactual conditions can be used, for example a lower exposure which can be determined by an intervention. In this case the quantity *β*
_{
x
} can be simply re-parameterized as {\beta}_{x}^{\ast}={\beta}_{x}-{\beta}_{{x}_{0}}, and Eq. (1) still applies.

Eq. (1a) can be extended to define the risk attributable to multiple exposures *x*
_{1},…,*x*
_{
p
}:

{\text{AF}}_{{x}_{1},\dots ,{x}_{p}}=1-exp\left(-\sum _{i=1}^{p}{\beta}_{{x}_{i}}\right)=1-\prod _{i=1}^{p}\left(1-{\text{AF}}_{{x}_{i}}\right)\phantom{\rule{2.77626pt}{0ex}},

(2)

with {\text{AN}}_{{x}_{1},\dots ,{x}_{p}} obtained by substituting Eq. (2) in Eq. (1b) [2]. For the specific form of Eq. (2), it should be noted that {\text{AF}}_{{x}_{1},\dots ,{x}_{p}}\le {\text{AF}}_{x1}+\dots +{\text{AF}}_{\mathit{\text{xp}}}, *i.e.* the sum of the attributable risk measured for individual exposures is usually higher than their concurrent attributable risk.

### A review of the DLNM modelling framework

The basic idea underpinning the development of DLNMs is that the risk at time *t* can be described as the weighted sum of effects cumulated from a series of exposures {x}_{t-{\ell}_{0}},\dots ,{x}_{t-L} experienced in the past over the lag period *ℓ*=*ℓ*
_{0},…,*L*, with *ℓ*
_{0} and *L* corresponding to minimum and maximum lags, respectively. The risk can be described by the function *f*(*x*), determining the exposure-response, and the function *w*(*ℓ*), specifying the lag-response, related to the weights given to exposures at different lags *ℓ*. These functions are combined in a bi-dimensional *exposure-lag-response function* *f* · *w*(*x*,*ℓ*). Algebraically, the risk is defined by a function *s*(*x*,*t*;*η*), written in terms of parameters *η* as:

\begin{array}{ll}s(x,t;\mathit{\eta})& =\underset{{\ell}_{0}}{\overset{L}{\int}}f\phantom{\rule{0.3em}{0ex}}\xb7\phantom{\rule{0.3em}{0ex}}w({x}_{t-\ell},\ell )\phantom{\rule{2.77626pt}{0ex}}\mathrm{d\ell}\phantom{\rule{2em}{0ex}}\\ \approx \phantom{\rule{2.77626pt}{0ex}}\sum _{\ell ={\ell}_{0}}^{L}f\phantom{\rule{0.3em}{0ex}}\xb7\phantom{\rule{0.3em}{0ex}}w({x}_{t-\ell},\ell )={\mathbf{w}}_{x,t}^{\mathsf{T}}\mathit{\eta}\phantom{\rule{2.77626pt}{0ex}}\text{.}\phantom{\rule{2em}{0ex}}\end{array}

(3)

The function *s*(*x*,*t*) is computed as the approximate integral of the exposure-lag-response function over the lag dimension, representing the cumulated risk over the lag period. The parameterization in the final step of Eq. (3) is obtained through a *cross-basis*, involving a tensor product between the basis chosen for *f*(*x*) and *w*(*ℓ*), generating the transformed variables **w**
_{
x,t
} linearly combined with the parameters *η*. Simpler DLMs are defined by Eq. (3) by assuming *f*(*x*) as linear. Algebraic details and additional information are provided elsewhere [11]. The cross-basis is specified with a reference value *x*
_{0} used later as a centering point for the function *f*(*x*), which is used to define the counterfactual condition.

The complex parameterization of exposure-lag-response associations provided by Eq. (3) can be more easily interpreted by computing effect summaries from the original parameters *η*. Specifically, the bi-dimensional exposure-lag-response risk surface modelled through *f* · *w*(*x*,*ℓ*) can be expressed by a grid of effect summaries *β*
_{
x,ℓ
}, each interpreted as the association with an exposure *x* at lag *ℓ* versus the reference value *x*
_{0}. For a given time *t*, the cross-basis parameterization in (3) can be re-expressed as:

{\mathbf{w}}_{x,t}^{\mathsf{T}}\mathit{\eta}=\sum _{\ell ={\ell}_{0}}^{L}{\beta}_{{x}_{t-\ell},\ell}\phantom{\rule{2.77626pt}{0ex}}\text{.}

(4)

This *overall cumulative* association is composed of the sum of contributions *β*
_{
x,ℓ
} from exposures {x}_{t-{\ell}_{0}},\dots ,{x}_{t-L} experienced within the lag period. Algebraic definitions have been previously provided [11].

### Forward and backward perspectives

The term *β*
_{
x,ℓ
} for each intensity *x* can be interpreted using two complementary perspectives, illustrated graphically in Figure 1. From a *forward* standpoint, looking from current exposure to future risks, the terms *β*
_{
x,ℓ
} are the contributions from the exposure *x*
_{
t
} occurring at time *t* to the risk at times *t*+*ℓ*
_{0},…,*t*+*L*, identified by green circles. From a *backward* standpoint, looking from current risk to past exposures, the terms *β*
_{
x,ℓ
} are the contributions to the risk at time *t* from exposures {x}_{t-{\ell}_{0}},\dots ,{x}_{t-L} experienced at *t*−*ℓ*
_{0},…,*t*−*L*, identified by yellow squares. The underlying curve in Figure 1 depicting such associations is called the *lag-response curve* related to a given exposure intensity *x*. The sum of these contributions over the whole lag period can be interpreted as the overall cumulative risk.

### Attributable risk from DLNMs

The effect summaries provided above can be used for defining attributable risk measures within the DLNM framework. The idea is to treat the associations with exposures at different lags as independent contributions to the risk. A neat definition can be developed using a backward perspective, assuming the risk at time *t* as attributable to a series of exposure events in the past. The backward attributable fraction b-AF_{
x,t
} and number b-AN_{
x,t
} at time *t* are obtained by substituting Eq. (4) in Eq. (2):

\begin{array}{ll}{\mathrm{b}-\mathit{\text{AF}}}_{x,t}& =1-exp\left(-\sum _{\ell ={\ell}_{0}}^{L}{\beta}_{{x}_{t-\ell},\ell}\right)\phantom{\rule{2.77626pt}{0ex}},\phantom{\rule{2em}{0ex}}\end{array}

(5a)

\begin{array}{ll}{\mathrm{b}-\mathit{\text{AN}}}_{x,t}& ={\mathrm{b}-\mathit{\text{AF}}}_{x,t}\xb7{n}_{t}\phantom{\rule{2.77626pt}{0ex}},\phantom{\rule{2em}{0ex}}\end{array}

(5b)

with *n*
_{
t
} as the number of cases at time *t*. This structure is consistent with the configuration of the regression model usually applied to fit the data, where the risk at time *t* is associated with lagged exposures at times *t*−*ℓ*. The definition of backward attributable risk requires an extended version of the counterfactual condition accounting for the additional lag dimension: b-AN_{
x,t
} and b-AF_{
x,t
} are interpreted as the number of cases and the related fraction at time *t* attributable to past exposures to *x* in the period *t*−*ℓ*
_{0},…,*t*−*L*, compared to a constant exposure *x*
_{0} throughout the same period.

An alternative version can be obtained using a forward perspective. Among other possible definitions, forward attributable number f-AN_{
x,t
} and fraction f-AF_{
x,t
} can be defined as:

\begin{array}{ll}{\mathrm{f}-\mathit{\text{AF}}}_{x,t}& =1-exp\left(-\sum _{\ell ={\ell}_{0}}^{L}{\beta}_{{x}_{t},\ell}\right)\phantom{\rule{2.77626pt}{0ex}},\phantom{\rule{2em}{0ex}}\end{array}

(6a)

\begin{array}{ll}{\mathrm{f}-\mathit{\text{AN}}}_{x,t}& ={\mathrm{f}-\mathit{\text{AF}}}_{x,t}\xb7\sum _{\ell ={\ell}_{0}}^{L}\frac{{n}_{t+\ell}}{L-{\ell}_{0}+1}\phantom{\rule{2.77626pt}{0ex}}\text{.}\phantom{\rule{2em}{0ex}}\end{array}

(6b)

This alternative version has some advantages if compared to the backward definition. First, the counterfactual condition is simpler: f-AF_{
x,t
} and f-AN_{
x,t
} are interpreted as the fraction and number of future cases in the period *t*+*ℓ*
_{0},…,*t*+*L* attributable to the single exposure *x* occurring at time *t*, compared to *x*
_{0}. Moreover, the overall cumulative risk \sum {\beta}_{{x}_{t},\ell} for a given exposure *x*
_{
t
} in (6a) is available also when the bi-dimensional exposure-lag-response is reduced to uni-dimensional exposure-response relationship, a step often needed in multi-site studies [14]. In contrast, all the lag-specific contributions are needed to compute \sum {\beta}_{{x}_{t-\ell},\ell} in (5a) for the backward counterpart.

However, the forward version also has an important limitation, related to the fact that the contributions are associated to risks measured at different times. The attributable number f-AN_{
x,t
} in (6b) is computed by averaging the total counts experienced in the next *ℓ*
_{0},…,*L* times, thus only approximating the lag structure of risks. This approximation is likely to produce some bias, which is expected as an underestimation of the attributable number if compared to the backward version.

### Separating attributable components

The definitions provided in Eq. (5)–(6) can be extended to separate the attributable components related to specific exposures or exposure ranges. This will be used later in the example to single out the contributions from cold and heat in temperature-health associations. Let’s define a range *r*=[*l*,*h*] between low and high exposure limits *l* and *h*. The definition of forward attributable number {\mathrm{f}-\mathit{\text{AN}}}_{x,t}^{r} and fraction {\mathrm{f}-\mathit{\text{AF}}}_{x,t}^{r} limited to exposures within the range *r* is clear-cut, as they are either equal to the quantities reported in Eq. (6) if *x*∈*r* or zero otherwise. Adopting a backward perspective, a similar definition of {\mathrm{b}-\mathit{\text{AF}}}_{x,t}^{r} can be obtained by modifying Eq. (5a) as:

{\mathrm{b}-\mathit{\text{AF}}}_{x,t}^{r}=1-exp\left(-\sum _{\ell ={\ell}_{0}}^{L}I\left({x}_{t-\ell}\in r\right){\beta}_{{x}_{t-\ell},\ell}\right)\phantom{\rule{2.77626pt}{0ex}},

(7)

simply selecting the risk contributions from past exposures included in the range *r*. The related attributable number {\mathrm{b}-\mathit{\text{AN}}}_{x,t}^{r} is computed by substituting Eq. (7) into Eq. (5b). Attributable components referring to different ranges can be summed up, as all are defined using the same counterfactual condition of a constant exposure *x*
_{
ℓ
}=*x*
_{0} for the whole lag period *ℓ*=*ℓ*
_{0},…,*L*.

The forward version has the additional advantage that for two non-overlapping ranges *r*
_{1} and *r*
_{2} the sum of the components is equal to the overall attributable risk, namely {\mathrm{f}-\mathit{\text{AF}}}_{x,t}^{{r}_{1}+{r}_{2}}={\mathrm{f}-\mathit{\text{AF}}}_{x,t}^{{r}_{1}}+{\mathrm{f}-\mathit{\text{AF}}}_{x,t}^{{r}_{2}}. In contrast, adopting a backward perspective {\mathrm{b}-\mathit{\text{AF}}}_{x,t}^{{r}_{1}+{r}_{2}}\le {\mathrm{b}-\mathit{\text{AF}}}_{x,t}^{{r}_{1}}+{\mathrm{b}-\mathit{\text{AF}}}_{x,t}^{{r}_{2}}, as the risks are simultaneously computed for the same time *t* in the like of Eq. (2).

### Total attributable risk

The attributable risk measures provided above can be computed for each of the *i*=1,…,*m* observations in a data set. An estimate of the total attributable number AN_{
t
o
t
} and fraction AF_{
t
o
t
} is provided by:

\begin{array}{ll}{\text{AN}}_{\mathit{\text{tot}}}& =\sum _{i=1}^{m}{\text{AN}}_{x,{t}_{i}}\phantom{\rule{2.77626pt}{0ex}},\phantom{\rule{2em}{0ex}}\end{array}

(8a)

\begin{array}{ll}{\text{AF}}_{\mathit{\text{tot}}}& ={\text{AN}}_{\mathit{\text{tot}}}/\sum _{i=1}^{m}{n}_{{t}_{i}}\phantom{\rule{2.77626pt}{0ex}}\text{.}\phantom{\rule{2em}{0ex}}\end{array}

(8b)

The equations above can be applied either to forward or backward attributable risk and to separate components, simply substituting the related attributable numbers in Eq. (8a).

### Computing uncertainty intervals

Analytical formulae for confidence intervals of attributable risk measures are not easily produced [15], and this also applies to the extended versions developed here. Although approximated estimators have been proposed [15, 16], in this context the most straightforward approach is to rely on interval estimation obtained empirically through Monte Carlo simulations [17, 18]. Basically, we take random samples *η*
^{(j)} of the original parameters *η* of the cross-basis in Eq. (3) from the assumed multivariate normal distribution with point estimate \widehat{\mathit{\eta}} and (co)variance matrix V\left(\widehat{\mathit{\eta}}\right) derived from the regression model. These samples *η*
^{(j)} are used to compute {\beta}_{x,\ell}^{\left(j\right)} for *ℓ*=*ℓ*
_{0},…,*L* and each intensity *x*, empirically reconstructing the distributions of the attributable measures defined in Eq. (5)–(8). The related 2.5^{th} and 97.5^{th} percentiles of such distributions are interpreted as 95% empirical confidence intervals (eCI).