This webpage supports The New Statistics with R: An Introduction for Biologists and the R café statistics courses that I occasionally teach. These webpages are still under construction as I make corrections and edit the R scripts to be compatible with the book.
- The data sets analysed in the book that are not included in R packages or easily available elsewhere can be downloaded here: Rcafe_Data
- The R scripts that produced the analyses in the book (and updated for most of the corrections below) can be downloaded here: Rcafe_Scripts
- Powerpoint files of the slides of the figures in the book for use by lecturers are in preparation will be downloadable (at some point) here
- I teach most of the statistics content for the Oxford University Quantitative Methods for Biologists (‘QM’) course but occasionally teach courses elsewhere on Generalized Linear Models and Mixed-Effects Models.
Corrections & clarifications
With apologies to readers (from myself and/or OUP depending on who is to blame!) and thanks to the spotters (Hans Diesfeld, Carl N. von Ende, Yvonne Griffiths, Fraenzi Korner-Nievergelt, Matteo Tanadini, Steffanie von Felten).
Chapter 2
p.17: > library(reshape) # load reshape package
p.18: > display(ls0)
p.22: “the SED is equal to the square root of two (~1.4) times the standard error”
p.26: “The residual variance from the ANOVA table is simply the square of the residual SD from the arm package display() function output”
p.32: “…using the pf() function introduced earlier”
Chapter 3
p.41: Fig. 3.1 should show t asymptote at approximately 2 (1.96) as correctly described in legend and programmed in the R script.
Chapter 4
p.51: The lines of code in the chapter 4 R script that change dens to Density and hardness to Hardness are missing from the book and must be run first (next correction) or instead just use the original names dens and hardness
p.52: > names(janka) <- c(“Density”, “Hardness”) # assign full names
Chapter 5
p.70: While boxplots would appear to be most useful for datasets with skew and outliers sadly they don’t work very well in these cases according to the Lattice book.
Chapter 6
p.86: > ylabel <- expression(paste(“Aboveground biomass (g m”^”-2″,”) “)). Alternatively simply delete the ylabel argument and the label will be taken from the dataframe.
p.86: p1 <- …
p.87: “Using the plot() function to check the residuals as demonstrated in Chapter 4…”
p.93: lm(Biomass.m2 ~ FL)
p.94: 449.4875 (not 416.0641)
Chapter 8
p.118: right-hand panel (not middle panel)
Chapter 9
p.124: Number_survived rather than Number_alive
p.124: in qplot…..remove “)” after beetle
p.125: Number_survived rather than Number_alive
p.128 (code in middle of page) delete: ylab = “Probability of switching”,
p.131: xlab=”Arsenic concentration”
p.137: delete quasipoisson in second line of R code
p.138: Model was intended to be named ‘log.lin’ as the BoxCox gives the transformation that gives the best fit (note the glm still has family=Gaussian so the variation is being modelled as before and the (mis-)name ‘log.norm’ is misleading
Chapter 10
p.144: insert comma after main= “No-pooling analysis”
p.146: main= “Complete pooling analysis”
p.146: DELETE: facets=.~Site
p.150: > me1
p.152: Portugal 179.5590 55.776178 [due to an update in lme4?]
Chapter 11
p.167: Website originally had the original Banta data which should now have been replaced with the simplified version used in the book