new reference and updated R code for simulating data