Chapter 14 I Prime Charts for Measurement Data With Variable Subgroup Sizes (and more)
The I chart is often regarded as the Swiss Army knife of SPC. It is useful in many situations and can often serve as a valid, or even superior, alternative to other Shewhart charts. One reason for this is that the I chart is based on the empirical variation in the data rather than on theoretical distributional assumptions, which may or may not hold.
However, the I chart does not account for variable subgroup sizes. In other words, it does not adjust when the area of opportunity varies between samples, for example when the number of patients fluctuates from month to month. This results in straight control limits, which in some situations may generate false signals or fail to detect true ones. When subgroup sizes vary only slightly, this may not matter. But often – especially in healthcare – size matters.
Several solutions to this problem have been proposed. Here we present the normalised I chart, or, as we prefer to call it, the I prime (I’) chart, suggested by Taylor (2018).
In summary, the I’ chart accounts for variable subgroup sizes by adjusting the within-subgroup standard deviation using a factor that depends on the size of each subgroup. This produces wavy control limits when subgroup sizes vary. The I’ chart is useful for both measurement and count data, with or without denominators. When subgroup sizes are constant, the I’ chart is identical to the original I chart. For rates and proportions, the I’ chart produces control limits that match those of the U’ and P’ charts.
Figure 14.1 shows an I’ and a P’ chart side-by-side illustrating how similar their results are.
qic(month, deaths, admissions,
data = admis,
chart = 'ip',
y.percent = T,
title = "I' chart of hospital mortality",
xlab = 'Month')
qic(month, deaths, admissions,
data = admis,
chart = 'pp',
title = "P' chart of hospital mortality",
xlab = 'Month')Figure 14.1: Comparing I’ and P’ charts
14.0.1 Procedure for calculating centre line and control limits
We use the following symbols:
- \(n\) = numerators
- \(d\) = denominators
- \(o\) = number of data values (subgroups)
- \(i\) = ith data value
The values to be plotted are
\[ y = \frac{n}{d} \]
The centre line is: \[ CL = \frac{\sum{n}}{\sum{d}} \]
The standard deviation of ith data point is
\[ s_i = \sqrt{\frac{\pi}{2}}\frac{\vert{}y_i-y_{i-1}\vert{}}{\sqrt{\frac{1}{d_i}+\frac{1}{d_{i-1}}}} \]
The average standard deviation is
\[ \bar{s} = \frac{\sum{s}}{o} \]
The control limits are then
\[ \text{control limits} = CL \pm 3 \frac{\bar{s}}{\sqrt{d_i}} \]
When subgroup sizes are all equal to 1, these limits reduce to
\(CL \pm 2.66\overline{MR}\)
which is the same as for original I chart.
As with the original I chart, qicharts2 screens the moving ranges of \(s_i\), removing ranges greater than the theoretical upper natural limit (= 3.2665) before calculating \(\bar{s}\).
14.1 I’ charts for measument data with variable subgroup sizes
Figure 14.1 demonstrates the use of an I’ chart with count data. However, the I’ chart was originally intended for measurement data with variable subgroup sizes. One example is when, for reasons of privacy, only aggregated patient data are available rather than individual measurements. Traditionally, such data would be plotted on an ordinary I chart. But if the number of patients in each subgroup varies substantially, straight control limits may be inappropriate.
Figure 14.2 shows an I chart of the monthly HbA1c averages from the Diabetes HbA1c dataset. In April 2020, one data point lies above the upper control limit, suggesting a special cause. However, the ordinary I chart does not take subgroup size into account.
qic(month, avg_hba1c,
data = diabetes,
chart = 'i',
title = NULL,
ylab = 'mmol / mol',
xlab = 'Month')Figure 14.2: I chart of average HbA1c without denominator
Figure 14.3 shows the corresponding I’ chart, which incorporates subgroup size, that is, the number of patients, and adjusts the control limits accordingly.
qic(month, avg_hba1c * n, n,
data = diabetes,
chart = 'ip',
title = NULL,
ylab = 'mmol / mol',
xlab = 'Month')Figure 14.3: I prime chart of average HbA1c with denominator
April 2020 was the first month of lockdown during COVID-19 in Denmark, and the number of patients seen that month was markedly lower than usual. A smaller denominator allows for greater common cause variation in the measurements and therefore leads to wider control limits. When subgroup size is taken into account, the apparent special cause in Figure 14.2 turns out to fall within the limits of expected variation.
To plot averages correctly, we must multiply the subgroup averages (avg_hba1c) by the subgroup sizes (n) in order to recover the sums of individual measurements. Otherwise, the chart would be based on averages of averages.
Notice also that the centre lines differ slightly (60.6 versus 60.3), because the I’ chart uses a weighted mean rather than an unweighted mean.
14.2 One chart to rule them all?
The I’ chart reproduces the original I chart for individual measurements and matches the P’ and U’ charts for proportion and count data.
If we accept Laney’s argument that prime charts are valid, and perhaps even preferable, substitutes for their non-prime counterparts, it is tempting to view the I’ chart as a universal solution to most, if not all, charting needs.
The I’ chart is a relatively recent development, but its versatility and its ability to mimic the behaviour of more traditional SPC charts make it a compelling alternative. It has the potential to simplify chart selection by providing a single, robust method that can be used across a wide range of data types and situations. As empirical support for the method grows, the I’ chart may well become a preferred tool in modern SPC practice.