Biostatistics 236 Modeling Longitudinal Data
Fall 2024 - Robert Weiss
News & Announcements:
- Lecture 19 on Tuesday Dec 3 and Lecture 20 on Thursday Dec 5 are online.
- Lecture 18 on Tuesday Nov 26th is in Person.
- Lab Tuesday 26th is an office hour will be online.
- Lab Tuesday Dec 3 is an office hour and will be online.
- Final Data Analysis Project (FDAP) Abstract Comments.
- Lab 8 is a Bayesian Logistic Random Intercept Model for the Kenyan School Lunch Morbidity Data.
- You will need to download and install JAGS, ideally before the lab. See instructions at the top of the R code. Note that I have a windows laptop, and am not sure how instructions might differ for Apple.
- Quick summary of useful graphics
- Data Analysis Project Comments and General Advice.
- Variance Covariance Choices.
- (For those who are interested) SAS Studio Introduction (word). Not part of the course.
- 2024F Syllabus has been posted.
Table of Contents
- Class Schedule
- Syllabus and Textbook
- Lecture Notes
- Homework
- Computer Labs in R
- Computer Labs in SAS
- Data Sets
- Discussion Questions
- Topics from lectures and labs
- Zoom recordings of lectures/labs are available in the Media Gallery on Bruin Learn.
2024F Class Schedule, Email Addresses, and Office Hours:
For Zoom links see Syllabus
Event | Time | Day | Room |
---|---|---|---|
Lecture | 1:00 -- 2:50 | Thursday | Factor 3-648 |
Lecture | 1:00 -- 1:50 | Tuesday | Factor 3-648 |
Computer Lab | 2:00 - 2:50 | Tuesday | Factor 3-648 |
Prof | Robert Weiss | robweiss@ucla.edu | |
Office Hours | Monday | 3:00 -- 3:45 | zoom |
Office Hour | Wednesday | 10:00 -- 10:45 | zoom |
TA | Carolyn Winskill | cwinskill@g.ucla.edu | TA TBA |
Office Hours | 6:00 - 6:50pm | Tuesday | zoom |
9:00 - 9:50 | Friday | zoom | |
Syllabus and Textbook
2024F Syllabus has been posted. Includes 2024F HW due dates and 2024F grading system. Includes Zoom Links.
The 2024 textbook is Modeling Longitudinal Data. The book web page has data and links to example code.
The textbook is available for download through the UCLA library Springer bookshelf. If you are off campus, you will need to VPN to campus to be able to download the book. When I type "Modeling Longitudinal Data" (without the quotes) into the search box at UCLA Library webpage, the book is the first item on the list.
Lecture Notes
- Zipped folder of all 9 course note packets but don't have the minor edits. Password Protected.
- Lecture notes 1 intro.
- Lecture notes 2 graphics. Quick summary of useful graphics
- Lecture notes 3 simple critique MVN.
- Lecture notes 4 predictors.
- Lecture notes 5 covariance.
- Lecture notes 6 random effects.
- Lecture notes 7 examples missing computing.
- Lecture notes 8 computation examples discrete.
- Lecture notes 9 bivariate.
Homework Assignments
Homeworks (PDFs)
Please turn in PDFs of your solutions on Bruin Learn. Due dates are on the syllabus.
All data Sets in both Text and SAS Formats
- Homework Number 1
- Papers for HW #1 problem 1
- Homework Number 2
- Homework Number 3
- Homework Number 4
- Homework Number 5
- DAP1 Macular Data Analysis
- Final Data Analysis Project (FDAP).
Homeworks (Original LaTeX)
- Homework Number 1
- Homework Number 2
- Homework Number 3
- Homework Number 4
- Homework Number 5
- DAP1 Macular Data Analysis
- Final Data Analysis Project (FDAP)
Computer Labs in R for Learning Longitudinal Data Analysis
- Lab 1 Data Management and Introduction
- Lab 2 Graphics
- RLab 2 graphics.docx
- Lab2_graphics.R
- bigmice data
- smallmice data
- GGplot code for multiple outcomes (edited after lab 2 to prevent errors)
- Output
- Lab 3 Simple Analyses + 1 Longitudinal Random Effect Model
- Lab 4 Longitudinal Models for the Pediatric Pain Analysis.
- R Output
- R Commands
- Pediatric Pain data (text file)
- Lab 5 Covariance Models for the Small Mice Data
- Lab 6 Hierarchical Models BSI data and Weight Loss Data
- Lab 7 Longitudinal Models for Discrete Data
- Spring 2024 (only) Meets on Monday instead of Wednesday
- Handout
- Selected Output
- R Commands
- Lab 8 Intro to a Bayesian Analysis to fit a Logistic Random Effects Model
- <Defunct> Old Lab 8 Using SAS to fit Covariance Models
- SAS Lab 5 (word)
- SAS Lab 5 selected output (word)
- SAS Lab 5 Questions and Answers (word)
- <Defunct> Old Lab 9 Residual Analysis for Random Effects Models
- Lab 9 (word)
- Pediatric Pain SAS File
- Weight Loss SAS File
- SAS output, word document (warning: 56 pages long!) (word)
Computer Labs for Learning Longitudinal Data Analysis Using SAS
- Lab 1 Initial Exploratory Data Analysis
- SAS Studio Introduction (word)
- Lab 1 (word)
- Pediatric Pain data (text file)
- Cognitive Data Set for TODO portion of lab.
- Lab 2 Graphics
- Four needed Macros (written by Michael Friendly)
- Lab 3 Simple Analyses
- Lab 4 Fixed Effects: Class variables and estimate, contrast and lsmeans statements
- Lab 4(word)
- Lab 4 comments (word)
- Pediatric Pain Text File
- Lab 5 Covariance Models
- Lab 5 (word)
- Lab 5 selected output (word)
- Lab 5 Questions and Answers (word)
- Lab 6 Hierarchical/Nested Data
- Lab 7 Discrete Data
- Lab 7 (word)
- NLMixed and Glimmix Malaria output (word)
- SAS Glimmix Procedure (links at bottom for the procedure and for the documentation).
- Morbidity (Kenya)
- Lab 8 Bivariate Longitudinal Data
- Lab 9 Residual Analysis for Random Effects Models
- Lab 9 (word)
- Pediatric Pain SAS File
- Weight Loss SAS File
- SAS output, word document (warning: 56 pages long!) (word)
Data Sets
Discussion Questions
Lecture Contents
Lecture recordings posted to our BruinLearn Media Gallery (near bottom of BruinLearn menu bar).
Lecture topics from 2024 lectures to-date. For future dates, lecture topics are from previous year.
- Syllabus (non-lecture, pdf).
- Lecture 01 Thursday 2024_09_26. Syllabus. Lecture notes 1 intro pages 1-17.
- Lecture 02 Tuesday 2024_10_01. Pediatric Pain Data, Kenya School Lunch Cognitive data. Lecture notes 1 page 17.
- Lecture 03 Thursday 2024_10_03. Lecture notes 1 pages 18- 28. Lecture notes 2 Graphics pages 1-34.
- Lecture 04 Tuesday 2024_10_08. Lecture notes 2 Graphics pages 35-49. Lab 2.
- Lecture 05 Thursday 2024_10_10. Lecture notes 3 pages 1-21, talked about lab 3.
- Lecture 06 Tuesday 2024_10_15. Lecture notes 3, multivariate normal model pages 21-34.
- Lecture 07 Thursday 2024_10_17. Lecture notes 3 pages 35-45. Lab 4 discussion of annotated output for lab 4.
- Lecture 08 Tuesday 2024_10_22. Lecture notes 3 pages 46-48. Lecture notes 4 pages 1-20.
- Lecture 09 Thursday 2024_10_24. Lecture notes 4 Covariates pages 20-36. Lab 5 output.
- Lecture 10 Tuesday 2024_10_29. Lecture notes 4 Covariates pages 37-53.
- Lecture 11 Thursday 2024_10_31. Lecture notes 4 Covariates pages 54-66 (top half). Lab 6.
- Lecture 12 Tuesday 2024_11_05. Lecture notes 4 Covariates 66-69 (end). Lecture notes 5 Covariance Modeling 1-13.
- Lecture 13 Thursday 2024_11_07. Lecture notes 8 pages 14-17 on Logistic Random Effects Model. Lab 7 output. Lecture notes 5 Covariance models pages 14-30.
- Lecture 14 Tuesday 2024_11_12. Finished lecture notes 5 Covariance Models pages 31-42. Started lecture notes 6 random effects models pages 1 to 5(top).
- Lecture 15 Thursday 2024_11_14. Lab 8 discussion, fitting a Bayesian model to discrete longitudinal data. Lecture notes 6 random effects models, pages 5 to 15.
- Lecture 16 Tuesday 2024_11_19. Comments on abstracts/projects (see announcements up above). Lecture notes 6 random effects modeling, pages 16 to top of page 23 top.
- Lecture 17 Thursday 2024_11_21. Lecture notes 6 random effects modeling page 23-33. Lecture notes 7 pages 1-11.
- Lecture 18 Tuesday 2024_11_26. Lecture notes 7 function maximization, pages 21-22, Lecture notes 8, page 1; Data Analysis ANC clinical trial data lecture notes 7 pages 12-19 and lecture notes 8 pages 6-13.
- Lecture 19 Tuesday 2024_12_03. Finished lectures notes 8, pages 13-21, Lecture notes 9, bivariate Longitudinal Data, pages 1 to 11.
- Lecture 20 Thursday 2024_12_05. Lecture notes 9, Bivariate Longitudinal Data, pages 11 to end.
Labs.
- Lab 01 Tuesday 2024_10_01. Introduction, Data Management
- Lab 02 Tuesday 2024_10_08. Graphics
- Lab 03 Tuesday 2024_10_15. Simple Analyses
- Lab 04 Tuesday 2024_10_22. Fitting Longitudinal Models
- Lab 05 Tuesday 2024_10_29. Covariance Models
- Lab 06 Tuesday 2024_11_05. Clustered Data
- Lab 07 Tuesday 2024_11_12. Discrete Data
- Lab 08 Tuesday 2024_11_19. Using Bayesian methods to fit longitudinal discrete data
- Lab 09 Tuesday 2024_11_26. No lab, informal office hour.
- Lab 10 Tuesday 2024_12_03. No lab, informal office hour.
SAS Documentation