More complicated ANOVA models: two-way and repeated measures Chapter 12 Zar Chapter 11 Sokal & Rohlf First, remember your ANOVA basics……….

Slides:



Advertisements
Similar presentations
Research Support Center Chongming Yang
Advertisements

Multiple Comparisons in Factorial Experiments
Chapter 11 Analysis of Variance
2  How to compare the difference on >2 groups on one or more variables  If it is only one variable, we could compare three groups with multiple ttests:
Chapter Fourteen The Two-Way Analysis of Variance.
1 SSS II Lecture 1: Correlation and Regression Graduate School 2008/2009 Social Science Statistics II Gwilym Pryce
Factorial and Mixed Factor ANOVA and ANCOVA
Generalized Linear Models (GLM)
Some Terms Y =  o +  1 X Regression of Y on X Regress Y on X X called independent variable or predictor variable or covariate or factor Which factors.
The Two Factor ANOVA © 2010 Pearson Prentice Hall. All rights reserved.
ANOVA notes NR 245 Austin Troy
Part I – MULTIVARIATE ANALYSIS
ANalysis Of VAriance (ANOVA) Comparing > 2 means Frequently applied to experimental data Why not do multiple t-tests? If you want to test H 0 : m 1 = m.
Chapter 14 Conducting & Reading Research Baumgartner et al Chapter 14 Inferential Data Analysis.
Analysis of Variance & Multivariate Analysis of Variance
Intro to Statistics for the Behavioral Sciences PSYC 1900
Factorial Designs More than one Independent Variable: Each IV is referred to as a Factor All Levels of Each IV represented in the Other IV.
Intro to Statistics for the Behavioral Sciences PSYC 1900 Lecture 14: Factorial ANOVA.
Comparing Several Means: One-way ANOVA Lesson 14.
Biostatistics-Lecture 9 Experimental designs Ruibin Xi Peking University School of Mathematical Sciences.
Understanding the Two-Way Analysis of Variance
Two-Way Analysis of Variance STAT E-150 Statistical Methods.
Module 32: Multiple Regression This module reviews simple linear regression and then discusses multiple regression. The next module contains several examples.
Chapter 12: Analysis of Variance
ANOVA Chapter 12.
1 Advances in Statistics Or, what you might find if you picked up a current issue of a Biological Journal.
Statistical Techniques I EXST7005 Factorial Treatments & Interactions.
Topic 28: Unequal Replication in Two-Way ANOVA. Outline Two-way ANOVA with unequal numbers of observations in the cells –Data and model –Regression approach.
Copyright © 2013, 2010 and 2007 Pearson Education, Inc. Chapter Comparing Three or More Means 13.
 Combines linear regression and ANOVA  Can be used to compare g treatments, after controlling for quantitative factor believed to be related to response.
Analysis of Covariance ANOVA is a class of statistics developed to evaluate controlled experiments. Experimental control, random selection of subjects,
23-1 Analysis of Covariance (Chapter 16) A procedure for comparing treatment means that incorporates information on a quantitative explanatory variable,
Correlation and Regression Used when we are interested in the relationship between two variables. NOT the differences between means or medians of different.
Psychology 301 Chapters & Differences Between Two Means Introduction to Analysis of Variance Multiple Comparisons.
GENERAL LINEAR MODELS Oneway ANOVA, GLM Univariate (n-way ANOVA, ANCOVA)
Chapter 10: Analyzing Experimental Data Inferential statistics are used to determine whether the independent variable had an effect on the dependent variance.
The Completely Randomized Design (§8.3)
ANALYSIS OF VARIANCE (ANOVA) BCT 2053 CHAPTER 5. CONTENT 5.1 Introduction to ANOVA 5.2 One-Way ANOVA 5.3 Two-Way ANOVA.
March 28, 30 Return exam Analyses of covariance 2-way ANOVA Analyses of binary outcomes.
Educational Research Chapter 13 Inferential Statistics Gay, Mills, and Airasian 10 th Edition.
Chapter 13 Multiple Regression
Factorial Analysis of Variance
Lecture 9-1 Analysis of Variance
Analysis of Covariance Combines linear regression and ANOVA Can be used to compare g treatments, after controlling for quantitative factor believed to.
Topic 26: Analysis of Covariance. Outline One-way analysis of covariance –Data –Model –Inference –Diagnostics and rememdies Multifactor analysis of covariance.
PSYC 3030 Review Session April 19, Housekeeping Exam: –April 26, 2004 (Monday) –RN 203 –Use pencil, bring calculator & eraser –Make use of your.
1 ANALYSIS OF VARIANCE (ANOVA) Heibatollah Baghi, and Mastee Badii.
Copyright © 2013, 2009, and 2007, Pearson Education, Inc. Chapter 14 Comparing Groups: Analysis of Variance Methods Section 14.3 Two-Way ANOVA.
General Linear Model.
Handout Eight: Two-Way Between- Subjects Design with Interaction- Assumptions, & Analyses EPSE 592 Experimental Designs and Analysis in Educational Research.
Introduction to ANOVA Research Designs for ANOVAs Type I Error and Multiple Hypothesis Tests The Logic of ANOVA ANOVA vocabulary, notation, and formulas.
ANOVA Overview of Major Designs. Between or Within Subjects Between-subjects (completely randomized) designs –Subjects are nested within treatment conditions.
ANCOVA.
Biostatistics Regression and Correlation Methods Class #10 April 4, 2000.
Factorial BG ANOVA Psy 420 Ainsworth. Topics in Factorial Designs Factorial? Crossing and Nesting Assumptions Analysis Traditional and Regression Approaches.
Slide Slide 1 Copyright © 2007 Pearson Education, Inc Publishing as Pearson Addison-Wesley. Lecture Slides Elementary Statistics Tenth Edition and the.
29 October 2009 MRC CBU Graduate Statistics Lectures 4: GLM: The General Linear Model - ANOVA & ANCOVA1 MRC Cognition and Brain Sciences Unit Graduate.
Education 793 Class Notes ANCOVA Presentation 11.
Six Easy Steps for an ANOVA 1) State the hypothesis 2) Find the F-critical value 3) Calculate the F-value 4) Decision 5) Create the summary table 6) Put.
An Introduction to Two-Way ANOVA
i) Two way ANOVA without replication
Comparing Three or More Means
12 Inferential Analysis.
Comparing Several Means: ANOVA
Chapter 13 Group Differences
12 Inferential Analysis.
Analysis of Variance ANOVA.
Chapter 9: Differences among Groups
STATISTICS INFORMED DECISIONS USING DATA
Presentation transcript:

