Mastering SPC charts
What is Statistical Process Control?
Preface
What Sets This Book Apart?
Prerequisites
How to Use This Book
About the Authors
Synopsis
Introduction
Part 1: Understanding Variation
Part 2: Constructing SPC Charts with R
Part 3: Advanced SPC Techniques
Part 4: Best Practices, Controversies, and Tips
Part 5: Conclusion and Final Thoughts
Appendices
Part 1: Understanding Variation
1
Understanding Variation
2
Understanding SPC Charts
2.1
Anatomy and physiology of SPC charts
2.2
Why 3-sigma limits?
2.3
Some common types of control charts: The Magnificent Seven
2.3.1
Counts
2.3.2
Measurements
2.4
Summary of common SPC charts
3
Looking for Signals on SPC charts – Beyond the 3-Sigma Rule
3.1
Patterns of non-random variation in time series data
3.1.1
Freaks
3.1.2
Shifts
3.1.3
Trends
3.1.4
Other unusual patterns
3.2
SPC rules
3.2.1
Tests based on sigma limits
3.2.2
Runs analysis – tests based on the distribution of data points around the centre line
3.3
SPC charts without borders – using run charts
3.4
A practical approach to SPC analysis
3.5
SPC rules in summary
4
Using SPC in Healthcare
4.1
Using SPC to monitor a process
4.2
Using SPC to improve a process
4.3
Successful use of SPC in healthcare
Part 2: Constructing SPC Charts
5
Your First SPC Charts With Base R
5.1
A run chart of blood pressure data
5.2
Adding control limits to produce a control chart
5.3
That’s all, Folks!
6
Calculating Control Limits
6.1
Introducing the spc() function
6.2
Formulas for calculation of control limits
6.3
Count data
6.3.1
C chart
6.3.2
U chart
6.3.3
P chart
6.4
Measurement data
6.4.1
I chart (aka X chart)
6.4.2
MR chart
6.4.3
X-bar chart
6.4.4
S chart
6.5
Control limits in short
Control chart constants
7
Highlighting Freaks, Shifts, and Trends
7.1
Introducing the cdiff data set
7.2
Improved
spc()
function
7.3
Highlighting special cause variation in short
R function for runs analysis
8
Core R Functions to Construct SPC Charts
8.1
Examples
8.1.1
Run chart
8.1.2
I and MR charts for individual measurements
8.1.3
X-bar and S charts for averages and standard deviations of measurements
8.1.4
C and U charts for counts and rates
8.1.5
P chart for percentages
8.2
TODO
8.3
Further up, further in
R function library
9
SPC Charts with ggplot2
9.1
Creating an SPC object for later plotting
9.2
Making a new plot function based on ggplot2
9.3
Customising the plotting theme
9.4
Preparing for qicharts2
10
Introducing qicharts2
10.1
A simple run chart
10.2
A simple control chart
10.3
Excluding data points from analysis
10.4
Freezing baseline period
10.5
Splitting chart by period
10.6
Small multiple plots for multivariate data
10.6.1
To aggregate or not to aggregate
10.7
qicharts2 in short
Part 3: Advanced SPC Techniques
11
Screened I Chart – eliminating freak moving ranges before calculating limits
12
SPC Charts for Rare Events
12.1
Introducing the birth dataset
12.2
G chart for opportunities between cases
12.3
T chart for time between events
12.4
The Bernoulli CUSUM chart for binary data
12.5
Selecting the rigth chart for rare events
13
Prime Charts for Count Data with Very Large Subgroups
13.1
Laney’s prime chart
13.2
When to use prime charts
Example data for P prime charts
14
I Prime Charts for Measurement Data With Variable Subgroup Sizes (and more)
14.0.1
Procedure for calculating centre line and control limits
14.1
I’ charts for measument data with variable subgroup sizes
14.2
One chart to rule them all?
15
Funnel Plots for Categorical Subgroups
16
Pareto Charts for Ranking Problems
Part 4: Best Practices, Controversies, and Tips
17
Tips for Effective SPC Implementation
17.1
Engaging stakeholders
17.2
Automating production of SPC charts
17.2.1
Data collection and storage
17.2.2
Charts, reports, and dashboards
17.3
Continuous evaluation and improvement
18
Common Pitfalls to Avoid
18.1
Data issues
18.2
Signal fatigue from over-sensitive SPC rules
18.3
Confusing the voice of the customer with the voice of the process
18.4
Automatic rephasing
18.5
The control chart vs run chart debate
18.6
Assuming a one-to-one link between PDSA cycles and data points
19
The Forgotten Art of Rational Subgrouping
19.1
Too large subgroups — masking meaningful signals
19.2
Too small subgroups — revealing unimportant noise
19.3
Striking the balance
19.4
A practical approach for rational subgrouping
19.5
Rational subgrouping in summary
Part 5: Conclusion and Final Thoughts
20
Conclusion and Final Thoughts
20.1
Summary of Key Points
20.2
Emerging trends in SPC and healthcare analytics
20.3
Encouragement for Continuous Learning and Application
20.4
Final Thoughts
Appendices
A
Data Sets
Adverse Events
Bacteremia
Blood pressure
Clostridioides difficile infections
Ceasearian section delay
Diabetes HbA1c
Emergency admission mortality
On-time CT
Radiation doses
Robson group 1 births
B
Basic Statistical Concepts
B.1
Data types
B.1.1
Categorical data
B.1.2
Numerical data
B.2
Summarising categorical data
B.3
Summarising numerical data
B.3.1
Centre
B.3.2
Shape
B.3.3
Spread
B.4
Theoretical distributions
B.4.1
Poisson distribution – predicting the number of events
B.4.2
Binomial distribution – predicting the number of cases of “success” or “failure”
B.4.3
Gaussian distribution – predicting the probability of continuous outcomes
B.5
Basic statistical concepts in summary
C
Two Types of Errors When Using SPC
C.1
Quantifying the diagnostic error of SPC charts
C.1.1
Average run length
C.1.2
Likelihood ratios
C.2
Conclusion: Keeping the balance
D
R Notes
D.1
Data structures and classes
D.2
Plot-ready data frames
D.3
Importing data from text files
D.4
Manipulating data frames
D.4.1
Adding variables to data frames
D.4.2
Aggregating data frames
D.5
Tips and tricks
D.5.1
Cutting dates and datetimes
D.5.2
Getting age from date of birth
D.5.3
Naming files and variables
E
Critical Values for Longest Runs and Number of Crossings
References
Published with bookdown
Mastering Statistical Process Control Charts in Healthcare
Chapter 20
Conclusion and Final Thoughts
20.1
Summary of Key Points
20.2
Emerging trends in SPC and healthcare analytics
20.3
Encouragement for Continuous Learning and Application
20.4
Final Thoughts