swimmers | R Documentation |
A pilot surf/health study was conducted by NSW Water Board in 1990 on 287 recruits. The objective of the study was to determine whether beach swimmers run an increased risk of contracting ear infections than non-beach swimmers.
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., Ostrowsky E. (1994) A Handbook of Small Data Sets, Chapman and Hall, London.
Vanegas L.H., 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.
data(swimmers)
dev.new()
boxplot(infections ~ frequency, data=subset(swimmers,location=="non-beach"),
at=c(1:2) - 0.2, col="yellow", boxwex=0.25, xaxt="n")
boxplot(infections ~ frequency, data=subset(swimmers,location=="beach"), add=TRUE,
at=c(1:2) + 0.2, col="blue", boxwex=0.25, xaxt="n")
axis(1, at=c(1:2), labels=levels(swimmers$frequency))
legend("topleft", title="Location",legend=c("non-beach","beach"),
fill=c("yellow","blue"),bty="n")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.