Two-way analysis on variance

Slides:



Advertisements
Similar presentations
Topic 12: Multiple Linear Regression
Advertisements

Analysis of Variance (ANOVA) ANOVA methods are widely used for comparing 2 or more population means from populations that are approximately normal in distribution.
Factorial ANOVA More than one categorical explanatory variable.
Statistical Analysis Professor Lynne Stokes Department of Statistical Science Lecture #19 Analysis of Designs with Random Factor Levels.
Statistical Analysis Professor Richard F. Gunst Department of Statistical Science Lecture 16 Analysis of Data from Unbalanced Experiments.
Generalized Linear Models (GLM)
Statistics review Basic concepts: Variability measures Distributions Hypotheses Types of error Common analyses T-tests One-way ANOVA Randomized block ANOVA.
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:
Analysis of Variance: ANOVA. Group 1: control group/ no ind. Var. Group 2: low level of the ind. Var. Group 3: high level of the ind var.
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.
ARE OBSERVATIONS OBTAINED DIFFERENT?. ARE OBSERVATIONS OBTAINED DIFFERENT? You use different statistical tests for different problems. We will examine.
Comparing Several Means: One-way ANOVA Lesson 14.
1 Advances in Statistics Or, what you might find if you picked up a current issue of a Biological Journal.
Basics of ANOVA Why ANOVA Assumptions used in ANOVA Various forms of ANOVA Simple ANOVA tables Interpretation of values in the table Exercises.
Analysis of Covariance Harry R. Erwin, PhD School of Computing and Technology University of Sunderland.
Today: Quizz 8 Friday: GLM review Monday: Exam 2.
1 Experimental Statistics - week 4 Chapter 8: 1-factor ANOVA models Using SAS.
23-1 Analysis of Covariance (Chapter 16) A procedure for comparing treatment means that incorporates information on a quantitative explanatory variable,
Chapter 10: Analyzing Experimental Data Inferential statistics are used to determine whether the independent variable had an effect on the dependent variance.
April 4 Logistic Regression –Lee Chapter 9 –Cody and Smith 9:F.
March 28, 30 Return exam Analyses of covariance 2-way ANOVA Analyses of binary outcomes.
Three Statistical Issues (1) Observational Study (2) Multiple Comparisons (3) Censoring Definitions.
1 Experimental Statistics - week 14 Multiple Regression – miscellaneous topics.
PSYC 3030 Review Session April 19, Housekeeping Exam: –April 26, 2004 (Monday) –RN 203 –Use pencil, bring calculator & eraser –Make use of your.
By: Corey T. Williams 03 May Situation Objective.
1 Experimental Statistics - week 12 Chapter 12: Multiple Regression Chapter 13: Variable Selection Model Checking.
1 Experimental Statistics - week 9 Chapter 17: Models with Random Effects Chapter 18: Repeated Measures.
Lecture 3 Linear Models II Olivier MISSA, Advanced Research Skills.
1 Experimental Statistics Spring week 6 Chapter 15: Factorial Models (15.5)
Experimental Statistics - week 3
1 Experimental Statistics - week 13 Multiple Regression Miscellaneous Topics.
1 Experimental Statistics - week 8 Chapter 17: Mixed Models Chapter 18: Repeated Measures.
Université d’Ottawa / University of Ottawa 2001 Bio 4118 Applied Biostatistics L12.1 Lecture 12: Generalized Linear Models (GLM) What are they? When do.
Education 793 Class Notes ANCOVA Presentation 11.
Sports Medicine Example. Background Does Sports Med Fellowship have an impact? Study Design –Compare people with fellowship to those without on ABFM exams.
Two-way ANOVA The Two-Way ANOVA Model and Inference for Two-Way ANOVA PBS Chapters 15.1 and 15.2 © 2009 W.H. Freeman and Company.
Nonparametric Statistics
Regression Models First-order with Two Independent Variables
Today: Feb 28 Reading Data from existing SAS dataset One-way ANOVA
Logistic Regression When and why do we use logistic regression?
Let’s Get It Straight! Re-expressing Data Curvilinear Regression
Factorial Experiments
Two way ANOVA with replication
Interactions Interaction: Does the relationship between two variables depend on a third variable? Does the relationship of age to BP depend on gender Does.
Comparing Three or More Means
Interactions and Factorial ANOVA
Two way ANOVA with replication
12 Inferential Analysis.
Regression Statistics
Business Statistics, 4e by Ken Black
Least Squares ANOVA & ANCOV
Two Way ANOVAs Factorial Designs.
2 independent Groups Graziano & Raulin (1997).
Multiple Regression – Part II
Kin 304 Inferential Statistics
Nonparametric Statistics
Analysis of Variance (ANOVA)
Statistics review Basic concepts: Variability measures Distributions
Main Effects and Interaction Effects
Regression designs Y X1 Plant size Growth rate 1 10
Experimental Statistics - Week 4 (Lab)
females males Analyses with discrete variables
Covariance x – x > 0 x (x,y) y – y > 0 y x and y axes.
Independent variables correlate with each other
Chapter 13 Group Differences
12 Inferential Analysis.
Analysis of Variance ANOVA.
Business Statistics, 4e by Ken Black
Experimental Statistics - week 8
Multiple comparisons - multiple pairwise tests - orthogonal contrasts
Presentation transcript:

Two-way analysis on variance observations classified by two criteria simultaneously … or we study the effect of two factors simultaneously. We use a two-way ANOVA to handle the situation.

