simulations
Erik Knight and John Flournoy are working on some simulations to figure out the best way to model cortisol difference scores.
As a general resource for simulation in R, I highly recommend Hadley Wickham’s simulation presntation. Also, the psych
package has some great tools for generating data (with great support in this helpful guide by William Revelle).
You can download the code for our example as an Rmd, or as straight R (with R-notebook style comments). You can also walk through the compiled Rmd.