Correlated-Samples ANOVA The Univariate Approach.

Slides:



Advertisements
Similar presentations
Within Subjects Designs
Advertisements

A. The Basic Principle We consider the multivariate extension of multiple linear regression – modeling the relationship between m responses Y 1,…,Y m and.
Randomized Experimental Design
1 Chapter 4 Experiments with Blocking Factors The Randomized Complete Block Design Nuisance factor: a design factor that probably has an effect.
Chapter 4 Randomized Blocks, Latin Squares, and Related Designs
Analysis of variance (ANOVA)-the General Linear Model (GLM)
Modeling Continuous Longitudinal Data. Introduction to continuous longitudinal data: Examples.
ANOVA notes NR 245 Austin Troy
Analysis of variance (ANOVA)-the General Linear Model (GLM)
C82MST Statistical Methods 2 - Lecture 7 1 Overview of Lecture Advantages and disadvantages of within subjects designs One-way within subjects ANOVA Two-way.
RESEARCH STATISTICS Jobayer Hossain Larry Holmes, Jr, November 20, 2008 Analysis of Variance.
Part I – MULTIVARIATE ANALYSIS
Analysis of Variance: Inferences about 2 or More Means
ANCOVA Psy 420 Andrew Ainsworth. What is ANCOVA?
Intro to Statistics for the Behavioral Sciences PSYC 1900 Lecture 17: Repeated-Measures ANOVA.
PSY 307 – Statistics for the Behavioral Sciences
Chapter 14 Conducting & Reading Research Baumgartner et al Chapter 14 Inferential Data Analysis.
Experimental Design Terminology  An Experimental Unit is the entity on which measurement or an observation is made. For example, subjects are experimental.
Lecture 9: One Way ANOVA Between Subjects
Two Groups Too Many? Try Analysis of Variance (ANOVA)
Repeated Measures ANOVA Cal State Northridge  320 Andrew Ainsworth PhD.
Analysis of Variance & Multivariate Analysis of Variance
Chapter 14 Inferential Data Analysis
Two-Way Balanced Independent Samples ANOVA Overview of Computations.
Two-Way Balanced Independent Samples ANOVA Computations Contrasts Confidence Intervals.
Chapter 12: Analysis of Variance
ANOVA Chapter 12.
ANCOVA Lecture 9 Andrew Ainsworth. What is ANCOVA?
ANOVA Greg C Elvers.
1 Experimental Statistics - week 6 Chapter 15: Randomized Complete Block Design (15.3) Factorial Models (15.5)
Chapter 11 HYPOTHESIS TESTING USING THE ONE-WAY ANALYSIS OF VARIANCE.
t(ea) for Two: Test between the Means of Different Groups When you want to know if there is a ‘difference’ between the two groups in the mean Use “t-test”.
Chapter 13 Analysis of Variance (ANOVA) PSY Spring 2003.
ANOVA (Analysis of Variance) by Aziza Munir
Testing Multiple Means and the Analysis of Variance (§8.1, 8.2, 8.6) Situations where comparing more than two means is important. The approach to testing.
Correlated-Samples ANOVA The Multivariate Approach One-Way.
Psychology 301 Chapters & Differences Between Two Means Introduction to Analysis of Variance Multiple Comparisons.
Two-Way Balanced Independent Samples ANOVA Computations.
Repeated Measurements Analysis. Repeated Measures Analysis of Variance Situations in which biologists would make repeated measurements on same individual.
1 G Lect 14a G Lecture 14a Examples of repeated measures A simple example: One group measured twice The general mixed model Independence.
Chapter 10: Analyzing Experimental Data Inferential statistics are used to determine whether the independent variable had an effect on the dependent variance.
Repeated-measures ANOVA When subjects are tested on two or more occasions “Repeated measures” or “Within subjects” design Repeated Measures ANOVA But,
General Linear Model 2 Intro to ANOVA.
ANOVA: Analysis of Variance.
Adjusted from slides attributed to Andrew Ainsworth
Chapter 14 Repeated Measures and Two Factor Analysis of Variance
1 Experimental Statistics - week 14 Multiple Regression – miscellaneous topics.
1 ANALYSIS OF VARIANCE (ANOVA) Heibatollah Baghi, and Mastee Badii.
More sophisticated ANOVA applications Repeated measures and factorial PSY SP2003.
Stats Lunch: Day 8 Repeated-Measures ANOVA and Analyzing Trends (It’s Hot)
1 Experimental Statistics - week 9 Chapter 17: Models with Random Effects Chapter 18: Repeated Measures.
1/87 Group 5 AMS 572 Professor: Wei Zhu. Foram Sanghvi :Brief review of ANOVA Shihui Xiang: Introduction to Repeated Measures Design Qianzhu Wu: One-way.
Chapter 15Prepared by Samantha Gaies, M.A.1 Let’s start with an example … A high school gym instructor would like to test the effectiveness of a behavior.
Two-Way (Independent) ANOVA. PSYC 6130A, PROF. J. ELDER 2 Two-Way ANOVA “Two-Way” means groups are defined by 2 independent variables. These IVs are typically.
1 Experimental Statistics Spring week 6 Chapter 15: Factorial Models (15.5)
Chapter 4 Analysis of Variance
IE241: Introduction to Design of Experiments. Last term we talked about testing the difference between two independent means. For means from a normal.
Other Types of t-tests Recapitulation Recapitulation 1. Still dealing with random samples. 2. However, they are partitioned into two subsamples. 3. Interest.
Introduction to ANOVA Research Designs for ANOVAs Type I Error and Multiple Hypothesis Tests The Logic of ANOVA ANOVA vocabulary, notation, and formulas.
Experimental Statistics - week 9
ANOVA Overview of Major Designs. Between or Within Subjects Between-subjects (completely randomized) designs –Subjects are nested within treatment conditions.
HIERARCHICAL LINEAR MODELS. NESTED DESIGNS A factor A is said to be nested in factor B if the levels of A are divided among the levels of B. This is given.
1 Experimental Statistics - week 8 Chapter 17: Mixed Models Chapter 18: Repeated Measures.
MANOVA Lecture 12 Nuance stuff Psy 524 Andrew Ainsworth.
Factorial BG ANOVA Psy 420 Ainsworth. Topics in Factorial Designs Factorial? Crossing and Nesting Assumptions Analysis Traditional and Regression Approaches.
Differences Among Groups
Repeated Measures ANOVA Prof. Wei Zhu Department of Applied Mathematics & Statistics Stony Brook University.
Modeling Continuous Longitudinal Data
Statistics for the Social Sciences
Introduction to ANOVA.
Presentation transcript:

