Jian WANG, PhD. Room A115 College of Fishery and Life Science Shanghai Ocean University
|
|
- Caroline Fleming
- 5 years ago
- Views:
Transcription
1 Jian WANG, PhD Room A115 College of Fishery and Life Science Shanghai Ocean University
2
3 Useful Links Slides: Datasets: RStudio
4 RStudio friendly IDE for R
5 RStudio friendly IDE for R
6 RStudio friendly IDE for R
7 RStudio friendly IDE for R new script input scripts Enviroment & History plots & help results
8 Contents 1. Introduction to R 2. Data sets 3. Introductory Statistical Principles 4. Sampling and experimental design with R 5. Graphical data presentation 6. Simple hypothesis testing 7. Introduction to Linear models 8. Correlation and simple linear regression 9. Single factor classification (ANOVA) 10. Nested ANOVA 11. Factorial ANOVA 12. Simple Frequency Analysis
9 ANOVA (Analysis of variance) one-way ANOVA also known Single factor classification used to investigate the effect of single factor comprising of two or more groups from a completely randomized design eg: temperature concentration of drug A factor of four levels
10 ANOVA (Analysis of variance)
11 Example A: zinc contamination on the diversity of diatom species
12 Example A: zinc contamination on the diversity of diatom species Medley and Clements (1998) investigated the impact of zinc contamination (and other heavy metals) on the diversity of diatom species in the USA Rocky Mountains The diversity of diatoms (number of species) degree of zinc contamination (high, medium, low or natural background level) Data were recorded from between four and six sampling stations within each of six streams known to be polluted. These data were used to test the null hypothesis that there were no differences the diversity of diatoms between different zinc levels
13 F-ratios F-ratios and corresponding R syntax for single factor ANOVA designs Mean of squared (variation)
14 F -distribution Comparing the plots of the probability density function for an F distribution with various degrees of freedom. solid line represents the probability density functions (pdf) of F(1, 1), dashed line represents the pdf of F(2, 5), dotted line represents the pdf of F(10, 20)
15 F -distribution
16 F -distribution Eg. The density plot of F(3, 23)- distribution. The distribution of F statistic for the assuming that the null hypothesis is true. The observed value of the test statistic is f = 3.2, and the corresponding p-value is shown as the shaded area above 3.2
17 Fixed factor & Random factor Could be control Eg: three specific temperatures Couldn t be control Eg: three operators
18 Fixed factor the population group means are all equal or the effect of each group equals zero H : 0 1 either i
19 Random factor the variance between all possible groups equals zero added variance due to this factor equals zero H : 2 0 1
20 Linear model
21 Assumptions of ANOVA Hypothesis testing for a single factor ANOVA model assumes that the residuals (and therefore the response variable for each of the treatment levels) are all: (i) normally distributed (ii) equally varied (iii) independent of one another
22 Tests of trends and means comparisons When H0 is rejected Researchers often wish to examine patterns of differences among groups. However, this requires multiple comparisons of group means and multiple comparisons Post-hoc unplanned pairwise comparisons e.g. Bonferroni, LSR (Duncan, Neuman-Keuls), Tukey HSD Planned comparisons
23 ANOVA in R Model construction: lm() aov() View ANOVA table summary() anova()
24 Example A: zinc contamination on the diversity of diatom species
25 Example A: zinc contamination on the diversity of diatom species Medley and Clements (1998) investigated the impact of zinc contamination (and other heavy metals) on the diversity of diatom species in the USA Rocky Mountains The diversity of diatoms (number of species) degree of zinc contamination (high, medium, low or natural background level) Data were recorded from between four and six sampling stations within each of six streams known to be polluted. These data were used to test the null hypothesis that there were no differences the diversity of diatoms between different zinc levels
26 Example A: zinc contamination on the diversity of diatom species ## 1 - import dataset (notice the directory) >setwd() > medley <- read.table('medley.csv', header=t, sep=',') > medley #check data > boxplot(diversity~zinc, medley) not in proper order
27 Example A: zinc contamination on the diversity of diatom species ##2 - Reorganize the levels of categorical factor into more logical order >medley$zinc #1 st * > medley$zinc <- factor(medley$zinc, levels=c('high', 'MED', 'LOW', 'BACK'), ordered=f) >medley$zinc #2 nd * *find the difference between 1 st & 2 nd
28 Example A: zinc contamination on the diversity of diatom species ## 3 - Assess normality/homogeneity of variance using boxplot of species diversity against zinc group > boxplot(diversity~zinc, medley) Conclusions no obvious violations of normality or homogeneity of variance basically symmetrical
29 Example A: zinc contamination on the diversity of diatom species ##4 - Assess homogeneity of variance assumption with a plot of mean vs variance > plot(tapply(medley$diversity, medley$zinc, mean), tapply(medley$diversity, medley$zinc, var)) Conclusions no obvious relationship between group mean and variance
30 Example A: zinc contamination on the diversity of diatom species ## 3 - Assess normality using shapiro test of species diversity against zinc group > library("plyr") > ddply(medley,.(zinc), function(x) {data.frame(pvalue = shapiro.test(x$diversity)$p.value)})
31 Example A: zinc contamination on the diversity of diatom species ## 3 - Assess homogeneity of variance using Bartlett test of species diversity against zinc group > bartlett.test(medley$diversity~medley$zinc)
32 Example A: zinc contamination on the diversity of diatom species ##5 - Test H0 that population group means are all equal > medley.aov <- aov(diversity ~ ZINC, medley) > medley.aov
33 Example A: zinc contamination on the diversity of diatom species ##5 - Test H0 that population group means are all equal > par(mfrow = c(2, 2)) > plot(medley.aov) Conclusions - no obvious violations of normality or homogeneity of variance meaningless
34 Example A: zinc contamination on the diversity of diatom species ##6 - Examine the ANOVA table. > anova(medley.aov) > summary(medley.aov) MS B SS k B 1 degree of freedom k-1 N-k (N: total) F (k-1,n-k) ratio, MSB/MSw MS w SS w N k
35 Example A: zinc contamination on the diversity of diatom species ##7 option using linear model to do ANOVA > anova(lm(diversity ~ ZINC, medley))
36 Example A: zinc contamination on the diversity of diatom species ##6 - Examine the ANOVA table. > anova(medley.aov) > summary(medley.aov) Conclusions - at least one of the population group means differs from the others
37 Post-hoc unplanned pairwise comparison One-way ANOVA results : - Rejecting the H0 that all of population group means are equal only indicates that at least one of the population group means differs from the others. - However, it does not indicate which group differ from which other groups. - multiple comparisons of group means with correction are required.
38 Post-hoc unplanned pairwise comparison Problems of multiple comparisons : 1- multiple significant test increase the probability of Type I errors (α, the probability of falsely rejecting H0) eg: Type I errors of 5 groups 10 pairwise comparisons with α=0.05: ^10= the outcome of each test might not be independent (orthogonal). eg: A>B, B>C. if A & B are different, we already know A & C are different multiple corrections are needed for comparisons
39 Example A: zinc contamination on the diversity of diatom species ##7 Post-hoc to investigate pairwise mean differences between all groups #option 1 > TukeyHSD(medley.aov ) #option 2 > require('multcomp') > summary(glht(medley.aov, linfct = mcp(zinc = "Tukey"))) #option 3 > require("desctools") > PostHocTest(medley.aov,method = "hsd") Tukey s Honestly Significant Distance test for multiple comparisons
40 Example A: zinc contamination on the diversity of diatom species ##7 Post-hoc between all groups to investigate pairwise mean differences
41 Example A: zinc contamination on the diversity of diatom species ##7 Post-hoc between all groups to investigate pairwise mean differences
42 Example A: zinc contamination on the diversity of diatom species ##7 Post-hoc between all groups to investigate pairwise mean differences
43 Example A: zinc contamination on the diversity of diatom species ##8 Summarize result with a bargraph using biology package not available now
44 Example A: zinc contamination on the diversity of diatom species ##8 Summarize result with a bargraph Add * symbol manually by Graphic software like adobe illustrator * > #calculate mean & sd seperately > mean1 <- tapply(medley$diversity,medley$zinc,mean) > sd1 <- tapply(medley$diversity,medley$zinc,sd) > dd1 <- data.frame(mean1,sd1) > ylim=c(0,(max(dd1$mean1)+2*max(dd1$sd1))) > mp <- barplot(dd1$mean1,ylab="diversity", xlab = "Zinc Concentration", names.arg=row.names(dd1),ylim=ylim) > segments(mp, dd1$mean1-dd1$sd1,mp,dd1$mean1+dd1$sd1) > segments( mp - 0.1,dd1$mean1-dd1$sd1, mp + 0.1,dd1$mean1-dd1$sd1) > segments( mp - 0.1,dd1$mean1+dd1$sd1, mp + 0.1,dd1$mean1+dd1$sd1)
45 Example A: zinc contamination on the diversity of diatom species ##8 Summarize result with a bargraph Using ggplot2 > library(reshape2) > library(ggplot2) > library(plyr) > mdata.m <- tapply(medley$diversity,medley$zinc,mean) > mdata.sd <- tapply(medley$diversity,medley$zinc,sd) > data.r = data.frame(mdata.m,mdata.sd) > data.r$zinc = row.names(data.r) > ggplot(data.r,aes(zinc,mdata.m,fill=zinc)) + geom_bar(stat = "identity",width = 0.5) + geom_errorbar(aes(ymin=mdata.m-mdata.sd, ymax=mdata.m+mdata.sd),width=0.2)+ scale_y_continuous(expand = c(0,0),limits=c(0,3),) + ##limits should be adjusted accordingly scale_x_discrete(limits=data.r$zinc)+ylab("diversity")+ theme_bw() + theme(panel.grid.major= element_blank(),panel.grid.minor=element_blank()) *
46 ggplot2: Elegant Graphics
47 Example B : Single factor ANOVA with planned comparisons four biofilm types on the recruitment of serpulid larvae
48 Example B : Single factor ANOVA with planned comparisons four biofilm types on the recruitment of serpulid larvae Keough and Raimondi (1995) examined the effects of four biofilm types on the recruitment of serpulid larvae. : SL: sterile unfilmed substrate, NL: netted laboratory biofilms, UL: unnetted laboratory biofilms F: netted field biofilms Substrates treated with one of the four biofilm types were left in shallow marine waters for one week after which the number of newly recruited serpulid worms were counted.
49 Example B : Single factor ANOVA with planned comparisons four biofilm types on the recruitment of serpulid larvae The linear effect model would be:
50 Example B : Single factor ANOVA with planned comparisons four biofilm types on the recruitment of serpulid larvae ## 1&2 - Check the assumptions and scale data if appropriate > keough <- read.table("keough.csv", header = T, sep = ",") > dev.off() ##if necessary > boxplot(serp ~ BIOFILM, data = keough) > boxplot(log10(serp) ~ BIOFILM, data = keough )
51 Example B : Single factor ANOVA with planned comparisons four biofilm types on the recruitment of serpulid larvae ## 1&2 - Check the assumptions and scale data if appropriate untransformed log 10 scale
52 Example B : Single factor ANOVA with planned comparisons four biofilm types on the recruitment of serpulid larvae ## 1&2 - Check the assumptions and scale data if appropriate > with(keough, plot(tapply(serp, BIOFILM, mean), tapply(serp, BIOFILM, var))) > with(keough, plot(tapply(log10(serp), BIOFILM, mean), tapply(log10(serp), BIOFILM, var)))
53 Example B : Single factor ANOVA with planned comparisons four biofilm types on the recruitment of serpulid larvae ## 1&2 - Check the assumptions and scale data if appropriate untransformed log 10 scale Conclusions - some evidence of a relationship between population mean and population variance from untransformed data, log10 transformed data meets assumptions better, therefore transformation appropriate.
54 Example B : Single factor ANOVA with planned comparisons four biofilm types on the recruitment of serpulid larvae SL: sterile unfilmed substrate, NL: netted laboratory biofilms, UL: unnetted laboratory biofilms F: netted field biofilms Comparisons:
55 Example B : Single factor ANOVA with planned comparisons four biofilm types on the recruitment of serpulid larvae ## 3&4 - Define a list of contrasts for the following planned comparisons: >keough$biofilm #1 st * > contrasts(keough$biofilm) <- cbind(c(0, 1, 0, -1), c(2, -1, 0, -1), c(-1, - 1, 3, -1)) >round(crossprod(contrasts(keough$biofilm)), 2) >keough$biofilm #2 nd * Conclusions - all defined planned contrasts are orthogonal (values above or below the cross-product matrix diagonal are all be zero). *notice the difference between 1st & 2nd
56 Example B : Single factor ANOVA with planned comparisons four biofilm types on the recruitment of serpulid larvae ## 5 - Define contrast labels and model construction >keough.list <- list(biofilm = list('nl vs UL' = 1,'F vs (NL&UL)' = 2, 'SL vs (F&NL&UL)' = 3)) > keough.aov <- aov(log10(serp) ~ BIOFILM, data = keough) > par(mfrow = c(2, 2)) > plot(keough.aov) > summary(keough.aov, split=keough.list)
57 Example B : Single factor ANOVA with planned comparisons four biofilm types on the recruitment of serpulid larvae ## 5 - Define contrast labels and model construction meaningless
58 Example B : Single factor ANOVA with planned comparisons four biofilm types on the recruitment of serpulid larvae ## 5 - Define contrast labels and model construction
59 Example B : Single factor ANOVA with planned comparisons four biofilm types on the recruitment of serpulid larvae ## 5 - Define contrast labels and model construction Conclusions Biofilm treatments were found to have a significant affect on the mean log10 number of serpulid recruits (F3,24 = ,P = 0.003). The presence of a net (NL) over the substrate was not found to alter the mean log10 serpulid recruits compared to a surface without (UL) a net (F1,24 = ,P = ). Field biofilms (F) were not found to have different mean log10 serpulid recruits than the laboratory (NL, UL) biofilms (F1,24 = ,P = ). Unfilmed treatments were found to have significantly lower mean log10 serpulid recruits than treatments with biofilms (F1,24 = ,P < 0.001)
60 Example B : Single factor ANOVA with planned comparisons four biofilm types on the recruitment of serpulid larvae ## 5 - Define contrast labels and model construction
61 Example B : Single factor ANOVA with planned comparisons four biofilm types on the recruitment of serpulid larvae ## 5 - Define contrast labels and model construction Significant affects were found on: Overall biofilm treatments (F3,24 = ,P = 0.003). Unfilmed treatments and treatments with biofilms (F1,24 = ,P < 0.001)
62 Example B : Single factor ANOVA with planned comparisons four biofilm types on the recruitment of serpulid larvae ## 6- Summarize findings with a bargraph > means <- with(keough, tapply(serp, BIOFILM, mean, na.rm = T)) > sds <- with(keough, tapply(serp, BIOFILM, sd, na.rm = T)) > n <- with(keough, tapply(serp, BIOFILM, length)) > ses <- sds/sqrt(n) > ys <- pretty(c(means - ses, means + (2 * ses))) > xs <- barplot(means, beside = T, axes = F, ann = F, ylim = c(min(ys), max(ys)), xpd = F) > arrows(xs, means + ses, xs, means - ses, ang = 90, length = 0.1, code = 3) axis(2, las = 1) > mtext(2, text = "Mean number of serpulids", line = 3, cex = 1.5) > mtext(1, text = "Biofilm treatment", line = 3, cex = 1.5) > box(bty = "l")
63 Example B : Single factor ANOVA with planned comparisons four biofilm types on the recruitment of serpulid larvae Mean number of serpulids ## 6- Summarize findings with a bargraph F NL SL UL Biofilm treatment
64 Robust classification: alternatives to ANOVA either non-normality or unequal variance Welch s test adjusts the degrees of freedom to maintain test reliability in situations where populations are normally distributed but unequally varied. Kruskal-Wallis test : abnormality. Non-parametric (rank-based) tests Randomization tests : do not assume observations were collected via random sampling, however they do assume that populations are equally varied
65 Example E: Kruskal-Wallis test The effect of different sugar treatments on pea length was investigated: Control 2% glucose added 2% fructose added 1% glucose and 1% fructose added 2% sucrose added
66 Example E: Kruskal-Wallis test The effect of different sugar treatments on pea length ##1 Import data and check normality and equal variance > purves <- read.table('purves.csv', header=t, sep=',') > dev.off() > boxplot(length~treat, data=purves) unequal variance. Note: that this dataset would also suited to a Welch s test. for the purpose of providing worked examples that are consistent with popular biometry texts, a Kruskal-Wallis test will be demonstrated.
67 Example E: Kruskal-Wallis test The effect of different sugar treatments on pea length ##2 Perform non-parametric Kruskal-Wallis test > kruskal.test(length~treat, data=purves)
68 Example E: Kruskal-Wallis test The effect of different sugar treatments on pea length ##2 Perform post-hoc > pairwise.t.test(purves$length, purves$treat, pool.sd=f, p.adj= fdr") fdr: False discovery rate
69 Example E: Kruskal-Wallis test The effect of different sugar treatments on pea length ## Summarize findings with a bargraph > means <- with(purves, tapply(length, TREAT, mean, na.rm =T)) > sds <- with(purves, tapply(length, TREAT, sd, na.rm =T)) > n <- with(purves, tapply(length, TREAT, length)) > ses <- sds/sqrt(n) > ys <- pretty(c(means - ses, means + (2 * ses))) > xs<-barplot(means, beside=t, axes=f, ann=f, ylim = c(min(ys), max(ys)), xpd=f) > arrows(xs, means+ses, xs, means-ses, ang=90, length=0.05, code=3) > axis(2, las = 1) > mtext(2, text = "Mean pea length", line = 3, cex = 1.5) > mtext(1, text = "Sugar treatment", line = 3, cex = 1.5) > text(xs, means + ses, labels = c('a','b','b','b','c'), pos = 3) > box(bty="l")
70 Example E: Kruskal-Wallis test The effect of different sugar treatments on pea length ## Summarize findings with a bargraph
71 Example F: Welch s test The type of bird colony on beetle density The effects of sea birds on tenebrionid beetles on islands in the Gulf of California. sea birds leaving guano and carrion would increase beetle productivity. They had a sample of 25 islands and recorded the beetle density, the type of bird colony (roosting, breeding, no birds), % cover of guano and % plant cover of annuals and perennials
72 Example F: Welch s test The type of bird colony on beetle density ##1 Import data and check normality and equal variance sanchez <- read.table('sanchez.csv', header=t, sep=',') boxplot(guano~coltype, data=sanchez) boxplot(sqrt(guano)~coltype, data=sanchez)
73 Example F: Welch s test The type of bird colony on beetle density ##1 Import data and check normality and equal variance still unequal variance clear evidence that non-normality and non-homogeneity square-root transform improved a little
74 Example F: Welch s test The type of bird colony on beetle density ## Perform the Welch s test. > oneway.test(sqrt(guano)~coltype, data=sanchez) Significant difference. Reject the null hypothesis
75 Example F: Welch s test The type of bird colony on beetle density ## - Perform post-hoc test. > pairwise.t.test(sqrt(sanchez$guano), sanchez$coltype, pool.sd=f, p.adj="holm")
76 Example F: Welch s test The type of bird colony on beetle density ## - Perform post-hoc test. > pairwise.t.test(sqrt(sanchez$guano), sanchez$coltype, pool.sd=f, p.adj="none")
77 Single Factor Classification Methods ANOVA: Three assumptions satisfied Welch test: normality but NOT equally varied Kruskal-Wallis test: (non-parametric, test medians) abnormality Randomization tests: can NOT random sampling, but equally varied
Introduction to Analysis of Variance (ANOVA) Part 2
Introduction to Analysis of Variance (ANOVA) Part 2 Single factor Serpulid recruitment and biofilms Effect of biofilm type on number of recruiting serpulid worms in Port Phillip Bay Response variable:
More informationJian WANG, PhD. Room A115 College of Fishery and Life Science Shanghai Ocean University
Jian WANG, PhD j_wang@shou.edu.cn Room A115 College of Fishery and Life Science Shanghai Ocean University Contents 1. Introduction to R 2. Data sets 3. Introductory Statistical Principles 4. Sampling and
More informationWorksheet 2 - Basic statistics
Worksheet 2 - Basic statistics Basic statistics references Fowler et al. (1998) -Chpts 1, 2, 3, 4, 5, 6, 9, 10, 11, 12, & 16 (16.1, 16.2, 16.3, 16.9,16.11-16.14) Holmes et al. (2006) - Chpt 4 & Sections
More information13: Additional ANOVA Topics
13: Additional ANOVA Topics Post hoc comparisons Least squared difference The multiple comparisons problem Bonferroni ANOVA assumptions Assessing equal variance When assumptions are severely violated Kruskal-Wallis
More informationCOMPARING SEVERAL MEANS: ANOVA
LAST UPDATED: November 15, 2012 COMPARING SEVERAL MEANS: ANOVA Objectives 2 Basic principles of ANOVA Equations underlying one-way ANOVA Doing a one-way ANOVA in R Following up an ANOVA: Planned contrasts/comparisons
More informationSEVERAL μs AND MEDIANS: MORE ISSUES. Business Statistics
SEVERAL μs AND MEDIANS: MORE ISSUES Business Statistics CONTENTS Post-hoc analysis ANOVA for 2 groups The equal variances assumption The Kruskal-Wallis test Old exam question Further study POST-HOC ANALYSIS
More informationsphericity, 5-29, 5-32 residuals, 7-1 spread and level, 2-17 t test, 1-13 transformations, 2-15 violations, 1-19
additive tree structure, 10-28 ADDTREE, 10-51, 10-53 EXTREE, 10-31 four point condition, 10-29 ADDTREE, 10-28, 10-51, 10-53 adjusted R 2, 8-7 ALSCAL, 10-49 ANCOVA, 9-1 assumptions, 9-5 example, 9-7 MANOVA
More informationANOVA Multiple Comparisons
ANOVA Multiple Comparisons Multiple comparisons When we carry out an ANOVA on k treatments, we test H 0 : µ 1 = =µ k versus H a : H 0 is false Assume we reject the null hypothesis, i.e. we have some evidence
More informationComparing the means of more than two groups
Comparing the means of more than two groups Chapter 15 Analysis of variance (ANOVA) Like a t-test, but can compare more than two groups Asks whether any of two or more means is different from any other.
More informationBIOL Biometry LAB 6 - SINGLE FACTOR ANOVA and MULTIPLE COMPARISON PROCEDURES
BIOL 458 - Biometry LAB 6 - SINGLE FACTOR ANOVA and MULTIPLE COMPARISON PROCEDURES PART 1: INTRODUCTION TO ANOVA Purpose of ANOVA Analysis of Variance (ANOVA) is an extremely useful statistical method
More informationANALYSIS OF VARIANCE OF BALANCED DAIRY SCIENCE DATA USING SAS
ANALYSIS OF VARIANCE OF BALANCED DAIRY SCIENCE DATA USING SAS Ravinder Malhotra and Vipul Sharma National Dairy Research Institute, Karnal-132001 The most common use of statistics in dairy science is testing
More informationGroup comparison test for independent samples
Group comparison test for independent samples The purpose of the Analysis of Variance (ANOVA) is to test for significant differences between means. Supposing that: samples come from normal populations
More informationComparing Several Means: ANOVA
Comparing Several Means: ANOVA Understand the basic principles of ANOVA Why it is done? What it tells us? Theory of one way independent ANOVA Following up an ANOVA: Planned contrasts/comparisons Choosing
More informationStats fest Analysis of variance. Single factor ANOVA. Aims. Single factor ANOVA. Data
1 Stats fest 2007 Analysis of variance murray.logan@sci.monash.edu.au Single factor ANOVA 2 Aims Description Investigate differences between population means Explanation How much of the variation in response
More informationIntroductory Statistics with R: Linear models for continuous response (Chapters 6, 7, and 11)
Introductory Statistics with R: Linear models for continuous response (Chapters 6, 7, and 11) Statistical Packages STAT 1301 / 2300, Fall 2014 Sungkyu Jung Department of Statistics University of Pittsburgh
More informationAnalysis of variance (ANOVA) ANOVA. Null hypothesis for simple ANOVA. H 0 : Variance among groups = 0
Analysis of variance (ANOVA) ANOVA Comparing the means of more than two groups Like a t-test, but can compare more than two groups Asks whether any of two or more means is different from any other. In
More informationMultiple t Tests. Introduction to Analysis of Variance. Experiments with More than 2 Conditions
Introduction to Analysis of Variance 1 Experiments with More than 2 Conditions Often the research that psychologists perform has more conditions than just the control and experimental conditions You might
More informationIntroduction. Chapter 8
Chapter 8 Introduction In general, a researcher wants to compare one treatment against another. The analysis of variance (ANOVA) is a general test for comparing treatment means. When the null hypothesis
More informationDESIGNING EXPERIMENTS AND ANALYZING DATA A Model Comparison Perspective
DESIGNING EXPERIMENTS AND ANALYZING DATA A Model Comparison Perspective Second Edition Scott E. Maxwell Uniuersity of Notre Dame Harold D. Delaney Uniuersity of New Mexico J,t{,.?; LAWRENCE ERLBAUM ASSOCIATES,
More informationThe entire data set consists of n = 32 widgets, 8 of which were made from each of q = 4 different materials.
One-Way ANOVA Summary The One-Way ANOVA procedure is designed to construct a statistical model describing the impact of a single categorical factor X on a dependent variable Y. Tests are run to determine
More informationAssignment #7. Chapter 12: 18, 24 Chapter 13: 28. Due next Friday Nov. 20 th by 2pm in your TA s homework box
Assignment #7 Chapter 12: 18, 24 Chapter 13: 28 Due next Friday Nov. 20 th by 2pm in your TA s homework box Lab Report Posted on web-site Dates Rough draft due to TAs homework box on Monday Nov. 16 th
More informationAn Old Research Question
ANOVA An Old Research Question The impact of TV on high-school grade Watch or not watch Two groups The impact of TV hours on high-school grade Exactly how much TV watching would make difference Multiple
More information(Foundation of Medical Statistics)
(Foundation of Medical Statistics) ( ) 4. ANOVA and the multiple comparisons 26/10/2018 Math and Stat in Medical Sciences Basic Statistics 26/10/2018 1 / 27 Analysis of variance (ANOVA) Consider more than
More informationA posteriori multiple comparison tests
A posteriori multiple comparison tests 11/15/16 1 Recall the Lakes experiment Source of variation SS DF MS F P Lakes 58.000 2 29.400 8.243 0.006 Error 42.800 12 3.567 Total 101.600 14 The ANOVA tells us
More informationLaboratory Topics 4 & 5
PLS205 Lab 3 January 23, 2014 Orthogonal contrasts Class comparisons in SAS Trend analysis in SAS Multiple mean comparisons Laboratory Topics 4 & 5 Orthogonal contrasts Planned, single degree-of-freedom
More informationExperimental Design and Data Analysis for Biologists
Experimental Design and Data Analysis for Biologists Gerry P. Quinn Monash University Michael J. Keough University of Melbourne CAMBRIDGE UNIVERSITY PRESS Contents Preface page xv I I Introduction 1 1.1
More informationTHE PRINCIPLES AND PRACTICE OF STATISTICS IN BIOLOGICAL RESEARCH. Robert R. SOKAL and F. James ROHLF. State University of New York at Stony Brook
BIOMETRY THE PRINCIPLES AND PRACTICE OF STATISTICS IN BIOLOGICAL RESEARCH THIRD E D I T I O N Robert R. SOKAL and F. James ROHLF State University of New York at Stony Brook W. H. FREEMAN AND COMPANY New
More informationChapter Seven: Multi-Sample Methods 1/52
Chapter Seven: Multi-Sample Methods 1/52 7.1 Introduction 2/52 Introduction The independent samples t test and the independent samples Z test for a difference between proportions are designed to analyze
More informationCOMPARISON OF MEANS OF SEVERAL RANDOM SAMPLES. ANOVA
Experimental Design and Statistical Methods Workshop COMPARISON OF MEANS OF SEVERAL RANDOM SAMPLES. ANOVA Jesús Piedrafita Arilla jesus.piedrafita@uab.cat Departament de Ciència Animal i dels Aliments
More informationTransition Passage to Descriptive Statistics 28
viii Preface xiv chapter 1 Introduction 1 Disciplines That Use Quantitative Data 5 What Do You Mean, Statistics? 6 Statistics: A Dynamic Discipline 8 Some Terminology 9 Problems and Answers 12 Scales of
More informationStatistics for EES Factorial analysis of variance
Statistics for EES Factorial analysis of variance Dirk Metzler June 12, 2015 Contents 1 ANOVA and F -Test 1 2 Pairwise comparisons and multiple testing 6 3 Non-parametric: The Kruskal-Wallis Test 9 1 ANOVA
More informationAnalysis of variance (ANOVA) Comparing the means of more than two groups
Analysis of variance (ANOVA) Comparing the means of more than two groups Example: Cost of mating in male fruit flies Drosophila Treatments: place males with and without unmated (virgin) females Five treatments
More information13: Additional ANOVA Topics. Post hoc Comparisons
13: Additional ANOVA Topics Post hoc Comparisons ANOVA Assumptions Assessing Group Variances When Distributional Assumptions are Severely Violated Post hoc Comparisons In the prior chapter we used ANOVA
More informationBIOL 458 BIOMETRY Lab 9 - Correlation and Bivariate Regression
BIOL 458 BIOMETRY Lab 9 - Correlation and Bivariate Regression Introduction to Correlation and Regression The procedures discussed in the previous ANOVA labs are most useful in cases where we are interested
More informationSleep data, two drugs Ch13.xls
Model Based Statistics in Biology. Part IV. The General Linear Mixed Model.. Chapter 13.3 Fixed*Random Effects (Paired t-test) ReCap. Part I (Chapters 1,2,3,4), Part II (Ch 5, 6, 7) ReCap Part III (Ch
More informationHYPOTHESIS TESTING II TESTS ON MEANS. Sorana D. Bolboacă
HYPOTHESIS TESTING II TESTS ON MEANS Sorana D. Bolboacă OBJECTIVES Significance value vs p value Parametric vs non parametric tests Tests on means: 1 Dec 14 2 SIGNIFICANCE LEVEL VS. p VALUE Materials and
More informationSPSS Guide For MMI 409
SPSS Guide For MMI 409 by John Wong March 2012 Preface Hopefully, this document can provide some guidance to MMI 409 students on how to use SPSS to solve many of the problems covered in the D Agostino
More informationMultiple Comparison Procedures Cohen Chapter 13. For EDUC/PSY 6600
Multiple Comparison Procedures Cohen Chapter 13 For EDUC/PSY 6600 1 We have to go to the deductions and the inferences, said Lestrade, winking at me. I find it hard enough to tackle facts, Holmes, without
More informationDegrees of freedom df=1. Limitations OR in SPSS LIM: Knowing σ and µ is unlikely in large
Z Test Comparing a group mean to a hypothesis T test (about 1 mean) T test (about 2 means) Comparing mean to sample mean. Similar means = will have same response to treatment Two unknown means are different
More information4.1. Introduction: Comparing Means
4. Analysis of Variance (ANOVA) 4.1. Introduction: Comparing Means Consider the problem of testing H 0 : µ 1 = µ 2 against H 1 : µ 1 µ 2 in two independent samples of two different populations of possibly
More informationStatistiek II. John Nerbonne using reworkings by Hartmut Fitz and Wilbert Heeringa. February 13, Dept of Information Science
Statistiek II John Nerbonne using reworkings by Hartmut Fitz and Wilbert Heeringa Dept of Information Science j.nerbonne@rug.nl February 13, 2014 Course outline 1 One-way ANOVA. 2 Factorial ANOVA. 3 Repeated
More informationOne-way between-subjects ANOVA. Comparing three or more independent means
One-way between-subjects ANOVA Comparing three or more independent means Data files SpiderBG.sav Attractiveness.sav Homework: sourcesofself-esteem.sav ANOVA: A Framework Understand the basic principles
More informationDETAILED CONTENTS PART I INTRODUCTION AND DESCRIPTIVE STATISTICS. 1. Introduction to Statistics
DETAILED CONTENTS About the Author Preface to the Instructor To the Student How to Use SPSS With This Book PART I INTRODUCTION AND DESCRIPTIVE STATISTICS 1. Introduction to Statistics 1.1 Descriptive and
More information22s:152 Applied Linear Regression. Chapter 8: 1-Way Analysis of Variance (ANOVA) 2-Way Analysis of Variance (ANOVA)
22s:152 Applied Linear Regression Chapter 8: 1-Way Analysis of Variance (ANOVA) 2-Way Analysis of Variance (ANOVA) We now consider an analysis with only categorical predictors (i.e. all predictors are
More informationIntroduction and Descriptive Statistics p. 1 Introduction to Statistics p. 3 Statistics, Science, and Observations p. 5 Populations and Samples p.
Preface p. xi Introduction and Descriptive Statistics p. 1 Introduction to Statistics p. 3 Statistics, Science, and Observations p. 5 Populations and Samples p. 6 The Scientific Method and the Design of
More informationAnalysis of Variance
Analysis of Variance Blood coagulation time T avg A 62 60 63 59 61 B 63 67 71 64 65 66 66 C 68 66 71 67 68 68 68 D 56 62 60 61 63 64 63 59 61 64 Blood coagulation time A B C D Combined 56 57 58 59 60 61
More informationContents. Acknowledgments. xix
Table of Preface Acknowledgments page xv xix 1 Introduction 1 The Role of the Computer in Data Analysis 1 Statistics: Descriptive and Inferential 2 Variables and Constants 3 The Measurement of Variables
More informationPreface Introduction to Statistics and Data Analysis Overview: Statistical Inference, Samples, Populations, and Experimental Design The Role of
Preface Introduction to Statistics and Data Analysis Overview: Statistical Inference, Samples, Populations, and Experimental Design The Role of Probability Sampling Procedures Collection of Data Measures
More informationBattery Life. Factory
Statistics 354 (Fall 2018) Analysis of Variance: Comparing Several Means Remark. These notes are from an elementary statistics class and introduce the Analysis of Variance technique for comparing several
More informationAnalysis of Variance (ANOVA)
Analysis of Variance (ANOVA) Much of statistical inference centers around the ability to distinguish between two or more groups in terms of some underlying response variable y. Sometimes, there are but
More informationCHAPTER 17 CHI-SQUARE AND OTHER NONPARAMETRIC TESTS FROM: PAGANO, R. R. (2007)
FROM: PAGANO, R. R. (007) I. INTRODUCTION: DISTINCTION BETWEEN PARAMETRIC AND NON-PARAMETRIC TESTS Statistical inference tests are often classified as to whether they are parametric or nonparametric Parameter
More informationhttp://www.statsoft.it/out.php?loc=http://www.statsoft.com/textbook/ Group comparison test for independent samples The purpose of the Analysis of Variance (ANOVA) is to test for significant differences
More informationMore about Single Factor Experiments
More about Single Factor Experiments 1 2 3 0 / 23 1 2 3 1 / 23 Parameter estimation Effect Model (1): Y ij = µ + A i + ɛ ij, Ji A i = 0 Estimation: µ + A i = y i. ˆµ = y..  i = y i. y.. Effect Modell
More informationPreview from Notesale.co.uk Page 3 of 63
Stem-and-leaf diagram - vertical numbers on far left represent the 10s, numbers right of the line represent the 1s The mean should not be used if there are extreme scores, or for ranks and categories Unbiased
More informationStatistics in Stata Introduction to Stata
50 55 60 65 70 Statistics in Stata Introduction to Stata Thomas Scheike Statistical Methods, Used to test simple hypothesis regarding the mean in a single group. Independent samples and data approximately
More informationAnalysis of Variance (ANOVA)
Analysis of Variance (ANOVA) Two types of ANOVA tests: Independent measures and Repeated measures Comparing 2 means: X 1 = 20 t - test X 2 = 30 How can we Compare 3 means?: X 1 = 20 X 2 = 30 X 3 = 35 ANOVA
More informationWeek 14 Comparing k(> 2) Populations
Week 14 Comparing k(> 2) Populations Week 14 Objectives Methods associated with testing for the equality of k(> 2) means or proportions are presented. Post-testing concepts and analysis are introduced.
More informationPart II { Oneway Anova, Simple Linear Regression and ANCOVA with R
Part II { Oneway Anova, Simple Linear Regression and ANCOVA with R Gilles Lamothe February 21, 2017 Contents 1 Anova with one factor 2 1.1 The data.......................................... 2 1.2 A visual
More informationDESAIN EKSPERIMEN Analysis of Variances (ANOVA) Semester Genap 2017/2018 Jurusan Teknik Industri Universitas Brawijaya
DESAIN EKSPERIMEN Analysis of Variances (ANOVA) Semester Jurusan Teknik Industri Universitas Brawijaya Outline Introduction The Analysis of Variance Models for the Data Post-ANOVA Comparison of Means Sample
More informationThe legacy of Sir Ronald A. Fisher. Fisher s three fundamental principles: local control, replication, and randomization.
1 Chapter 1: Research Design Principles The legacy of Sir Ronald A. Fisher. Fisher s three fundamental principles: local control, replication, and randomization. 2 Chapter 2: Completely Randomized Design
More informationOrthogonal contrasts and multiple comparisons
BIOL 933 Lab 4 Fall 2017 Orthogonal contrasts Class comparisons in R Trend analysis in R Multiple mean comparisons Orthogonal contrasts and multiple comparisons Orthogonal contrasts Planned, single degree-of-freedom
More informationEPSE 592: Design & Analysis of Experiments
EPSE 592: Design & Analysis of Experiments Ed Kroc University of British Columbia ed.kroc@ubc.ca October 3 & 5, 2018 Ed Kroc (UBC) EPSE 592 October 3 & 5, 2018 1 / 41 Last Time One-way (one factor) fixed
More informationLinear Combinations of Group Means
Linear Combinations of Group Means Look at the handicap example on p. 150 of the text. proc means data=mth567.disability; class handicap; var score; proc sort data=mth567.disability; by handicap; proc
More informationDesign & Analysis of Experiments 7E 2009 Montgomery
1 What If There Are More Than Two Factor Levels? The t-test does not directly apply ppy There are lots of practical situations where there are either more than two levels of interest, or there are several
More informationOne-Way ANOVA Cohen Chapter 12 EDUC/PSY 6600
One-Way ANOVA Cohen Chapter 1 EDUC/PSY 6600 1 It is easy to lie with statistics. It is hard to tell the truth without statistics. -Andrejs Dunkels Motivating examples Dr. Vito randomly assigns 30 individuals
More informationTypes of Statistical Tests DR. MIKE MARRAPODI
Types of Statistical Tests DR. MIKE MARRAPODI Tests t tests ANOVA Correlation Regression Multivariate Techniques Non-parametric t tests One sample t test Independent t test Paired sample t test One sample
More informationOne-Way ANOVA. Some examples of when ANOVA would be appropriate include:
One-Way ANOVA 1. Purpose Analysis of variance (ANOVA) is used when one wishes to determine whether two or more groups (e.g., classes A, B, and C) differ on some outcome of interest (e.g., an achievement
More informationChapter 12. Analysis of variance
Serik Sagitov, Chalmers and GU, January 9, 016 Chapter 1. Analysis of variance Chapter 11: I = samples independent samples paired samples Chapter 1: I 3 samples of equal size J one-way layout two-way layout
More informationStatistics for Managers Using Microsoft Excel Chapter 10 ANOVA and Other C-Sample Tests With Numerical Data
Statistics for Managers Using Microsoft Excel Chapter 10 ANOVA and Other C-Sample Tests With Numerical Data 1999 Prentice-Hall, Inc. Chap. 10-1 Chapter Topics The Completely Randomized Model: One-Factor
More informationGarvan Ins)tute Biosta)s)cal Workshop 16/7/2015. Tuan V. Nguyen. Garvan Ins)tute of Medical Research Sydney, Australia
Garvan Ins)tute Biosta)s)cal Workshop 16/7/2015 Tuan V. Nguyen Tuan V. Nguyen Garvan Ins)tute of Medical Research Sydney, Australia Analysis of variance Between- group and within- group varia)on explained
More informationSTA2601. Tutorial letter 203/2/2017. Applied Statistics II. Semester 2. Department of Statistics STA2601/203/2/2017. Solutions to Assignment 03
STA60/03//07 Tutorial letter 03//07 Applied Statistics II STA60 Semester Department of Statistics Solutions to Assignment 03 Define tomorrow. university of south africa QUESTION (a) (i) The normal quantile
More information1 One-way Analysis of Variance
1 One-way Analysis of Variance Suppose that a random sample of q individuals receives treatment T i, i = 1,,... p. Let Y ij be the response from the jth individual to be treated with the ith treatment
More informationWhat is a Hypothesis?
What is a Hypothesis? A hypothesis is a claim (assumption) about a population parameter: population mean Example: The mean monthly cell phone bill in this city is μ = $42 population proportion Example:
More informationSTAT 263/363: Experimental Design Winter 2016/17. Lecture 1 January 9. Why perform Design of Experiments (DOE)? There are at least two reasons:
STAT 263/363: Experimental Design Winter 206/7 Lecture January 9 Lecturer: Minyong Lee Scribe: Zachary del Rosario. Design of Experiments Why perform Design of Experiments (DOE)? There are at least two
More informationGLMM workshop 7 July 2016 Instructors: David Schneider, with Louis Charron, Devin Flawd, Kyle Millar, Anne St. Pierre Provencher, Sam Trueman
GLMM workshop 7 July 2016 Instructors: David Schneider, with Louis Charron, Devin Flawd, Kyle Millar, Anne St. Pierre Provencher, Sam Trueman First session 1 PM Room SN2109 Writing the model Break Second
More informationExtensions of One-Way ANOVA.
Extensions of One-Way ANOVA http://www.pelagicos.net/classes_biometry_fa18.htm What do I want You to Know What are two main limitations of ANOVA? What two approaches can follow a significant ANOVA? How
More informationContrasts (in general)
10/1/015 6-09/749 Experimental Design for Behavioral and Social Sciences Contrasts (in general) Context: An ANOVA rejects the overall null hypothesis that all k means of some factor are not equal, i.e.,
More informationNotes on Maxwell & Delaney
Notes on Maxwell & Delaney PSY710 9 Designs with Covariates 9.1 Blocking Consider the following hypothetical experiment. We want to measure the effect of a drug on locomotor activity in hyperactive children.
More informationLec 3: Model Adequacy Checking
November 16, 2011 Model validation Model validation is a very important step in the model building procedure. (one of the most overlooked) A high R 2 value does not guarantee that the model fits the data
More informationLec 1: An Introduction to ANOVA
Ying Li Stockholm University October 31, 2011 Three end-aisle displays Which is the best? Design of the Experiment Identify the stores of the similar size and type. The displays are randomly assigned to
More informationDr. Junchao Xia Center of Biophysics and Computational Biology. Fall /8/2016 1/38
BIO5312 Biostatistics Lecture 11: Multisample Hypothesis Testing II Dr. Junchao Xia Center of Biophysics and Computational Biology Fall 2016 11/8/2016 1/38 Outline In this lecture, we will continue to
More informationDifference in two or more average scores in different groups
ANOVAs Analysis of Variance (ANOVA) Difference in two or more average scores in different groups Each participant tested once Same outcome tested in each group Simplest is one-way ANOVA (one variable as
More informationBasic Statistical Analysis
indexerrt.qxd 8/21/2002 9:47 AM Page 1 Corrected index pages for Sprinthall Basic Statistical Analysis Seventh Edition indexerrt.qxd 8/21/2002 9:47 AM Page 656 Index Abscissa, 24 AB-STAT, vii ADD-OR rule,
More informationMean Comparisons PLANNED F TESTS
Mean Comparisons F-tests provide information on significance of treatment effects, but no information on what the treatment effects are. Comparisons of treatment means provide information on what the treatment
More informationReview of the General Linear Model
Review of the General Linear Model EPSY 905: Multivariate Analysis Online Lecture #2 Learning Objectives Types of distributions: Ø Conditional distributions The General Linear Model Ø Regression Ø Analysis
More informationModule 4: Regression Methods: Concepts and Applications
Module 4: Regression Methods: Concepts and Applications Example Analysis Code Rebecca Hubbard, Mary Lou Thompson July 11-13, 2018 Install R Go to http://cran.rstudio.com/ (http://cran.rstudio.com/) Click
More informationThe ε ij (i.e. the errors or residuals) are normally distributed. This assumption has the least influence on the F test.
Lecture 11 Topic 8: Data Transformations Assumptions of the Analysis of Variance 1. Independence of errors The ε ij (i.e. the errors or residuals) are statistically independent from one another. Failure
More informationANOVA CIVL 7012/8012
ANOVA CIVL 7012/8012 ANOVA ANOVA = Analysis of Variance A statistical method used to compare means among various datasets (2 or more samples) Can provide summary of any regression analysis in a table called
More informationLinear Combinations. Comparison of treatment means. Bruce A Craig. Department of Statistics Purdue University. STAT 514 Topic 6 1
Linear Combinations Comparison of treatment means Bruce A Craig Department of Statistics Purdue University STAT 514 Topic 6 1 Linear Combinations of Means y ij = µ + τ i + ǫ ij = µ i + ǫ ij Often study
More informationReview of Statistics 101
Review of Statistics 101 We review some important themes from the course 1. Introduction Statistics- Set of methods for collecting/analyzing data (the art and science of learning from data). Provides methods
More informationOne-way between-subjects ANOVA. Comparing three or more independent means
One-way between-subjects ANOVA Comparing three or more independent means ANOVA: A Framework Understand the basic principles of ANOVA Why it is done? What it tells us? Theory of one-way between-subjects
More informationSpecific Differences. Lukas Meier, Seminar für Statistik
Specific Differences Lukas Meier, Seminar für Statistik Problem with Global F-test Problem: Global F-test (aka omnibus F-test) is very unspecific. Typically: Want a more precise answer (or have a more
More informationGlossary. The ISI glossary of statistical terms provides definitions in a number of different languages:
Glossary The ISI glossary of statistical terms provides definitions in a number of different languages: http://isi.cbs.nl/glossary/index.htm Adjusted r 2 Adjusted R squared measures the proportion of the
More informationPSY 307 Statistics for the Behavioral Sciences. Chapter 20 Tests for Ranked Data, Choosing Statistical Tests
PSY 307 Statistics for the Behavioral Sciences Chapter 20 Tests for Ranked Data, Choosing Statistical Tests What To Do with Non-normal Distributions Tranformations (pg 382): The shape of the distribution
More informationCuckoo Birds. Analysis of Variance. Display of Cuckoo Bird Egg Lengths
Cuckoo Birds Analysis of Variance Bret Larget Departments of Botany and of Statistics University of Wisconsin Madison Statistics 371 29th November 2005 Cuckoo birds have a behavior in which they lay their
More informationExam details. Final Review Session. Things to Review
Exam details Final Review Session Short answer, similar to book problems Formulae and tables will be given You CAN use a calculator Date and Time: Dec. 7, 006, 1-1:30 pm Location: Osborne Centre, Unit
More informationModule 9: Nonparametric Statistics Statistics (OA3102)
Module 9: Nonparametric Statistics Statistics (OA3102) Professor Ron Fricker Naval Postgraduate School Monterey, California Reading assignment: WM&S chapter 15.1-15.6 Revision: 3-12 1 Goals for this Lecture
More information1 Introduction to Minitab
1 Introduction to Minitab Minitab is a statistical analysis software package. The software is freely available to all students and is downloadable through the Technology Tab at my.calpoly.edu. When you
More informationWorkshop 7.4a: Single factor ANOVA
-1- Workshop 7.4a: Single factor ANOVA Murray Logan November 23, 2016 Table of contents 1 Revision 1 2 Anova Parameterization 2 3 Partitioning of variance (ANOVA) 10 4 Worked Examples 13 1. Revision 1.1.
More information3. Nonparametric methods
3. Nonparametric methods If the probability distributions of the statistical variables are unknown or are not as required (e.g. normality assumption violated), then we may still apply nonparametric tests
More information