HRP 262 – Intermediate Biostatistics: Regression, Prediction, Survival Analysis - 2011

 

The materials on this course website are only for the use of students enrolled in this course for purposes associated with this course and may not be retained or further disseminated.  The materials on this course website may be protected by copyright; any further use of this material may be in violation of federal copyright law.

 

This course is designed to provide a working knowledge of statistical methods suitable for longitudinal data analysis.  Topics covered include: time-to-event outcomes, Kaplan-Meier methods, Cox regression, repeated measures, and mixed models. Emphasis will be on medical and epidemiologic examples and practical applications using SAS.

Contact information

Professors

Teaching Assistant

Raymond R. Balise 
Redwood Bldg. T213D

 

Balise at Stanford 
(650) 724-2602 

Brit B. Turnbull  
Redwood Bldg. T260

Brit decimal Turnbull at Stanford 
(650) 725-4345

Jim Murphy

 

 

Jdmurphy at Stanford

 

 

Prerequisites

HRP 259 and HRP 261, plus HRP 223 recommended, or two previous courses in statistics, including ANOVA and linear regression..

Lecture                                                                                                              

Monday 3:15-4:45 in LKS 101 for the rest of the quarter.

Lab                                                                                                                     

Wednesday 3:15-4:45 in M206.

 

Office Hours

Balise by appointment in Redwood Building T213D.  Directions can be found here: www.stanford.edu/~balise/FindBalise.htm

Turnbull by appointment in Redwood Building T260.

Newsgroup

We will be using a Google group groups.google.com/group/hrp262-2011 .  After you fill out the survey shown under Lecture 1 you will be given access.

Required Readings

Regression methods in biostatistics by Vittinghoff  -- Ray’s EG Code for Vittinghoff’s Regression Methods in Biostatistics book is here.

Survival Analysis using SAS: A Practical Guide by Allison – Ray’s EG code for Allison’s Survival Analysis using SAS is here and the link to the data is here.  If you unpack the zip archive into a folder called C:\Projects\books\AllisonSurvival the EG project should behave well.

Recommended Readings

Applied Longitudinal Analysis by Fitzmaurice, Laird and Ware – Ray’s SAS/EG Code for Chapers 1-10 in Fitzmaurice Laird and Ware’s Applied Longitudinal Analysis is here.

Other Reference Readings

The Little SAS Book by Slaughter and Delwiche

The Little SAS book for Enterprise Guide 4.2 by Slaughter and Delwiche

Grading

Participation: 20%

Midterm Project (Survival Analysis): 40%

Final Project (Longitudinal Data Analysis): 40%

You many work on projects in groups (maximum 3 per group) and hand in a single report.  For both projects, you will be given a dataset and will analyze it using SAS.  Your report will include tables, figures, a results section, and SAS code.  For hints on writing results sections of manuscripts, see:  http://www.stanford.edu/~kcobb/writing/lecture6.ppt

Turning in Exams

Both exams will be submitted via email to the TA.

Late policy

Each of the assignments will be due at the beginning of class on the day specified.

Computer Platforms