Correlated-Samples ANOVA The Univariate Approach

An ANOVA Factor Can Be Independent Samples –Between Subjects Correlated Samples –Within Subjects, Repeated Measures –Randomized Blocks, Split Plot Matched Pairs if k = 2

The Design DV = cumulative duration of headaches Factor 1 = Weeks Factor 2 = Subjects (crossed with weeks) The first two weeks represent a baseline period. The remaining three weeks are the treatment weeks. The treatment was designed to reduce headaches.

The Data SubjectWk1Wk2Wk3Wk4Wk

Crossed and Nested Factors Subjects is crossed with Weeks here – we have score for each subject at each level of Week. That is, we have a Weeks x Subjects ANOVA. In independent samples ANOVA subjects is nested within the other factor –If I knew the subject ID, I would know which treatment e got.

Order Effects Suppose the within-subjects effect was dose of drug given (0, 5, 10 mg) DV = score on reaction time task. All subject tested first at 0 mg, second at 5 mg, and thirdly at 10 mg Are observed differences due to dose of drug or the effect of order Practice effects and fatigue effects

Complete Counterbalancing There are k! possible orderings of the treatments. Run equal numbers of subjects in each of the possible orderings. Were k = 5, that would be 120 different orderings.

Asymmetrical Transfer We assume that the effect of A preceding B is the same as the effect of B preceding A. Accordingly, complete counterbalancing will cancel out any order effects If there is asymmetrical transfer, it will not.

Incomplete Counterbalancing Each treatment occurs once in each ordinal position. Latin Square A B C D E E A B C D D E A B C C D E A B B C D E A

Power If the correlations between conditions are positive and substantial, power will be greater than with the independent samples designs Even though error df will be reduced Because we are able to remove subject effects from the error term Decreasing the denominator of the F ratio.

Reducing Extraneous Variance Matched pairs, randomized blocks, split- plot. Repeated measures or within-subjects. Variance due to the blocking variable is removed from error variance.

Partitioning the SS The sum of all 5 x 9 = 45 squared scores is 11,060. The correction for the mean, CM, is (596) 2 / 45 = = The total SS is then 11,060 ‑ =

SS weeks From the marginal totals for week we compute the SS for the main effect of Week as: ( ) / 9 ‑ = W j is the sum of scores for the j th week.

SS Subjects From the subject totals, the SS for subjects is: ( ) / 5 ‑ = S is the sum of score for one subject

SS error We have only one score in each of the 5 weeks x 9 subjects = 45 cells. So the traditional within-cells error variance does not exist. The appropriate error term is the Subjects x Weeks Interaction. SS Subjects x Weeks = SS total – SS subjects – SS weeks = ‑ ‑ =

df, MS, F, p The df are computed as usual in a factorial ANOVA ‑‑ (s ‑ 1) = (9 ‑ 1) = 8 for Subjects, (w ‑ 1) = (5 ‑ 1) = 4 for Week, and 8 x 4 = 32 for the interaction. The F(4, 32) for the effect of Week is then (2449.2/4) / (230.4/32) = 612.3/7.2 = 85.04, p <.01.

Assumptions Normality Homogeneity of Variance Sphericity –For each (ij) pair of levels of the Factor –Compute (Y i  Y j ) for each subject –The standard deviation of these difference scores is constant – that is, you get the same SD regardless of which pair of levels you select.

Sphericity Test it with Mauchley’s criterion Correct for violation of sphericity by using a procedure that adjust downwards the df Or by using a procedure that does not assume sphericity.

