Linear Models Two-Way ANOVA. LM ANOVA 2 2 Example -- Background Bacteria -- effect of temperature (10 o C & 15 o C) and relative humidity (20%, 40%, 60%,

Slides:



Advertisements
Similar presentations
2 factor ANOVA. Drug ADrug BDrug C High doseSample 1Sample 2Sample 3 Low doseSample 4Sample 5Sample 6 2 X 3 Dose by drug (row by column)
Advertisements

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
STT 511-STT411: DESIGN OF EXPERIMENTS AND ANALYSIS OF VARIANCE Dr. Cuixian Chen Chapter 14: Nested and Split-Plot Designs Design & Analysis of Experiments.
Analysis of Variance (ANOVA). When ANOVA is used.. All the explanatory variables are categorical (factors) Each factor has two or more levels Example:Example:
PSY 307 – Statistics for the Behavioral Sciences
Generalized Linear Models (GLM)
Nested Designs Study vs Control Site. Nested Experiments In some two-factor experiments the level of one factor, say B, is not “cross” or “cross classified”
N-way ANOVA. Two-factor ANOVA with equal replications Experimental design: 2  2 (or 2 2 ) factorial with n = 5 replicate Total number of observations:
TWO-WAY BETWEEN SUBJECTS ANOVA Also called: Two-Way Randomized ANOVA Also called: Two-Way Randomized ANOVA Purpose: Measure main effects and interaction.
The Two Factor ANOVA © 2010 Pearson Prentice Hall. All rights reserved.
Basics of ANOVA Why ANOVA Assumptions used in ANOVA Various forms of ANOVA Simple ANOVA tables Interpretation of values in the table Exercises.
Basics of ANOVA Why ANOVA Assumptions used in ANOVA
Part I – MULTIVARIATE ANALYSIS
Basics of ANOVA Why ANOVA Assumptions used in ANOVA
Lesson #23 Analysis of Variance. In Analysis of Variance (ANOVA), we have: H 0 :  1 =  2 =  3 = … =  k H 1 : at least one  i does not equal the others.
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.
1 Chapter 5 Introduction to Factorial Designs Basic Definitions and Principles Study the effects of two or more factors. Factorial designs Crossed:
Analysis of variance (3). Normality Check Frequency histogram (Skewness & Kurtosis) Probability plot, K-S test Normality Check Frequency histogram (Skewness.
PSY 307 – Statistics for the Behavioral Sciences Chapter 19 – Chi-Square Test for Qualitative Data Chapter 21 – Deciding Which Test to Use.
Outline Single-factor ANOVA Two-factor ANOVA Three-factor ANOVA
Biostatistics-Lecture 9 Experimental designs Ruibin Xi Peking University School of Mathematical Sciences.
T WO W AY ANOVA W ITH R EPLICATION  Also called a Factorial Experiment.  Factorial Experiment is used to evaluate 2 or more factors simultaneously. 
T WO WAY ANOVA WITH REPLICATION  Also called a Factorial Experiment.  Replication means an independent repeat of each factor combination.  The purpose.
Understanding the Two-Way Analysis of Variance
© Department of Statistics 2012 STATS 330 Lecture 18 Slide 1 Stats 330: Lecture 18.
Basics of ANOVA Why ANOVA Assumptions used in ANOVA Various forms of ANOVA Simple ANOVA tables Interpretation of values in the table Exercises.
230 Jeopardy Unit 4 Chi-Square Repeated- Measures ANOVA Factorial Design Factorial ANOVA Correlation $100 $200$200 $300 $500 $400 $300 $400 $300 $400 $500.
Design of Engineering Experiments Part 4 – Introduction to Factorials
Analysis of Variance (Two Factors). Two Factor Analysis of Variance Main effect The effect of a single factor when any other factor is ignored. Example.
© Copyright McGraw-Hill CHAPTER 12 Analysis of Variance (ANOVA)
Copyright © 2004 Pearson Education, Inc.
Inferential Statistics
ANALYSIS OF VARIANCE (ANOVA) BCT 2053 CHAPTER 5. CONTENT 5.1 Introduction to ANOVA 5.2 One-Way ANOVA 5.3 Two-Way ANOVA.
Design Of Experiments With Several Factors
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved. 1 Understandable Statistics S eventh Edition By Brase and Brase Prepared by: Lynn Smith.
Factorial Analysis of Variance
1 Always be mindful of the kindness and not the faults of others.
Lack of Fit (LOF) Test A formal F test for checking whether a specific type of regression function adequately fits the data.
Stats/Methods II JEOPARDY. Jeopardy Compare & Contrast Repeated- Measures ANOVA Factorial Design Factorial ANOVA Surprise $100 $200$200 $300 $500 $400.
ETM U 1 Analysis of Variance (ANOVA) Suppose we want to compare more than two means? For example, suppose a manufacturer of paper used for grocery.
Linear Models One-Way ANOVA. 2 A researcher is interested in the effect of irrigation on fruit production by raspberry plants. The researcher has determined.
Smith/Davis (c) 2005 Prentice Hall Chapter Fifteen Inferential Tests of Significance III: Analyzing and Interpreting Experiments with Multiple Independent.
Statistics for the Social Sciences
ANOVA Overview of Major Designs. Between or Within Subjects Between-subjects (completely randomized) designs –Subjects are nested within treatment conditions.
1 Mixed and Random Effects Models 1-way ANOVA - Random Effects Model 1-way ANOVA - Random Effects Model 2-way ANOVA - Mixed Effects Model 2-way ANOVA -
Fixed effects analysis in a Two–way ANOVA. Problem 5.6 Layout.
Joyful mood is a meritorious deed that cheers up people around you like the showering of cool spring breeze.
Factorial BG ANOVA Psy 420 Ainsworth. Topics in Factorial Designs Factorial? Crossing and Nesting Assumptions Analysis Traditional and Regression Approaches.
Advanced Math Topics One-Way Anova. An ANOVA is an ANalysis Of VAriance. It is a table used to see if the means from a number of samples are.
Analysis of Variance Yonghui Dong 03/12/2013. Why not multiple t tests comparison? Three Groups comparison: Group 1 vs. Group 2 Group 1 vs. Group 3 Group.
Chapter 14 Repeated Measures and Two Factor Analysis of Variance PowerPoint Lecture Slides Essentials of Statistics for the Behavioral Sciences Seventh.
Design and Analysis of Experiments
Analysis of Variance -ANOVA
Factorial Experiments
Two way ANOVA with replication
Two-way ANOVA problems
An Introduction to Two-Way ANOVA
Two way ANOVA with replication
Chapter 5 Introduction to Factorial Designs
ANOVA Terms — Sums of Squares
IE-432 Design Of Industrial Experiments
Ch. 14: Comparisons on More Than Two Conditions
Two-Factor Studies with Equal Replication
Two-Factor Studies with Equal Replication
Example of chai square test (1) false dice
Two-way analysis of variance (ANOVA)
Two-way ANOVA problems
Presentation transcript:

Linear Models Two-Way ANOVA

LM ANOVA 2 2 Example -- Background Bacteria -- effect of temperature (10 o C & 15 o C) and relative humidity (20%, 40%, 60%, 80%) on growth rate (cells/d). 120 petri dishes with a growth medium available Growth chambers where all environmental variables can be controlled. What is the response variable, factor(s), level(s), treatment(s), replicates per treatment?

LM ANOVA 2 3 Factorial or Crossed Design Each treatment is a combination of both factors. Relative Humidity 20%40%60%80% Temp 10 o C 15 o C

LM ANOVA 2 4 Factorial or Crossed Design Advantages (over two OFAT experiments) –Efficiency – each individual “gives information” about each level of BOTH factors. Relative Humidity 20%40%60%80% Temp 10 o C15 15 o C15 TempRelative Humidity 10 o C15 o C20%40%60%80% 20

LM ANOVA 2 5 Factorial or Crossed Design Advantages (over two OFAT experiments) –Efficiency – individuals “give information” about each level of BOTH factors. Power – increased due to increased effective n. Effect Size – detect smaller differences –Interaction effect – can be detected.

LM ANOVA 2 6 Interaction Effect Effect of one factor on the response variable differs depending on level of the other factor. Relative Humidity 20%40%60%80% Temp 10 o C o C

LM ANOVA 2 7 No Interaction Effect Relative Humidity 20%40%60%80% Temp 10 o C o C691214

LM ANOVA 2 8 Main Effects Differences in “level” means for a factor “Strong” relative humidity main effect “Weak” temperature main effect. Relative Humidity 20%40%60%80% Temp 10 o C o C

LM ANOVA 2 9 Main Effects “Strong” relative humidity main effect “Weak” temperature main effect.

LM ANOVA 2 10 No Effects

LM ANOVA 2 11 Humidity Effect Only

LM ANOVA 2 12 Temperature Effect Only

LM ANOVA 2 13 Humidity and Temperature Effects

LM ANOVA 2 14 Interaction Effect

LM ANOVA 2 15 Example #1 Interaction Effect Factor 1 Main Effect Factor 2 Main Effect √ √ ×

LM ANOVA 2 16 Example #2 Interaction Effect Factor 1 Main Effect Factor 2 Main Effect × √ ×

LM ANOVA 2 17 Interaction Effect Factor 1 Main Effect Factor 2 Main Effect Example #3 √

LM ANOVA 2 18 Example #4 Interaction Effect Factor 1 Main Effect Factor 2 Main Effect × √ ×

LM ANOVA 2 19 Interaction Effect Factor 1 Main Effect Factor 2 Main Effect Example #5 √

LM ANOVA 2 20 Interaction Effect Factor 1 Main Effect Factor 2 Main Effect Example #6 √

LM ANOVA 2 21 Example #7 Interaction Effect Factor 1 Main Effect Factor 2 Main Effect × √ √

LM ANOVA 2 22 Interaction Effect Factor 1 Main Effect Factor 2 Main Effect Example #8 √

LM ANOVA 2 23 Example #9 Interaction Effect Factor 1 Main Effect Factor 2 Main Effect × × √

LM ANOVA 2 24 Interaction Effect Factor 1 Main Effect Factor 2 Main Effect Example #10 √

LM ANOVA 2 25 Terminology / Symbols One factor is “row” factor –r = number of levels Other factor is “column” factor –c = number of levels Y ijk = response variable for k th individual in i th level of row factor and j th level of column factor for simplicity, assume n is same for all i,j

LM ANOVA 2 26 Terminology / Symbols Column Factor 12…c Row Factor 1… 2… ……………… r… …  Y 11.  Y 12.  Y 1c.  Y 21.  Y 22.  Y 2c.  Y r1.  Y r2.  Y rc. Y.1.Y.1. Y.c.Y.c. Y.2.Y.2.  Y 1..  Y 2..  Y r..  Y... Treatment meansLevel meansGrand mean

LM ANOVA 2 27 Example What is the optimal temperature (27,35,43 o C) and concentration (0.6,0.8,1.0,1.2,1.4% by weight) of the nutrient, tryptone, for culturing the Staphylococcus aureus bacterium. Each treatment was repeated twice. The number of bacteria was recorded in millions CFU/mL (CFU=Colony Forming Units).

LM ANOVA 2 28 Example -- Bacteria Concentration Temp What kind of effects are apparent?

LM ANOVA 2 29 Example -- Bacteria What kind of effects are apparent?

LM ANOVA Way ANOVA Purpose Determine significance of interaction and, if appropriate, two main effects. Are differences in means “different enough” given sampling variability?

LM ANOVA Way ANOVA Calculations MS Within is variability about ultimate full model MS Total is variability about ultimate simple model if MS Among is large relative to MS Within then ultimate full model is warranted –i.e., some difference in treatment means –implies differences due to row factor, column factor, or interaction between the two SS Among = SS Row + SS Col + SS Interaction If MS Row is large relative to MS Within then a difference due to the row factor is indicated –Similar argument for column and interaction effects

LM ANOVA Way ANOVA Calculations SS Among = SS Row + SS Column + SS Interaction

LM ANOVA Way ANOVA Calculations SS Row =cn     r 1i i YY SS Column =rn     c 1i j YY Column Factor 12…c Row Factor 1… 2… ……………… r… …  Y 11.  Y 12.  Y 1c.  Y 21.  Y 22.  Y 2c.  Y r1.  Y r2.  Y rc. Y.1.Y.1. Y.c.Y.c. Y.2.Y.2.  Y 1..  Y 2..  Y r..  Y...

LM ANOVA 2 34 Two-Way ANOVA Table Source df SS MS F. Row r-1 SS Row SS Row /[r-1] MS Row /MS Within Column c-1 SS Col SS Col /[c-1] MS Col /MS Within Inter (r-1)(c-1) SS Int SS Int /[(r-1)(c-1)] MS Int /MS Within Within rc(n-1) SS Within SS Within /[rc(n-1)] Total rcn-1 SS Total

LM ANOVA 2 35 Example -- ANOVA Analysis of Variance Table Response: cells Df Sum Sq Mean Sq F value Pr(>F) ftemp fconc e-05 ftemp:fconc Residuals Weak Interaction; Nonsignificant Significant concentration effect Nonsignificant temperature effect

LM ANOVA 2 36 Example -- ANOVA

LM ANOVA 2 37 Example -- ANOVA Linear Hypotheses: Estimate Std. Error t value p value == == == <0.01 *** == * == == <0.01 *** == == <0.01 ** == == <0.01 **

LM ANOVA 2 38 Example -- ANOVA a ab c b a a

Review Handout – Example 1 lm() anova() glht() fitPlot() addSigLetters() LM ANOVA 2 39

LM ANOVA 2 40 Assumptions and Checking in R Same as for the one-way ANOVA

LM ANOVA 2 41 Example Measured soil phosphorous levels in plots near Sydney, Australia. Each plot was characterized by type of soil (shale- or sandstone-derived) and “topographic” location (valley, north, south, or hillside). Data in SoilPhosphorous.txt Does mean soil phosphorous level differ by soil type or topographic location? Is there an interaction effect?