Week 9: Longitudinal I

Models for Longitudinal Data I

Week Learning Objectives

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

  • Describe the similarities and differences between longitudinal data and cross-sectional clustered data
  • Perform some basic attrition analyses
  • Specify and run growth curve analysis
  • Analyze models with time-invariant covariates (i.e., lv-2 predictors) and interpret the results

Task List

  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. Attend the Tuesday session to learn about brms
  4. Attend the Thursday session and participate in the class exercise
  5. Complete Homework 7 (on materials for Week 8)
  6. Additional resources for learning MLM for longitudinal data analysis

Lecture

Slides

PDF version

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?



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

Note

See the R code section.

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



Think more
In a growth model, what does it mean when \(\tau_1 = 0\)?



Linear growth

In the videos, what is labelled as SDpost is the Bayesian analog of the standard error.

Check your 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?

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?

Think more
What does the coefficient for phase1 mean when the model includes an interaction between phase1 and homecog9?



Note

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

In the video below, recorded in 2021, I used the R package glmmTMB for frequentist analyses. The results and interpretations using brms are similar.