Mixed Designs You may have one or more correlated ANOVA factors and one or more independent ANOVA factors

Multiple Comparisons You can employ any of the procedures that we earlier applied with independent samples ANOVA. Example: I want to compare the two baseline weeks with the three treatment weeks. The means are ( )/18 = for baseline, ( )/27 = 7.30 for treatment.

t The 7.20 is the MSE from the overall analysis. df = 32, from the overall analysis p <.01

Controlling  FW Compute –And use it for Tukey or related procedure Or apply a Bonferroni or Sidak procedure For example, Week 2 versus Week 3 t = (22 ‑ 9.33)/SQRT(7.2(1/9 + 1/9)) = 10.02, q = * SQRT(2) = For Tukey, with r = 5 levels, and 32 df, critical q.01 = 5.05

Heterogenity of Variance If suspected, use individual error terms for a posteriori comparisons –Error based only on the two levels being compared. –For Week 2 versus Week 3, t(8) = 10.75, q(8) = 15.2 –Notice the drop in df

SAS WS-ANOVA.sas Proc Anova; Class subject week; Model duration = subject week; SAS will use SS error = SS total – SS subjects – SS weeks

SourceDFAnova SS Mean Square F ValuePr > F subject <.0001 week <.0001 SourceDFSum of Squares Mean Square F ValuePr > F Model <.0001 Error Corrected Total

Data in Multivariate Setup data ache; input subject week1-week5; d23 = week2-week3; cards; And data for three more subjects

Week 2 versus Week 3 proc anova; model week2 week3 = / nouni; repeated week 2 / nom; The value of F here is just the square of the value of t, 10.75, reported on Slide 23, with an individual error term. SourceDFAnova SS Mean Square F ValuePr > F week <.0001 Error(week)

proc means mean t prt; var d23 week1-week5;

Proc Anova; Model week1-week5 = / nouni; Repeated week 5 profile / summary printe; Sphericity Tests VariablesDFMauchly's Criterion Chi-SquarePr > ChiSq Orthogonal Components We retain the null that there is sphericity.

Univariate Tests of Hypotheses for Within Subject Effects SourceDFAnova SS Mean Square F Value Pr > FAdj Pr > F G - GH - F week <.0001 Error(week) Greenhouse-Geisser Epsilon Huynh-Feldt Epsilon1.0756

Epsilon Used to correct for lack of sphericity Multiply both numerator and denominator df by epsilon. For example: Degrees of freedom were adjusted according to Greenhouse and Geisser to correct for violation of the assumption of sphericity. Duration of headches changed significantly across the weeks, F(2.7, 21.9) = 85.04, MSE = 7.2, p <.001.

Which Epsilon to Use? The G-G correction is more conservative (less power) than the H-F correction. If both the G-G and the H-F are near or above.75, it is probably best to use the H-F.

Profile Analysis Compares each level with the next level, using individual error. Look at the output. –Week 1 versus Week 2, p =.85 –Week 2 versus Week 3, p <.001 –Week 3 versus Week 4, p =.002 –Week 4 versus Week 5, p =.29

Multivariate Analysis MANOVA Test Criteria and Exact F Statistics for the Hypothesis of no week Effect StatisticValueF Value Num DF Den DF Pr > F Wilks' Lambda <.0001 Pillai's Trace <.0001 Hotelling- Lawley Trace <.0001 Roy's Greatest Root <.0001

Strength of Effect  2 = SS weeks / SS total = / =.774 Alternatively, if we remove from the denominator variance due to subject,

Higher-Order Mixed or Repeated Univariate Models If the effect contains only between- subjects factors, the error term is Subjects(nested within one or more factors). For any effect that includes one or more within-subjects factors the error term is the interaction between Subjects and those one or more within- subjects factors.

AxBxS Two-Way Repeated Measures CLASS A B S; MODEL Y=A|B|S; TEST H=A E=A  S; TEST H=B E=B  S; TEST H=A  B E=A  B  S; MEANS A|B;

Ax(BxS) Mixed (B Repeated) CLASS A B S; MODEL Y=A|B|S(A); TEST H=A E=S(A); TEST H=B A  B E=B  S(A); MEANS A|B;

AxBx(CxS) Three-Way Mixed (C Repeated) CLASS A B C S; MODEL Y=A|B|C|S(A B); TEST H=A B A  B E=S(A B); TEST H=C A  C B  C A  B  C E=C  S(A B); MEANS A|B|C;

Ax(BxCxS) Mixed (B and C Repeated) CLASS A B C S; MODEL Y=A|B|C|S(A); TEST H=A E=S(A); TEST H=B A  B E=B  S(A); TEST H=C A  C E=C  S(A); TEST H=B  C A  B  C E=B  C  S(A); MEANS A|B|C;

AxBxCxS All Within CLASS A B C S; MODEL Y=A|B|C|S; TEST H=A E=A  S; TEST H=B E=B  S; TEST H=C E=C  S; TEST H=A  B E=A  B  S; TEST H=A  C E=A  C  S; TEST H=B  C E=B  C  S; TEST H=A  B  C E=A  B  C  S; MEANS A|B|C;