More complicated ANOVA models: two-way and repeated measures Chapter 12 Zar Chapter 11 Sokal & Rohlf First, remember your ANOVA basics……….

Plot number Yield (tonnes) -Total SS in 1-way ANOVA -Deviations around total mean Fert 1 Fert 2 Fert 3 Overall mean

Plot number Yield (tonnes) Fert 1 Fert 2 Fert 3 Group means Within group SS= deviations around group means

Plot number Yield (tonnes) Fert 1 Fert 2 Fert 3 Overall mean Group means Among groups SS=deviations of group means from overall mean

Mean squares Combine information on SS and df Total mean squares = total SS/ total df total variance of data set Within group mean squares = within SS/ within df variance (per df) among units given same treatment Among groups mean squares = among SS / among df variance (per df) among units given different treatments Unfortunate word usage Error MS

Among groups mean squares Within group mean squares F =  The question: Does fitting the treatment mean explain a significant amount of variance? Compare calculated F to critical value from table (B4)

If calculated F as big or bigger than critical value, then reject H 0 But remember……. H0: m1 = m2 = m3 Need separate test (multiple comparison test) to tell which means differ from which

Factorial ANOVA= simultaneous analysis of the effect of more than one factor on population means -- Effect of light (or music) and water on plant growth -- Effect of drug treatment and gender on patient survival --Effect of turbidity and prey type on prey consumption by yellow perch --Effect of gender and income bracket on # pairs of shoes owned

Two-way ANOVA vs a nested (hierarchical) ANOVA see chapter 10 S& R Example: the effect of drug on quantity of skin pigment in rats. 5 drugs + 1 control= 6 groups (fixed effect) 5 rats per drug 3 skin samples per rat Each sample divided in to 2 lots, each hydrolyzed 2 optical density readings per hydrolyzed sample Random effects

Drug is the main factor of interest All other levels are subordinate Rat1 in drug treatment 1 is not the same as Rat1 in drug treatment 2 Above design is nested. Rats are nested within drug treatment, skin sample is nested within rat etc……. Can be mixed model (as in example) where primary effect is fixed (drug) but subordinate levels are random Or can be completely random model if the levels (eg drugs) were truly a random sample of all possible drugs

Two-way ANOVA, Two-factor ANOVA There must be correspondence across classes --Effect of turbidity level and prey type on prey consumption by yellow perch High and low turbidity must be the same across all prey types Turbidity could be random or fixed Prey type probably always fixed? -- Effect of drug treatment and gender on patient survival Drug treatments must be same for both genders Drug could be random or fixed Gender always fixed?

Terminology --Two factors A and B -- a = number of levels of A; starting with i -- b = number of levels of B; starting with j -- n = number replicates; starting with l -- Each combination of a level of A with a level of B is called a cell -- Cell analogous to groups in 1-way ANOVA --If there are 2 levels of 2 factors analysis called 2 x 2 factorial

Low AHigh A Low BLow A Low B High A Low B High BLow A High B High A High B cell

Total SS =    (X ijl –X) 2 a i=1 b j=1 n l=1 = (all deviations from grand mean) 2 Total DF = N-1

