repeated measures/longitudinal analysis bob feehan -bob feehan

23
Repeated Measures/Longitudinal Analysis -Bob Feehan

Upload: georgina-nash

Post on 17-Dec-2015

223 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Repeated Measures/Longitudinal Analysis Bob Feehan -Bob Feehan

Repeated Measures/Longitudinal Analysis

-Bob Feehan

Page 2: Repeated Measures/Longitudinal Analysis Bob Feehan -Bob Feehan

What are you talking about?

• Repeated Measures– Measurements that are taken at two or more

points in time on the same set of experimental units. (i.e. subjects)

• Longitudinal Data– Longitudinal data are a common form of repeated

measures in which measurements are recorded on individual subjects over a period of time.

Page 3: Repeated Measures/Longitudinal Analysis Bob Feehan -Bob Feehan

ExampleResearchers want to see if high school students and college students have different levels of anxiety as they progress through the semester. They measure the anxiety of 12 participants three times: Week 1, Week 2, and Week 3. Participants are either high school students, or college students. Anxiety is rated on a scale of 1-10, with 10 being “high anxiety” and 1 being “low anxiety”.

• Repeated Measurement?• Anxiety

• Longitudinal Measurement?• 3 Weeks

• Any other comparisons?• High School vs College

• Overall• Rate (interaction)

-http://statisticslectures.com/topics/factorialtwomixed/

Page 4: Repeated Measures/Longitudinal Analysis Bob Feehan -Bob Feehan

Clarifications

• Repeated Measures/Longitudinal Design:– Need at least one Factor with two Levels.– The Levels have to be dependent upon the Factor

• Example Continued …– Factor: Subjects (12)– Levels: 3 (measured each week from SAME person)

Page 5: Repeated Measures/Longitudinal Analysis Bob Feehan -Bob Feehan

ExampleResearchers want to see if high school students and college students have different levels of anxiety as they progress through the semester. They measure the anxiety of 12 participants three times: Week 1, Week 2, and Week 3. Participants are either high school students, or college students. Anxiety is rated on a scale of 1-10, with 10 being “high anxiety” and 1 being “low anxiety”.

Before we even take any Data:What is our Hypothesis going in? (CRITICAL!!!)

1. College Students Anxiety (Null Week1 = Week2 = Week3)2. High School Students Anxiety (Null Week1 = Week2 = Week3)3. High School vs College Overall (Null High School = College Overall)4. High School vs College Trend (Null No Interaction or “Parallel Lines”)

Page 6: Repeated Measures/Longitudinal Analysis Bob Feehan -Bob Feehan

Data

• Why not just do multiple Paired/Independent T – Tests?• Takes Time (Time is precious)• Only can look at one Factor at a time. (ie Week)• Factor can only be two levels (ie no repeated measures > 2)• Cannot look at over-all interactions

• Why use ANOVA?• Saves time• Can look at multiple Factors • Factors can have multiple levels• Can look at differences between separate groups (ie College/High school)

Page 7: Repeated Measures/Longitudinal Analysis Bob Feehan -Bob Feehan

Minitab Tricks – “Stacked” Data

789101112

Page 8: Repeated Measures/Longitudinal Analysis Bob Feehan -Bob Feehan

Minitab Tricks - “Stacked” Data

Page 9: Repeated Measures/Longitudinal Analysis Bob Feehan -Bob Feehan

Minitab Tricks - “Stacked” Data

Page 10: Repeated Measures/Longitudinal Analysis Bob Feehan -Bob Feehan

Minitab Tricks – “Subset” Data

Page 11: Repeated Measures/Longitudinal Analysis Bob Feehan -Bob Feehan

Minitab Tricks – “Subset” Data

Page 12: Repeated Measures/Longitudinal Analysis Bob Feehan -Bob Feehan

Data ANOVA

ANOVA General Linear Mode:

• Responses:

• Model:

• Random Factors:

Response

Week Subject

Subject

*Note: Without Subjects as Random our N of 6 would be N of 18. It would count each measurement of a subject as INDEPENDENT!

Page 13: Repeated Measures/Longitudinal Analysis Bob Feehan -Bob Feehan

College Student Results

Week 3Week 2Week 1

9

8

7

6

5

4

3

2

1

WeekM

ean

Main Effects Plot for ResponseFitted Means

Results for: College Students General Linear Model: Response versus Week, Subject

Factor Type Levels ValuesWeek fixed 3 Week 1, Week 2, Week 3Subject random 6 1, 2, 3, 4, 5, 6

