data(SpaceShuttle)
E. R. Tufte (1997), Visual Explanations: Images and Quantities, Evidence and Narrative. Graphics Press, Cheshire, CT.
M. Friendly (2000), Visualizing Categorical Data. SAS Institute, Cary, NC.
data(SpaceShuttle)
plot(nFailures/6 ~ Temperature, xlim = c(30, 81), data = SpaceShuttle,
ylim = c(0,1), main = "NASA Space Shuttle O-Ring Failures",
ylab = "Estimated failure probability", pch = 19, col = 4)
fm <- glm(cbind(nFailures, 6 - nFailures) ~ Temperature, data = SpaceShuttle,
family = binomial)
lines(30:81, predict(fm, data.frame(Temperature = 30:81), type = "re"), lwd = 2)
abline(v = 31, lty = 3)
Run the code above in your browser using DataLab