Models for Longitudinal Data I

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 - Create a GitHub repository to be used for your class project

- Review the resources (lecture videos and slides)
- Complete the assigned readings
- Snijders & Bosker ch 15 (you can skip 15.1.3 and 15.1.4)

- Prepare the prospectus and schedule a meeting with the instructor
- Additional resources for learning MLM for longitudinal data analysis
- This excellent book by Hoffman (2014) (USC SSO required)

- HW 8 is not due until October 30, but you may start working on Part A of it

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

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?

See the R code section.

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

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\)?

Note that what is labelled as
SD_{post} is the Bayesian analogue of the standard
error.

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

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?

Thinking exercise: What does the coefficient for `phase1`

mean when the model includes an interaction between `phase1`

and `homecog9`

?

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.

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