Supplementary material A — Mathematical Proofs

Authors
Affiliations

Dylan Whitaker

Institute of Health Informatics, University College London, London, United Kingdom

Department of Critical Care, University College London Hospitals NHS Foundation Trust, London, United Kingdom

Matthew Wilson

Department of Anaesthesia and Perioperative Medicine, University College London Hospitals NHS Foundation Trust, London, United Kingdom

Division of Surgery and Interventional Science, University College London, London, United Kingdom

Steve Harris

Institute of Health Informatics, University College London, London, United Kingdom

Department of Critical Care, University College London Hospitals NHS Foundation Trust, London, United Kingdom

A.1 Introduction

As a research metric, measuring differences in group means intends to measure the difference in total scale of the groups, known as the associational effect (or treatment effect in causal work), to assess if an intervention applied to one group is associated (or causes) a reduction in the total amount of opioids.

We will demonstrate that the measured difference in means is equal to true difference in means when the following conditions are met:

  1. There is no error in the conversion value used: \(\epsilon_i = 0 \;\; \forall i\)

  2. The drug mean dose between groups are equal: \(\Delta \bar d_i = 0 \;\; \forall i\)

A.2 Definitions

The Total Opioid Burden \(\text{TOB}\) for a given patient over a given timeframe is the sum of the doses \(d\) of medications \(i\) multiplied by the conversion value \(c\) for the given medication via the route \(r\)1.

\[ \text{TOB}_j = \sum_{i\in\mathbf{M}} d_{i,j} c_{i,r} \tag{A.1}\]

The conversion value \(c_i\) is the unknown ground truth conversion value \(c_i^0\) with the error term \(\epsilon_i\) of the given medication in the published value. It is noted that there is no error term in the doses given \(d\) term.

\[ c_i = c_i^0 + \epsilon_i \tag{A.2}\]

The group mean TOB can be rearranged from Equation 1.1 as a sum of weighted means where \(\mu_{\text{TOB}, G}\) is equal to the sum \(\bar{d}_{i,G}\) multiplied by the conversion value \(c_i\).

\[ \mu_{\text{TOB}, G} = \frac{1}{n_G} \sum_{j \in G} \sum_{i \in \mathbf{M}} d_{i,j} c_i \tag{A.3}\]

The mean dose of a given medication within a given group \(\bar{d}_{i,G}\) is defined as the arithmetic mean of the doses \(d\) of the medication for the patients within the group.

\[ \bar{d}_{i,G} = \frac{1}{n_G} \sum_{j \in G} d_{i,j} \tag{A.4}\]

The group’s total opioid exposure \(D_G\) (also known as the group total opioid requirement) is the sum of the mean dose \(\bar{d}_i\). This is the pooled drug-milligram, not the group total \(\text{TOB}\) calculated in Equation A.3. \[ D_G = \sum_{i \in M} \bar{d}_{i,G} \tag{A.5}\]

The proportion \(p_{i,G}\) of medication \(i\) within a group \(G\) is defined as the mean dose of the medication divided by the group total exposure \(D_G\). The sum of the proportions within a group is equal to 1.

\[ p_{i,G} = \frac{\bar{d}_{i,G}}{D_G} \tag{A.6}\] \[ \sum_i p_{i,G} = 1 \tag{A.7}\]

Let \(\bar{D}\) be the average opioid exposure where \(\bar{D} = \frac{1}{2}(D_{T^1} + D_{T^0})\).
Let \(\Delta D\) be the difference in group exposure where \(\Delta D = D_{T^1} - D_{T^0}\).
Let \(\bar p_i\) be the average proportion where \(\bar p_i = \frac{1}{2}(p_{i,T^1} + p_{i,T^0})\).
Let \(\Delta p_i\) be the difference in proportion where \(\Delta p_i = p_{i,T^1} - p_{i,T^0}\).

A.3 Rearrangement of Equation A.3

The mean dose of the medication \(\bar{d}_{i,G}\) can be rearranged as the groups total opioid exposure \(D_G\) scaled by the proportion \(p_{i,G}\)

\[ \bar{d}_{i,G} = p_{i,G} D_G \tag{A.8}\]

Substituting Equation A.8 into Equation A.3 provides the group mean dose expressed as the groups total opioid exposure \(D_G\) multiplied the the proportion weighted sum of the conversion values.

\[ \mu_{\text{TOB}, G} = D_G \sum_{i} p_{i,G} c_i \tag{A.9}\]

Equation A.9 demonstrates that the group mean TOB can vary due to either the total scale of the group (\(D_G\)) and/or the mixture of opioids within the group.

A.4 Proof of bias

Let \(G \in \{T^0, T^1\}\) index the control and intervention groups of size \(n_{T=0}\) and \(n_{T=1}\).
Let \(M = \{ \text{morphine}, \text{oxycodone}, ... \}\) index the opioid types.

The difference in group means \(\Delta \mu\) is

\[ \begin{aligned} \Delta \mu &= \mu_{\text{TOB}, T^1} - \mu_{\text{TOB}, T^0} \\ &= D_{T^1} \sum p_{i,T^1} c_i - D_{T^0} \sum p_{i,T^0} c_i \end{aligned} \tag{A.10}\]

The conversion value can then be substituted with Equation A.2 and split into the true effect \(\Delta \mu^0\) and the bias \(\mathcal{B}\). Throughout, \(\Delta\) and bar notation follow the \(T^1 - T^0\) (intervention minus control) convention.

\[ \Delta \mu = \underbrace{\left( D_{T^1} \sum_i p_{i,T^1} c_i^0 - D_{T^0} \sum_i p_{i,T^0} c_i^0 \right) }_{\Delta \mu^0\text{, true difference}} + \underbrace{\left( D_{T^1} \sum_i p_{i,T^1} \epsilon_i - D_{T^0} \sum_i p_{i,T^0} \epsilon_i \right) }_{\mathcal{B} \text{, bias}} \tag{A.11}\]

Substituting Equation A.8 into the bias term of Equation A.11 gives an equivalent drug-wise form of the bias, where \(\Delta \bar d_i = \bar d_{i,T^1} - \bar d_{i,T^0}\).

\[ \mathcal{B} = \sum_i \epsilon_i \Delta \bar d_i \tag{A.12}\]

Equation A.12 can also be written as Equation A.13.

\[ \mathcal{B} = \bar{D} \sum_i \epsilon_i \Delta p_i + \Delta D \sum_i \epsilon_i \bar p_i \tag{A.13}\]

A.5 Conclusion

The measured difference \(\Delta \mu\) equals the true difference \(\Delta \mu^0\) if and only if

\[ \mathcal{B} = 0 \iff \bar{D} \sum_i \epsilon_i \Delta p_i = - \Delta D \sum_i \epsilon_i \bar p_i \iff \sum_i \epsilon_i \Delta \bar d_i = 0 \tag{A.14}\]

Conditions where this is satisfied:

  1. No conversion error: Every conversion value is correct, so the bias is zero whatever the group composition. \[\epsilon_i = 0 \;\; \forall i \implies \mathcal{B} = 0\]

  2. Mean dose does not differ between groups: Each medication has the same mean dose in both groups. \[ \Delta \bar d_i = 0 \;\; \forall i \implies \mathcal{B} = 0\]

It is noted that there are a range of other possible special and general conditions where Equation A.14 can be satisfied and hence there will be no bias.


  1. For clarity we have defined the conversion value for a given medication and route. The route will often be folded into the medication index where conversion values differ between groups as demonstrated in the proof.↩︎