Analysis of Variance for Response, using Adjusted SS for Tests

Source DF Seq SS Adj SS Adj MS F PWeek 2 148.0000 148.0000 74.0000 111.00 0.000Subject 5 1.3333 1.3333 0.2667 0.40 0.838Week*Subject 10 6.6667 6.6667 0.6667 **Error 0 * * *Total 17 156.0000

** Denominator of F-test is zero or undefined.

1. College Students Anxiety (Null Week1 = Week2 = Week3)2. High School Students Anxiety (Null Week1 = Week2 = Week3)3. High School vs College Overall (Null High School = College Overall)4. High School vs College Trend (Null No Interaction or “Parallel Lines”)

Page 14: Repeated Measures/Longitudinal Analysis Bob Feehan -Bob Feehan

High School Student Results

Week 3Week 2Week 1

7.5

7.0

6.5

6.0

5.5

5.0

4.5

4.0

3.5

WeekM

ean

Main Effects Plot for ResponseFitted Means

Results for: High School General Linear Model: Response versus Week, Subject

Factor Type Levels ValuesWeek fixed 3 Week 1, Week 2, Week 3Subject random 6 1, 2, 3, 4, 5, 6

Analysis of Variance for Response, using Adjusted SS for Tests

Source DF Seq SS Adj SS Adj MS F PWeek 2 44.3333 44.3333 22.1667 28.91 0.000Subject 5 0.5000 0.5000 0.1000 0.13 0.982Week*Subject 10 7.6667 7.6667 0.7667 **Error 0 * * *Total 17 52.5000

** Denominator of F-test is zero or undefined.

1. College Students Anxiety (Null Week1 = Week2 = Week3)2. High School Students Anxiety (Null Week1 = Week2 = Week3)3. High School vs College Overall (Null High School = College Overall)4. High School vs College Trend (Null No Interaction or “Parallel Lines”)

Page 15: Repeated Measures/Longitudinal Analysis Bob Feehan -Bob Feehan

Combined Analysis1. College Students Anxiety (Null Week1 = Week2 = Week3)2. High School Students Anxiety (Null Week1 = Week2 = Week3)3. High School vs College Overall (Null High School = College Overall)4. High School vs College Trend (Null No Interaction or “Parallel Lines”)

High School / College Comparisons

-Problems?

Page 16: Repeated Measures/Longitudinal Analysis Bob Feehan -Bob Feehan

Combined Analysis“Crossed” Factors vs “Nested” Factors for arbitrary Factors “A” & “B”

Nested: Factor "A" is nested within another factor "B" if the levels or values of "A" are different for every level or value of "B".

Crossed: Two factors A and B are crossed if every level of A occurs with every level of B.

Our Factors: Subjects, School, & Week

Crossed?• School & Week• Subjects & Week

Nested?• Subject is nested within School• ie. Each subject has a measurement in High School or College not High

school and College• Therefore; any comparisons between them are independent (Not paired!)

Page 17: Repeated Measures/Longitudinal Analysis Bob Feehan -Bob Feehan

Combined AnalysisSetting up the ANOVA GLM with only Crossed Factors:(Pretend “Highschool” = Freshman year of College & “College” = Senior year)

ANOVA General Linear Mode:

• Responses:

• Model:

• Random Factors:

Response

Week Year Subject Week*Year Week*Subject Year*Subject

Subject

Page 18: Repeated Measures/Longitudinal Analysis Bob Feehan -Bob Feehan

Combined Analysis

General Linear Model: Response versus Week, Year, Subject

Factor Type Levels ValuesWeek fixed 3 Week 1, Week 2, Week 3Year fixed 2 Freshman, SeniorSubject random 6 1, 2, 3, 4, 5, 6

Analysis of Variance for Response, using Adjusted SS for Tests

Source DF Seq SS Adj SS Adj MS F PWeek 2 175.1667 175.1667 87.5833 99.15 0.000Year 1 2.2500 2.2500 2.2500 19.29 0.007Subject 5 1.2500 1.2500 0.2500 0.56 0.744 xWeek*Year 2 17.1667 17.1667 8.5833 15.61 0.001Week*Subject10 8.8333 8.8333 0.8833 1.61 0.234Year*Subject 5 0.5833 0.5833 0.1167 0.21 0.950Error 10 5.5000 5.5000 0.5500Total 35 210.7500

Week 3Week 2Week 1

8

7

6

5

4

3

2

SeniorFreshman

Week

Mean

Year

Main Effects Plot for ResponseFitted Means

Week 3Week 2Week 1

9