Among Cell SS = variability between cell means and grand mean --among cell DF= ab-1 --Analogous to among groups SS in 1-way ANOVA Within Cell SS = deviations from each cell mean --within cell DF = ab (n-1) --analogous to within groups SS in 1-way ANOVA

But……. Goal of 2-way ANOVA is to assess the affects of each of the 2 factors independently of each other --Consider A to be the only factor in a 1-way ANOVA (ignore B) Factor A SS = bn  (X i –X) 2 a i=1 Then --Consider B to be the only factor in a 1-way ANOVA Factor B SS = an  (X j –X) 2 b j=1

Now the tricky part…………… -- Among cell variability usually  variability among levels of A + variability among levels of B -- The unaccounted for variability is due to the effect of interaction -- Interaction means that the effect of A is not independent of the presence of a particular level of B --Interaction effect is in addition to the sum of the effects of each factor considered separately

With zmWithout zm Low lightWith zm Low light Without zm Low light High lightWith zm High light Without zm High light Grow algae two levels of light and with and without zebra mussels, 15 reps in each cell, N=60 Measure net primary production of the algae (NPP)

We will now graphically examine a range of outcomes of this 2x2 factorial ANVOA Some of the possible outcomes have below. Be prepared to discuss the meaning –ie, your interpretation of the graph with your name on it.

With zmWithout zm NPP (mgO2/m2/2hr) No difference of either factor and no interaction High light Low light Erin H.

With zmWithout zm NPP (mgO2/m2/2hr) Significant main effect of light High light Low light Dave H.

With zmWithout zm NPP (mgO2/m2/2hr) Significant main effect of ZM High light Low light Jhonathon

With zmWithout zm NPP (mgO2/m2/2hr) Both main effects are significant, but no interaction High light Low light Josh S. Anthony

With zmWithout zm NPP (mgO2/m2/2hr) Significant interaction, but no significant main effect High light Low light Colin Xiao-Jain

With zmWithout zm NPP (mgO2/m2/2hr) Interaction and the main light effect are significant High light Low light Rajan Coleen

With zmWithout zm NPP (mgO2/m2/2hr) Interaction and the main zm effet are significant High light Low light Chen-Lin Nan

With zmWithout zm NPP (mgO2/m2/2hr) High light Low light the interaction and both main effects are significant Reza Malak

With zmWithout zm NPP (mgO2/m2/2hr) High light Low light the interaction and both main effects are significant Chenxi Damien

How to in SAS: Data X; set Y; proc glm; class gender salary; model shoepair=gender salary gender*salary; Main effects interaction

Analysis of covariance (ANCOVA) -Testing for effects with one categorical and one continuous predictor variable -Testing for differences between two regressions -Some of the features of both regression and analysis of variance. -A continuous variable (the covariate) is introduced into the model of an analysis-of-variance experiment.

Initial assumption that there is a linear relationship between the response variable and the covariate If not, ANCOVA no advantage over simple ANOVA

Ex. Test of leprosy drug Variables = Drug- two antibiotics (A and D) & control (F) PreTreatment- a pre-treatment score of leprosy bacilli PostTreatment- a post-treatment score of leprosy bacilli -10 patients selected for each drug) -6 sites on each measured for leprosy bacilli. -Covariate = pretreatment score included in model for increased precision in determining the effect of drugs on the posttreatment count of bacilli.

data drugtest; input Drug $ PreTreatment PostTreatment datalines; A 11 6 A 8 0 A 5 2 A 14 8 A A 6 4 A A 6 1 A 11 8 A 3 0 D 6 0 D 6 2 D 7 3 D 8 1 D D 8 4 D D 8 9 D 5 1 D 15 9 F F F F 9 5 F F F 12 5 F F 7 1 F ; proc glm; class Drug; model PostTreatment = Drug PreTreatment Drug*PreTreatment / solution; run; Different way to read in data Define categorical variable Model dependent var=categorical variable covariate and categorical * covariate interaction

First, slopes must be equal to proceed with other comparisons. If interaction term significant- end of test If interaction term not significant can compare intercepts (means) SourceDFType I SSMean SquareF ValuePr > F Drug PreTreatment <.0001 SourceDFType III SSMean SquareF ValuePr > F Drug PreTreatment <.0001 ParameterEstimate Standard Errort ValuePr > |t| Intercept B Drug A B Drug D B Drug F B... PreTreatment <.0001 ** use Type III SS

Type I SS for Drug gives the between-drug sums of squares for ANOVA model PostTreatment=Drug. Measures difference between arithmetic means of posttreatment scores for different drugs, disregarding the covariate.

The Type III SS for Drug gives the Drug sum of squares adjusted for the covariate. Measures differences between Drug LS-means, controlling for the covariate. The Type I test is highly significant (p=0.001), but the Type III test is not. Therefore, while there is a statistically significant difference between the arithmetic drug means, this difference is not significant when you take the pretreatment scores into account.