Data from 1991-1995 are contained in 02-5-child-heart-surgery-1991-x.csv, and taken from D.J. Spiegelhalter et al., Commissioned Analysis of Surgical Performance Using Routine Data: Lessons from the Bristol Inquiry.

Data from 2012-2014 were shown in Table 1.1 (page 23) and are contained in 02-5-child-heart-surgery-2012-x.csv. The data were originally presented in the NCHDA 2012-15 report, but are best seen on childrensheartsurgery.info.

Figure 2.5 (page 57) Scatterplots

Quickly in qplot

library(ggplot2)
# (a) Survival in under-1s, 1991-1995
child.1991 <- read.csv("02-5-child-heart-surgery-1991-x.csv") # read data into dataframe 
attach(child.1991)
qplot(Operations,100*Survivors/Operations,xlim = c(0,700),ylim=c(70,100),ylab = "% 30-day survival", label = Hospital, geom=c("point", "text"),hjust=1, vjust=-1,size=2, main = "(a) Survival in under-1s, 1991-1995") + theme(legend.position="none")

# (a) Survival in under-1s, 1991-1995
#(b) Survival for all children, 2012-2015
child.2012 <- read.csv("02-5-child-heart-surgery-2012-x.csv") # read data into dataframe all
attach(child.2012)
## The following objects are masked from child.1991:
## 
##     Deaths, Hospital, Operations, PercentageDying, Survivors,
##     ThirtyDaySurvival
qplot(Operations,100*Survivors/Operations,xlim = c(0,2000),ylim=c(95,100),ylab = "% 30-day survival", label = Hospital, geom=c("point", "text"),hjust=1, vjust=-1,size=2, main = "(b) Survival for all children, 2012-2015") + theme(legend.position="none")

p <- ggplot(child.1991, aes(x=Operations, y=100*Survivors/Operations, col=Hospital)) #defines plot axis data fields and colour legend data field
p <- p + geom_point(aes(size=1.5)) # defines scatter-type plot
p <- p + expand_limits(x = c(0,700),y=c(70,100))
p <- p  + scale_size_continuous(name = "Size", guide = FALSE)  # turns off otherwise added size legend
p <- p +  labs(x="Number of operations", y = "% 30-day survival", title="(a) Survival in under-1s, 1991-1995") # Adds title, subtitle, and caption
p

#(b) Survival for all children, 2012-2015
child.2012 <- read.csv("02-5-child-heart-surgery-2012-x.csv") # read data into dataframe all
q <- ggplot(child.2012, aes(x=Operations, y=100*Survivors/Operations,col=Hospital)) #defines plot axis data fields and colour legend data field
q <- q + geom_point(aes(size=1.5)) # defines scatter-type plot
q <- q + expand_limits(x = c(0,2000),y=c(95,100))
q <- q  + scale_size_continuous(name = "Size", guide = FALSE)  # turns off otherwise added size legend
q <- q +  labs(x="Number of operations", y = "% 30-day survival", title="(b) Survival for all children, 2012-2015") # Adds title, subtitle 
q

Figure 2.5 Scatter-plots of survival rates against number of operations in child heart surgery. For (a) 1991-1995, the Pearson correlation is 0.59 and the rank correlation is 0.85, for (b) 2012-2015, the Pearson correlation is 0.17 and the rank correlation is -0:03.

Correlations in (a) 1991-1995 data

attach(child.1991)
## The following objects are masked from child.2012:
## 
##     Deaths, Hospital, Operations, PercentageDying, Survivors,
##     ThirtyDaySurvival
## The following objects are masked from child.1991 (pos = 4):
## 
##     Deaths, Hospital, Operations, PercentageDying, Survivors,
##     ThirtyDaySurvival
cor.test(Operations, 100*Survivors/Operations,method="pearson")
## 
##  Pearson's product-moment correlation
## 
## data:  Operations and 100 * Survivors/Operations
## t = 2.2848, df = 10, p-value = 0.04541
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.01770533 0.86786160
## sample estimates:
##      cor 
## 0.585656
cor.test(Operations, 100*Survivors/Operations,method="spearman")
## 
##  Spearman's rank correlation rho
## 
## data:  Operations and 100 * Survivors/Operations
## S = 42, p-value = 0.0007719
## alternative hypothesis: true rho is not equal to 0
## sample estimates:
##       rho 
## 0.8531469

Correlations in (a) 1991-1995 data, without Bristol

cor.test(Operations[-1], 100*Survivors[-1]/Operations[-1],method="pearson")
## 
##  Pearson's product-moment correlation
## 
## data:  Operations[-1] and 100 * Survivors[-1]/Operations[-1]
## t = 2.6846, df = 9, p-value = 0.02502
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.1116364 0.9047875
## sample estimates:
##       cor 
## 0.6668536
cor.test(Operations[-1], 100*Survivors[-1]/Operations[-1],method="spearman")
## 
##  Spearman's rank correlation rho
## 
## data:  Operations[-1] and 100 * Survivors[-1]/Operations[-1]
## S = 40, p-value = 0.003734
## alternative hypothesis: true rho is not equal to 0
## sample estimates:
##       rho 
## 0.8181818

Correlations in (b) 2012-2014 data

attach(child.2012)
## The following objects are masked from child.1991 (pos = 3):
## 
##     Deaths, Hospital, Operations, PercentageDying, Survivors,
##     ThirtyDaySurvival
## The following objects are masked from child.2012 (pos = 4):
## 
##     Deaths, Hospital, Operations, PercentageDying, Survivors,
##     ThirtyDaySurvival
## The following objects are masked from child.1991 (pos = 5):
## 
##     Deaths, Hospital, Operations, PercentageDying, Survivors,
##     ThirtyDaySurvival
cor.test(Operations, 100*Survivors/Operations,method="pearson")
## 
##  Pearson's product-moment correlation
## 
## data:  Operations and 100 * Survivors/Operations
## t = 0.56807, df = 11, p-value = 0.5814
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.4213591  0.6585488
## sample estimates:
##       cor 
## 0.1688199
cor.test(Operations, 100*Survivors/Operations,method="spearman")
## 
##  Spearman's rank correlation rho
## 
## data:  Operations and 100 * Survivors/Operations
## S = 374, p-value = 0.935
## alternative hypothesis: true rho is not equal to 0
## sample estimates:
##         rho 
## -0.02747253

Correlations in (b) 2012-2014 data, without smallest hospital

cor.test(Operations[-1], 100*Survivors[-1]/Operations[-1],method="pearson")
## 
##  Pearson's product-moment correlation
## 
## data:  Operations[-1] and 100 * Survivors[-1]/Operations[-1]
## t = 1.4446, df = 10, p-value = 0.1792
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.2079725  0.7989099
## sample estimates:
##       cor 
## 0.4155244
cor.test(Operations[-1], 100*Survivors[-1]/Operations[-1],method="spearman")
## 
##  Spearman's rank correlation rho
## 
## data:  Operations[-1] and 100 * Survivors[-1]/Operations[-1]
## S = 242, p-value = 0.6351
## alternative hypothesis: true rho is not equal to 0
## sample estimates:
##       rho 
## 0.1538462