Unit 11 — Longitudinal data and change through time
Wednesday 18 November 2026, 08:00–11:30
Researchers weigh the same calves repeatedly to see how they grow. These are longitudinal data: measurements from the same animals over time. Compare a straight line with a curved growth path, then refine your own project’s first result.
This morning session is the make-up class for 26 August. The room is to be confirmed. Unit 12 meets this afternoon at 12:30.
No new preparation is required. Bring your Week 10 model map and trajectories, project files and laptop if available. Essential teaching and supplied results are available in class.
Worked code uses lme4 for mixed models, performance for model checks and marginaleffects for predicted outcomes and comparisons. All data preparation and package calls are shown directly.
Opening recall asks how researchers assign a diet to each calf and collect repeated weights. We compare a straight growth line with a curve that lets both diets slow in the same way, then discuss growth-story cards. The workshop fits models to the same invented calf records as Class 10, checks their errors and estimates expected weights. Optional supplied results show what changes when errors at nearby visits can be related. The final 35-minute workshop is protected time to defend the choices in your saved project plan, fit a preliminary model, connect a check to a decision and log justified revisions, including projects without repeated observations.
Breaks: 09:10–09:25 and 10:25–10:40. Finish at 11:30.
Teaching slides Workshop slides 11-01 · Longitudinal workshop 11-02 · Recap Open the instructor-supplied Posit Cloud project for 11-longitudinal-data. All files are already provided in its project root.
Save your project notes and preliminary result for the afternoon workshop. Do the Unit 12 follow-up before 25 November. Use the review below as needed while revising the same draft.