Week 4 : Random effect of time. Lab: dynamic reporting

Admission requirements What you need to read before coming to class on Tuesday .
Chapter: 5 - INTRODUCTION TO RANDOM EFFECTS OF TIME AND MODEL ESTIMATION
Lecture: Introduction to Random Effects of Time and Model Estimation slides | watch parts 1,2, and 3 of Lecture 5

Mplus

Today we’ll take a closer look at three models, identified in the book by equations (5.1), (5.3), and (5.5).

The files needed for today’s demonstration are located in the master branch of the class’s repository on GitHub. You may download the entire repo ( but MAKE SURE TO UNZIP IT BEFORE working from it) or download files individually from ./Chapters/05/MPlus_Chapter5 on GitHub.

Files of interest:


Friday Session

Please follow these instructions to prepare the desktop for the lab: Read all the instructions first, then implement step by step.

  1. Within Firefox browser right-click on this link, choose “Save Link As” and save to your desktop.

  2. After making sure that no such folder exist, unzip the downloaded archive on your desktop.

  3. Open the folder “/psy564-master” AND NOT THE ZIPPED ARCHIVE

  4. Double-click on “psy564.Rproj” file to open RStudio. You are now ready.

  5. Follow the link install MiXTex on you computer. It may take a few mins.


Report Due

Details will be provided in class

a place to start with lmer

Assignment Using provided data produce a dynamic report analyzing the performance of three (3) within-person models:

  1. Empty WP model with random intercept
    lmer(y ~ 1 + ( 1 | PersonID))

  2. WP model with random intercept and fixed effect of linear time
    lmer(y ~ 1 + time + ( 1 | PersonID))

  3. WP model with random intercept and random effect of linear time
    lmer(y ~ 1 + time + ( 1 + time | PersonID))