added r and Rmd files to run the analyses for the paper (written by PAB).