The programs that you turn in must run on Windows SAS 9.2 and/or Enterprise Guide 4.3.  We can provide good support for Windows or a Mac running parallels (http://www.parallels.com/).

Setting up and configuring SAS and SAS Enterprise Guide:

If you would like to purchase a SAS license for your personal computer see itservices.stanford.edu/service/softwarelic/sas

Pictures showing my SAS 9.2 TS2M3 and EG 4.3 install are here.

Notes on configuring SAS Enterprise Guide 4.3 are here.

Core Lecture Material

A summary of what you should learn from each lab is here.

Email Dr. Balise if you do not have permission to access the slides.

 

Some of the slides are done. Known broken hyperlinks are in red. 

Lecture 1: Logistics, introduction to survival analysis (March 28th)

Reading: Vittinghoff Section 3.5.1, 7.1.1, 7.1.2, Allison Ch. 1

 

Logistics
Introduction to Survival Analysis
Functions in Survival Analysis
Kaplan-Meier Estimate of the Survival Function

The PowerPoint slides are here.

Tell us who you are with the survey here.

Tell us what you know with the survey here.

Lab 1: Basics of SAS EG and survival (March 30th)

Reading: Allison Ch. 1-3

 

Configuring SAS EG

Importing data

Creating a well-organized analysis project

Basic Descriptive Statistics

Creating formats to label formats

Doing Basic KM estimation

Making Survival Curves

Loading Keyboard Macros

Smoothed Hazard with confidence limits

Survival Curves with number remain at risk

 

The PowerPoint slides are here.

An Enterprise Guide project covering the first few labs is here. 

Lecture 2: Non-parametric methods in survival analysis (April 4th)

Reading: Vittinghoff Section 7.1, Allison Ch. 2-3

 

Kaplan-Meier Detailed Example
Kaplan-Meier Confidence Limits
Comparing Groups
Competing Risks

 

The PowerPoint slides are here.

Lab 2: KM methods compare group survival (April 6th)

Reading: Allison Ch. 2-3

 

Using formats to make data meaningful

Survival plots with confidence bounds and confidence limits

Comparing two groups

Making publication ready KM plots

Adding recoded variables

Grouping continuous predictors into categories

Comparing multiple groups

 

 

An Excel 2010 file showing the manual calculation of the survival function is here.

The PowerPoint slides are here.

Lecture 3: Review of regression, proportional hazards and hazard ratios (April 11th)

Reading: Vittinghoff Ch. 4 (review), Sections 7.2 and 7.4, Allison Ch. 5.

 

Hazard Ratio and Proportional Hazards
Review of Linear Regression and Model Selection
Modeling Survival Data
Introduction to the Cox Proportional Hazards Model

The PowerPoint slides are here.

Lab 3: Parametric survival analysis and doing Cox regression (April 13th)

Reading: Allison Ch. 4

 

Hazard functions

Peering down SAS output

Parametric hazard estimation

Building Hazard Curves

            With code and GUI

 

The planned PowerPoint slides are here.

The PowerPoint slides I covered are here. (Updated fixing DSD bug 4/17/201)

An Enterprise Guide project covering the first few labs (with imbedded datasets) is here.  (Updated fixing DSD bug 4/15/2011)

 

A problem set allowing you to practice KM and Cox Regression is here.

Lecture 4: Details of Cox regression analysis (April 18th)

            Time varying covariates

            Accounting for tied event times

            Diagnostics for proportional hazards

            Hypothesis testing

 

The PowerPoint slides are here.

Lab4: Cox regression (April 20th)

Reading: Allison Ch. 5

 

Hazard functions

Basics of Cox Regression

Trying to analyze categorical variables with Cox in EG

Basic checks on proportional hazards

Interactions

Coding Interactions with time to check proportional hazards

 

The PowerPoint slides are here. (Slightly updated 4/20/2011)

An Enterprise Guide project for labs 1-4 is here.   (Slightly updated 4/20/2011)

Lecture 5: Survival Analysis Review (April 25th)

Survival analysis completion

Review

Lab5: A complete example of Survival Analysis (April 27th)

Allison Ch. 5–6

 

Building datasets for survival analysis

Competing risks

 

The PowerPoint slides are here.

The Enterprise Guide project for lab 5 is here

 

Midterm exam is here. 

Lecture 6: Repeated measures I (May 2nd)

Reading:  Fitzmaurice, Laid and Ware Ch. 1-3 & Vittinghoff Ch. 8.

 

            Paired t-test vs. single sample t-test

            Correlation and Covariance

ANOVA

ANCOVA

           

A couple PowerPoint slides showing modeling are here.

The PowerPoint slides are here.

Lab 6: Describing repeated measures (May 4th)

Reading: Fitzmaurice, Laid and Ware Ch. 1-3          

 

Loading data from text files
Labeling and formatting values
Doing paired t-tests
Calculating two point change score
Comparing two point change score between two groups with unpaired t-tests
Converting wide/broad data sets to long form 
Calculating summary statistics on long form repeated data
Plots of data where subjects are not measured consistently
Sampling a few patients for plotting

 

The PowerPoint slides are here.

The Enterprise Guide project for lab 5 is here

Lecture 7: Repeated Measures II (May 9th)

            Repeated Measures ANOVA

Fixed Random and Mixed Effects models

 

The PowerPoint slides are here.

 

Lab 7: Repeated measures on continuous measures with mixed effects (May 11th)

Reading: Fitzmaurice, Laid and Ware Ch. 5

 

Converting long form data to wide/broad format

Wilcoxon-Mann-Whitney tests on changes

Univariate repeated measures ANOVA

Multivariate repeated measures ANOVA

Repeated measures mixed effects models

Checking subject specific patterns

 

The PowerPoint slides are here.

An Enterprise Guide project is here.

Lecture 8: Repeated Measures III (May 16th)

            Modeling

            Mixed Effects

            Covariance structures

           

The PowerPoint slides are here.

Lab 8: Mixed effects models with diagnostics (May 18th)

History of repeated measures

Univariate repeated measures ANOVA

Multivariate repeated measures ANOVA

Repeated measures mixed effects models

Wide to Narrow datasets

Checking subject specific patterns

Overall mean plot

Fixing degrees of freedom ddfm = kr;

Looking at correlation structure

Correlation by time distance plot

Comparing models with -2 log likelihood, AIC, AICc, BIC

Using maximum likelihood to compare fixed effects in nested models

Influence Diagnostics

Means across time

Custom Contrasts

 

The PowerPoint slides are here.

An Enterprise Guide project is here.

Lecture 9: Wrap up of Lectures and Review (May 23rd)

            Review

 

Lab 9: Review of midterm (May 25th)

A solution to the midterm problem set

KM methods

Cox methods

Dealing with interactions in survival analysis (take 2)

 

The PowerPoint slides are here.

A sample Enterprise Guide solution to the midterm is here.

Lab 10: Complicated stuff (June 1st)

Repeated measures on outcomes that are or are not normally distributed

GEE

Generalized Linear Mixed Effects Models

Cookies!!!!

 

The PowerPoint slides are here.

An Enterprise Guide project is here.

Final exam is here and it due Monday June 6th before 5:01 PM.

Other stuff

Keyboard macros for SAS 9.2 and EG 4.3 are here.