Week 8

Models for Longitudinal Data I

Week Learning Objectives

By the end of this module, you will be able to

Task Lists

  1. Review the resources (lecture videos and slides)
  2. Complete the assigned readings
    • Snijders & Bosker ch 15 (you can skip 15.1.3 and 15.1.4)
  3. Prepare the prospectus and schedule a meeting with the instructor
  4. Additional resources for learning MLM for longitudinal data analysis
  5. HW 8 is not due until October 30, but you may start working on Part A of it

Lecture

Slides

Note that in some of the videos below the Bayeisan analyses were used; however, for the class this year we will stay with frequentist analyses. The results and interpretations are basically; just note some differences in the terminology.

You can view and download the slides here: PDF

Longitudinal Data Analysis


Check your learning: In a research study, data were collected for a group of patients on symptoms of eating disorder on a weekly interval across 5 weeks. What type of data is this?





Example data


Check your learning: In the data set, at what level is homecog, which is a measure of mother’s cognitive stimulation at baseline?



Basic attrition analysis

See the R code section.


Check your learning: In the spaghetti plot, what does the average trend line mean?





Growth Curve Modeling

Note that in the video, the function brm() from the brms package was used for Bayesian analyses. However, in this class we will use the glmmTMB() function instead (see the updated slides). The parameter estimates and interpretations are basically the same.


Thinking exercise: In a growth model, what does it mean when \(\tau_1 = 0\)?





Linear growth

Note that what is labelled as SDpost is the Bayesian analogue of the standard error.


Check you learning: What is the advantage of having time to start at 0?




Piecewise linear growth


Practice yourself: What should the coding of phase 1 and phase 2 be if the turning point is set at time = 2?


Instead of using the LOOIC in the Bayesian analysis as discussed in the video, we can use the more popular AIC statistic to compare the two models.

Note: In this example, the turning point was chosen mostly based on the spaghetti plot and was arbitrary. For your research, you should justify your choice.


Check your learning: If a piecewise growth model has an AIC of 23745, and a linear growth model has an AIC of 23650, which model should be preferred?



Time-Invariant Covariates


Thinking exercise: What does the coefficient for phase1 mean when the model includes an interaction between phase1 and homecog9?




Varying Occasions

Instead of using time as the duration since a particular point in history (e.g., when the study started), one can use some other ways of quantifying time, such as the duration since one is born (i.e., chronological age). See R code.

Using GitHub

First, create a GitHub account at github.com. You can see some advice at https://happygitwithr.com/github-acct.html

Check out this page for system-specific instructions for installing Git: https://happygitwithr.com/install-git.html

Check out this page for getting a personal access token (PAT) for GitHub: https://happygitwithr.com/credential-caching.html#get-a-pat

As an example, here is the GitHub repository for this class website: https://github.com/marklhc/20213-psyc575-usc