R code necessary to reproduce the analyses