8

7

6

5

4

3

2

1

Week

Mean

FreshmanSenior

Year

Interaction Plot for ResponseFitted Means

Page 19: Repeated Measures/Longitudinal Analysis Bob Feehan -Bob Feehan

Combined AnalysisSetting up the ANOVA GLM with Nested Factors:(Reminder – Subjects are nested within School)

ANOVA General Linear Mode:

• Responses:

• Model:

• Random Factors:

Response

School Subject(School) Week School*Week

Subject Note: No Subject*Week interactions as School*Week included Subject*Week

Page 20: Repeated Measures/Longitudinal Analysis Bob Feehan -Bob Feehan

General Linear Model: Response versus School, Week, Subject

Factor Type Levels ValuesSchool fixed 2 College, High SchoolSubject(School) random 12 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12Week fixed 3 Week 1, Week 2, Week 3

Analysis of Variance for Response, using Adjusted SS for Tests

Source DF Seq SS Adj SS Adj MS F PSchool 1 2.250 2.250 2.250 12.27 0.006Subject(School) 10 1.833 1.833 0.183 0.26 0.984Week 2 175.167 175.167 87.583 122.21 0.000School*Week 2 17.167 17.167 8.583 11.98 0.000Error 20 14.333 14.333 0.717Total 35 210.750

Combined Analysis

1. College Students Anxiety (Null Week1 = Week2 = Week3)2. High School Students Anxiety (Null Week1 = Week2 = Week3)3. High School vs College Overall (Null High School = College Overall)4. High School vs College Trend (Null No Interaction or “Parallel Lines”)

1. College Students Anxiety (Iffy)2. High School Students Anxiety (Iffy)3. High School vs College Overall (P <0.001, Means differ - College less)4. High School vs College Trend (P <0.001, Rate at which Anxiety changes

varies dependent on the week. High schoolers became less anxious as Time went on and college students more anxious)

Week 3Week 2Week 1

9

8

7

6

5

4

3

2

1

Week

Mean

CollegeHigh School

School

Interaction Plot for ResponseFitted Means

Week 3Week 2Week 1

8

7

6

5

4

3

2

High SchoolCollege

Week

Mean

School

Main Effects Plot for ResponseFitted Means

Page 21: Repeated Measures/Longitudinal Analysis Bob Feehan -Bob Feehan

My Data• 20 Minute Body cooling procedure where measurements (etc. HR, BP, Skin

Temperature) are taking at baseline and then ever 2 minutes during cooling all the way to 20 minutes. 11 Total measurements during the cooling procedure.

• Two Group (Younger and Older) • Two Infusions (Saline and Vitamin C) on Both Older and Younger• Two “Timepoints” (Pre Infusion and Post Infusion) on each injection day.• 20 Subjects total (10 Older and 10 Younger)

Summary:- Each subject comes for two visits. One visit is Saline, the other is Vitamin C

injection- Each visit subjects puts on cold suit and is cooled twice. Once before the

infusion and once after- Measurements are taking Before cooling (baseline) and then ever 2 minute

increments up to 20 minutes.- Subjects are splits into two groups, Younger and Older

Page 22: Repeated Measures/Longitudinal Analysis Bob Feehan -Bob Feehan

My Data

Crossed Factors at total analysis:

• Infusion (Saline/Vit C), Timepoint (Pre/Post), Cooling (BL + every 2 minutes), & Subjects (1-20)

Nested Factors at Total Analysis:• Subjects and Group (Subjects are nested within Groups because

Subjects have either a Young or Old attached to it, not both.

Repeated Measures and Time:

• Each factor takes a repeated measure but the only longitudinal design in the 20 min cooling that has more then one non random level (it has 11). Subjects do not count as they are considered random.

Page 23: Repeated Measures/Longitudinal Analysis Bob Feehan -Bob Feehan

SBP and HR Hypotheses Hypotheses on Systolic BP Change due to cooling while adding Vitamin C:1. Young and Older Saline Days should NOT differ (accept Null hypothesis)*2. Young and Older VitC days could Differ (reject Null Hypothesis)*3. We can use Change in SBP as a standardization for different starting points4. Older’s Change in SBP will be blunted compared to Younger’s*

Hypotheses on HR changes due to cooling while adding Vitamin C:1. Young and Older Saline Days should NOT differ (accept Null hypothesis)*2. Young and Older VitC days should NOT differ (accept Null hypothesis)*3. We can use Change in HR as a standardization for different starting points4. Older’s Change is HR should not change from Younger’s*

*Old published Data supports it