Self diagnozed ear infections in swimmers
The data come from the Pilot Surf/Health Study of NSW Water Board performed in 1990 on 287 recruits. The objective of the study was to determine, in particular, whether beach swimmers run a greater risk of contracting ear infections than non-beach swimmers. See Hand et al. (1994. page 266).
data(swimmers)
A data frame with 287 rows and 5 variables:
a factor giving the recruit's perception of whether he or she is a frequent swimmer: "frequent" and "occasional".
a factor giving the recruit's usually chosen swimming location: "beach" and "non-beach".
a factor giving the recruit's age range: "15-19", "20-24" and "25-29".
a factor giving the recruit's gender: "male" and "female".
a numeric vector giving the number of self diagnozed ear infections that were reported by the recruit.
Hand D.J., Daly F., Lunn A.D., McConway K.J. and Ostrowsky E. (1994) A Handbook of Small Data Sets, Chapman and Hall, London.
Vanegas L.H. and Rondon L.M. (2020) A data transformation to deal with constant under/over-dispersion in binomial and poisson regression models. Journal of Statistical Computation and Simulation 90, 1811-1833.
boxplot(infections ~ frequency, data=subset(swimmers,location=="non-beach"), at=c(1:2)-0.2, col="yellow", boxwex=0.25, outline=FALSE, xaxt="n") boxplot(infections ~ frequency, data=subset(swimmers,location=="beach"), add=TRUE, at=c(1:2)+0.2, col="blue", boxwex=0.25, outline=FALSE, xaxt="n") axis(1, at=1:2, labels=levels(swimmers$frequency)) legend(0.2, 6.7, legend=c("non-beach","beach"), title="Location", col=c("yellow","blue"), bty="n", cex=0.9, title.adj=0.2, y.intersp=0.1, x.intersp=0.3)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.