Results are presented as an ANOVA table Dependent Variable: kaal Sum of Source DF Squares Mean Square F Value Pr > F Model 2 41.63200000 20.81600000 33.68 <.0001 Error 17 10.50600000 0.61800000 Corrected Total 19 52.13800000   R-Square Coeff Var Root MSE kaal Mean 0.798496 13.12404 0.786130 5.990000 Source DF Type III SS Mean Square F Value Pr > F taim 1 20.00000000 20.00000000 32.36 <.0001 sugu 1 21.63200000 21.63200000 35.00 <.0001 Results are presented as an ANOVA table _________________________________ effect df SS F p plant 1 20.0 32.3 <0.0001 sex 1 21.6 35.0 <0.0001 error 17 10.5

_________________________________ effect df SS F p plant 1 20.0 32.3 <0.0001 sex 1 21.6 35.0 <0.0001 error 17 10.5 because MS=SS/df, no need to report R2 = SSeffect/SStotal iga efekti kohta eraldi Or as a sentence: “the effect of host plant on pupal weight was statistically confirmed (F1,17=32.3, p<0.0001; two-way ANOVA with sex as an additional factor).“ ... are not the same as for one-way ANOVA, no dependent variable, no direction separately for each factor

interaction – the effect of one factor depends on the level of another factor, There is an interaction in these data: parallel lines, with a change in the direction or not, symmetric Source DF SS MS F P   plant 1 0.05 0.05 0.08 0.77 sex 1 79.20 79.20 131.24 <.0001 plant*sex 1 20.00 20.00 33.14 <.0001

There is no interaction when the effects are additive. _________________________________________ effect df SS F p plant 1 0,05 0,08 0,8 sex 1 79,2 131,2 <0.0001 plant*sex 1 20,0 33,1 <0.0001 error 16 9,7 There is no interaction when the effects are additive. Logarithmic transformation turns the model to multiplicative! In the case of interaction, there may be main effects but need not be. Be careful!

Fill in the blank so that there is no interaction male on birch 50 mg female on birch 80 mg male on alder 70 mg female on alder ..... mg

Fill in the blank so that there were an interaction „with a change in the direction“ crocodile in the sea 8 m crocodile in a lake 6 m snake in the sea 9 m snake in a lake ..... m

Fill in the blank so that there is no interaction male on birch 50 mg female on birch 80 mg male on alder 70 mg female on alder 100 mg male on willow 100 mg female on willow .... mg

Fill in the blank so that there is no interaction male on birch 50 mg female on birch 80 mg male on alder 70 mg female on alder 80 mg male on willow 100 mg female on willow .... mg

Fill in the blank so that there is no interaction after logarithmic transformation: male on birch 50 mg female on birch 100 mg male on alder 80 mg female on alder ..... mg

Fill in the blank so that there is no main effect of tree species: male on birch 50 mg female on birch 80 mg male on alder 70 mg female on alder ..... mg

Fill in the blank so that there is no main effect of either of the factors: male on birch 50 mg female on birch 80 mg male on alder .... mg female on alder ..... mg

It is well possible to have a more than two-way ANOVA, Source DF Type III SS Mean Square F Value Pr > F   taim 1 5.0041161 5.0041161 4.83 0.0293 sugu 1 609.9239388 609.9239388 588.16 <.0001 taim*sugu 1 159.7450216 159.7450216 154.05 <.0001 varv 1 6.6006350 6.6006350 6.37 0.0125 taim*varv 1 12.8614007 12.8614007 12.40 0.0005 sugu*varv 1 0.1566191 0.1566191 0.15 0.6980 taim*sugu*varv 1 0.0470915 0.0470915 0.05 0.8315 auk 1 0.3428916 0.3428916 0.33 0.5660 taim*auk 1 0.5017713 0.5017713 0.48 0.4876 sugu*auk 1 2.2543296 2.2543296 2.17 0.1421 taim*sugu*auk 1 0.0663268 0.0663268 0.06 0.8006 varv*auk 1 0.7646613 0.7646613 0.74 0.3916 taim*varv*auk 1 3.4534288 3.4534288 3.33 0.0696 sugu*varv*auk 1 3.4380134 3.4380134 3.32 0.0703 taim*sugu*varv*auk 1 0.0000439 0.0000439 0.00 0.9948 It is well possible to have a more than two-way ANOVA, it will be complicated with interactions : An interaction between three factors – the natuure of a the two-way interaction depends on the level of the third factor.

Regression anlysis is based on the same principles - can be combined: covariate, analysis of covariance (ANCOVA), does not really matter whether the independent variables is continuous or categorical! We will present in the same way, df of the covariate always 1. Often just to eliminate a confounding effect!

With the covariate included: p = 0.0032 control egg size with snails weight of the mother With the covariate included: p = 0.0032 the covariate itself: p < 0.0001 egg size p = 0.10

Why does it help to find the difference? F=MSmodel/MSerror – covariate reduced error variance! You can add any number of covariates but: - too many reduce the power of the test - will not include if non-significant – unless we know in advance - ethical problem – playing with the model we can get what we want by chance; - if depends on non-significant covariates – too little data! - backward elimination model simplification procedure The effect of covariate eliminated – LSMEANS.

_________________________________________ effect df SS F p treatment 2 0.05 0.08 0.8 weight 1 79.2 131.2 <0.0001 age 1 20.0 33.1 <0.0001 box age 1 0.3 1.3 0.45 blueberry 1 1.2 1.9 0.23 error 16 9.7

_________________________________________ effect df SS F p treatment 2 0.04 0.06 0.8 weight 1 80.2 134.2 <0.0001 age 1 17.9 37.1 <0.0001 blueberry 1 1.2 2.9 0.17 error 17 10.4

_________________________________________ effect df SS F p treatment 2 0.06 0.09 0,7 weight 1 84.2 131.2 <0.0001 age 1 20.9 33.1 <0.0001 error 18 12.4