This code is part of a series of lessons in the R course "R for Publication". The course information can be found here http://pagepiccinini.com/r-course/. Details about the lesson can be found here http://pagepiccinini.com/r-course/lesson-6-part-1-linear-mixed-effects-models/ and http://pagepiccinini.com/r-course/lesson-6-part-2-linear-mixed-effects-models/.