Models for Longitudinal Data I
By the end of this module, you will be able to
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 SDpost 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