Comparing ≥ 3 Groups Analysis of Biological Data/Biometrics

Slides:



Advertisements
Similar presentations
Dr. AJIT SAHAI Director – Professor Biometrics JIPMER, Pondicherry
Advertisements

Repeated Measures/Mixed-Model ANOVA:
Multiple Analysis of Variance – MANOVA
Analysis of Variance (ANOVA) ANOVA methods are widely used for comparing 2 or more population means from populations that are approximately normal in distribution.
Analysis of Variance (ANOVA) Statistics for the Social Sciences Psychology 340 Spring 2010.
Analysis of Variance. Experimental Design u Investigator controls one or more independent variables –Called treatment variables or factors –Contain two.
Chapter Topics The Completely Randomized Model: One-Factor Analysis of Variance F-Test for Difference in c Means The Tukey-Kramer Procedure ANOVA Assumptions.
Lecture 9: One Way ANOVA Between Subjects
One-way Between Groups Analysis of Variance
What Is Multivariate Analysis of Variance (MANOVA)?
Today Concepts underlying inferential statistics
Chapter 14 Inferential Data Analysis
Chapter 12 Inferential Statistics Gay, Mills, and Airasian
Quiz 12  Nonparametric statistics. 1. Which condition is not required to perform a non- parametric test? a) random sampling of population b) data are.
Analysis of Variance. ANOVA Probably the most popular analysis in psychology Why? Ease of implementation Allows for analysis of several groups at once.
ANCOVA Lecture 9 Andrew Ainsworth. What is ANCOVA?
Non-parametric Tests. With histograms like these, there really isn’t a need to perform the Shapiro-Wilk tests!
A statistical method for testing whether two or more dependent variable means are equal (i.e., the probability that any differences in means across several.
Psychology 301 Chapters & Differences Between Two Means Introduction to Analysis of Variance Multiple Comparisons.
Chapter 10: Analyzing Experimental Data Inferential statistics are used to determine whether the independent variable had an effect on the dependent variance.
Analysis of variance John W. Worley AudioGroup, WCL Department of Electrical and Computer Engineering University of Patras, Greece
Experimental Design and Statistics. Scientific Method
Experimental Research Methods in Language Learning
ANOVA P OST ANOVA TEST 541 PHL By… Asma Al-Oneazi Supervised by… Dr. Amal Fatani King Saud University Pharmacy College Pharmacology Department.
Chapter 11 Analysis of Variance. 11.1: The Completely Randomized Design: One-Way Analysis of Variance vocabulary –completely randomized –groups –factors.
Analyzing Statistical Inferences July 30, Inferential Statistics? When? When you infer from a sample to a population Generalize sample results to.
Business Statistics: A First Course (3rd Edition)
Statistics for the Social Sciences Psychology 340 Spring 2009 Analysis of Variance (ANOVA)
Model adequacy checking in the ANOVA Checking assumptions is important –Normality –Constant variance –Independence –Have we fit the right model? Later.
Educational Research Inferential Statistics Chapter th Chapter 12- 8th Gay and Airasian.
Multi Group Comparisons with Analysis of Variance (ANOVA)
Chapter 11 Analysis of Variance
DTC Quantitative Methods Bivariate Analysis: t-tests and Analysis of Variance (ANOVA) Thursday 20th February 2014  
STAT Single-Factor ANOVA
ANALYSIS OF VARIANCE (ANOVA)
Part Four ANALYSIS AND PRESENTATION OF DATA
Statistics for Managers Using Microsoft Excel 3rd Edition
ANOVA Econ201 HSTS212.
Multiple comparisons
ANOVA (Chapter - 04/D) Dr. C. Ertuna.
Comparing Three or More Means
Comparison of means test
Data Analysis and Interpretation
Analysis of Data Graphics Quantitative data
ANalysis Of VAriance (ANOVA)
Georgi Iskrov, MBA, MPH, PhD Department of Social Medicine
Three way ANOVA If there was One way then and Two way, then you knew that there had to be………
Kin 304 Inferential Statistics
Comparing Several Means: ANOVA
Analysis of Variance (ANOVA)
Single-Factor Studies
Single-Factor Studies
Chapter 11: The ANalysis Of Variance (ANOVA)
Analysis of Variance (ANOVA)
1-Way Analysis of Variance - Completely Randomized Design
I. Statistical Tests: Why do we use them? What do they involve?
Analysis of Variance (ANOVA)
One-Way Analysis of Variance
One Way ANOVAs One Way ANOVAs
Randomized Complete Block and Repeated Measures (Each Subject Receives Each Treatment) Designs KNNL – Chapters 21,
Psych 231: Research Methods in Psychology
ANOVA Between-Subject Design: A conceptual approach
A protocol for data exploration to avoid common statistical problems
1-Way Analysis of Variance - Completely Randomized Design
Exercise 1 Use Transform  Compute variable to calculate weight lost by each person Calculate the overall mean weight lost Calculate the means and standard.
NONPARAMETRIC STATISTICS FOR BEHAVIORAL SCIENCE
BUS-221 Quantitative Methods
Post Hoc Tests.
STATISTICS INFORMED DECISIONS USING DATA
Problem 3.26, when assumptions are violated
Presentation transcript:

Comparing ≥ 3 Groups Analysis of Biological Data/Biometrics Dr. Ryan McEwan Department of Biology University of Dayton ryan.mcewan@udayton.edu

So far in class we have looked at situations where we have two groups to compare. Like LeBron’s assists Or House Prices

What do we do when there are more than 2 groups?

You may be tempted to t-test everything one at a time. This would be statistically invalid! Instead you need to first ask: is there an overall effect of the treatment

This is done using…. Analysis of Variance or ANalysis Of Variance = ANOVA

Let’s grab some data from the book comp=read.csv("C:/Users/rmcewan1/Documents/R/A_BioData/Data/competition.csv")

First test for an overall treatment effect summary(aov(comp$biomass~comp$clipping)) of anova(lm(comp$biomass~comp$clipping))

Second test for individual differences PAIRWISE COMPARISONS aka “Compare all Pairs”

Second test for individual differences PAIRWISE COMPARISONS aka “Compare all Pairs”

Second test for individual differences PAIRWISE COMPARISONS aka “Compare all Pairs”

Second test for individual differences PAIRWISE COMPARISONS aka “Compare all Pairs”

Second test for individual differences PAIRWISE COMPARISONS aka “Compare all Pairs”

Second test for individual differences PAIRWISE COMPARISONS aka “Compare all Pairs”

Second test for individual differences PAIRWISE COMPARISONS aka “Compare all Pairs”

Second test for individual differences PAIRWISE COMPARISONS aka “Compare all Pairs” Note that a lot of comparisons are being made in this kind of process…that has implications

Bonferroni correction Basic idea is that as you increase the number of comparisons you mathematically or de facto increase the probability of making a Type 1 error. (False positive) So you need to adjust the P-value – make it more stringent- for each individual test. So you cannot just run regular t-tests as a Post-hoc procedure. You have to do a correction. Post-hoc, pairwise, procedures that follow ANOVA have these corrections built in.

Second test for individual differences PAIRWISE COMPARISONS aka “Compare all Pairs” This is often referred to as a Post-hoc procedure pairwise.t.test(comp$biomass,comp$clipping,padj="bonferroni")

Second test for individual differences PAIRWISE COMPARISONS aka “Compare all Pairs” This is often referred to as a Post-hoc procedure Another version is the Tukey test (also called the Tukey-Kramer Multiple Comparisons Test) TukeyHSD(aov(comp$biomass~comp$clipping)) Generally, the Tukey HSD test is considered a superior method and we will adopt this for our class.

ANalysis Of Variance = ANOVA Assumptions! -Independence -Normality -Equal Variance

ANalysis Of Variance = ANOVA Assumptions! -Independence; -Normality; -Equal Variance Guidelines One way ANOVA is robust to minor violations of normality and equal variance Assessing normality using tests (Shapiro, etc, is losing favor among some statisticians) Graphical methods (histogram, normal Q-Q plots) remain useful, however they are also somewhat ambiguous. General practice we will adopt for this class: (a) Exploratory data analysis including outlier scanning (b) graphical methods (c) tests of both normality and equal variance (d) as the analyst, take all of this into account, make a decision and report it -Generally speaking, the data should be “a mess” to resort to the non-parametric approach.

If you decide that you need to run a non-parametric test because your data are not meeting the assumptions of ANOVA. Run the Kruskal-Wallis Test kruskal.test(dataset$measurement~dataset$group) It is important to note that this test is less powerful for detecting differences. It is more conservative, thus you run the risk of a type II error- false negative.

For Non-normal data, you can use the pairwise Wilcoxon test. pairwise.wilcox.test(data$measures, data$group, p.adj=“bonferroni”) It is important to note that this test is less powerful for detecting differences. It is more conservative, thus you run the risk of a type II error- false negative.

(2) Test for a normal distribution and equal variance Exploratory Data Analysis (screen for outliers, look at the range of variation, etc) (2) Test for a normal distribution and equal variance -hist(DATA) (use this to take a look at the distributions -use plot(aov( ) to create 4 plots. FIRST set par(mfrow=c(2,2)) Shapiro-Wilk test: shapiro.test(DATA) : [P ≤0.05 = not-normal] Bartlett test for homogeneity of variance: bartlett.test(Data ~ Site) [P ≤0.05 = not-equal variance] Reject the null hypothesis of a normal distribution “Non-NORMAL” Cannot reject the null of a normal distribution “NORMAL” kruskal.test(data$measures~data$group) anova(lm(data$measures~data$group)) P > 0.05 P ≤ 0.05 P > 0.05 P ≤ 0.05 Significant Treatment Effect! Cannot reject the null- Treatments are statistically indistinguishable Significant Treatment Effect! Cannot reject the null- Treatments are statistically indistinguishable Analysis complete Analysis complete What are the individual differences TukeyHSD(aov(data$measures~data$group)) pairwise.wilcox.test(data$measures, data$group, p.adj=“bonferroni”) This code will show you difference among each pair of treatments in the data set. You need to report the result of the overall ANOVA and the individual comparisons. This code will show you difference among each pair of treatments in the data set. You need to report the result of the overall ANOVA and the individual comparisons.

-hist(DATA) (use this to take a look at the distributions -use plot(aov( ) to create 4 plots. FIRST set par(mfrow=c(2,2)) Shapiro-Wilk test: shapiro.test(DATA) Bartlett test for homogeneity of variance: bartlett.test(Data ~ Site)

Overall treatment effect P = 0.0087

Overall treatment effect P = 0.0087

Overall treatment effect P = 0.0087

Overall treatment effect P = 0.0087 B A A A

Overall treatment effect P = 0.0087 B B A A A

Overall treatment effect P = 0.0087 B B AB A A

Overall treatment effect P = 0.0087 B B AB AB A

Overall treatment effect P = 0.0087 B B AB AB A

Overall treatment effect P = 0.0087 B B AB AB boxplot(comp$biomass~comp$clipping,ylab="mean biomass", xlab="competition treatment",col="darkgreen") hist(comp$biomass) par(mfrow=c(2,2)) plot(aov(comp$biomass~comp$clipping)) shapiro.test(comp$biomass) bartlett.test(comp$biomass~comp$clipping) anova(lm(comp$biomass~comp$clipping)) TukeyHSD(aov(comp$biomass~comp$clipping)) A

(2) Test for a normal distribution and equal variance Exploratory Data Analysis (screen for outliers, look at the range of variation, etc) (2) Test for a normal distribution and equal variance -hist(DATA) (use this to take a look at the distributions -use plot(aov( ) to create 4 plots. FIRST set par(mfrow=c(2,2)) Shapiro-Wilk test: shapiro.test(DATA) Bartlett test for homogeneity of variance: bartlett.test(Data ~ Site) Reject the null hypothesis of a normal distribution “Non-NORMAL” Cannot reject the null of a normal distribution “NORMAL” kruskal.test(data$measures~data$group) anova(lm(data$measures~data$group)) P > 0.05 P ≤ 0.05 P > 0.05 P ≤ 0.05 Significant Treatment Effect! Cannot reject the null- Treatments are statistically indistinguishable Significant Treatment Effect! Cannot reject the null- Treatments are statistically indistinguishable Analysis complete Analysis complete What are the individual differences TukeyHSD(aov(data$measures~data$group)) pairwise.wilcox.test(data$measures, data$group, p.adj=“bonferroni”) This code will show you difference among each pair of treatments in the data set. You need to report the result of the overall ANOVA and the individual comparisons. This code will show you difference among each pair of treatments in the data set. You need to report the result of the overall ANOVA and the individual comparisons.

B B A

The ANalysis Of Variance = ANOVA Family Repeated Measures ANOVA - if you measure the same treatments many times Two-way ANOVA – if you have more than one treatment influence a single set of experimental units Interaction term!! Randomized Complete Block ANOVA - RCB-ANOVA -If your experiment is a block design (more on this later) ANCOVA- If your experiment has a “Co-Variate” MANOVA- Multivariate ANOVA for when you have large complex data sets