Assumptions of the ANOVA The error terms are randomly, independently, and normally distributed, with a mean of zero and a common variance. –There should.

Slides:



Advertisements
Similar presentations
Assumptions underlying regression analysis
Advertisements

I OWA S TATE U NIVERSITY Department of Animal Science Using Basic Graphical and Statistical Procedures (Chapter in the 8 Little SAS Book) Animal Science.
Statistical Techniques I EXST7005 Start here Measures of Dispersion.
BPS - 5th Ed. Chapter 241 One-Way Analysis of Variance: Comparing Several Means.
Inference for Regression
Analysis of variance (ANOVA)-the General Linear Model (GLM)
STA305 week 31 Assessing Model Adequacy A number of assumptions were made about the model, and these need to be verified in order to use the model for.
Regression Analysis Once a linear relationship is defined, the independent variable can be used to forecast the dependent variable. Y ^ = bo + bX bo is.
Copyright ©2011 Brooks/Cole, Cengage Learning Analysis of Variance Chapter 16 1.
Part I – MULTIVARIATE ANALYSIS
Analysis of Variance. Experimental Design u Investigator controls one or more independent variables –Called treatment variables or factors –Contain two.
Statistics Are Fun! Analysis of Variance
Chapter 3 Analysis of Variance
Chapter 3 Experiments with a Single Factor: The Analysis of Variance
MARE 250 Dr. Jason Turner Hypothesis Testing III.
Lecture 9: One Way ANOVA Between Subjects
Copyright © 2006 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide Are the Means of Several Groups Equal? Ho:Ha: Consider the following.
Analysis of Variance Chapter 3Design & Analysis of Experiments 7E 2009 Montgomery 1.
One-way Between Groups Analysis of Variance
Analysis of variance (2) Lecture 10. Normality Check Frequency histogram (Skewness & Kurtosis) Probability plot, K-S test Normality Check Frequency histogram.
© 2005 The McGraw-Hill Companies, Inc., All Rights Reserved. Chapter 13 Using Inferential Statistics.
PSY 307 – Statistics for the Behavioral Sciences Chapter 19 – Chi-Square Test for Qualitative Data Chapter 21 – Deciding Which Test to Use.
Assumption and Data Transformation. Assumption of Anova The error terms are randomly, independently, and normally distributed The error terms are randomly,
Summary of Quantitative Analysis Neuman and Robson Ch. 11
One-Way ANOVA Independent Samples. Basic Design Grouping variable with 2 or more levels Continuous dependent/criterion variable H  :  1 =  2 =... =
Transforming the data Modified from: Gotelli and Allison Chapter 8; Sokal and Rohlf 2000 Chapter 13.
Assumptions of the ANOVA
Slide 1 Testing Multivariate Assumptions The multivariate statistical techniques which we will cover in this class require one or more the following assumptions.
Relationships Among Variables
Chapter 12: Analysis of Variance
Analysis of Variance. ANOVA Probably the most popular analysis in psychology Why? Ease of implementation Allows for analysis of several groups at once.
F-Test ( ANOVA ) & Two-Way ANOVA
ANCOVA Lecture 9 Andrew Ainsworth. What is ANCOVA?
Overview of Meta-Analytic Data Analysis
Fixed vs. Random Effects Fixed effect –we are interested in the effects of the treatments (or blocks) per se –if the experiment were repeated, the levels.
Choosing and using statistics to test ecological hypotheses
The Scientific Method Formulation of an H ypothesis P lanning an experiment to objectively test the hypothesis Careful observation and collection of D.
Educational Research: Competencies for Analysis and Application, 9 th edition. Gay, Mills, & Airasian © 2009 Pearson Education, Inc. All rights reserved.
Psychology 301 Chapters & Differences Between Two Means Introduction to Analysis of Variance Multiple Comparisons.
Testing Hypotheses about Differences among Several Means.
Educational Research Chapter 13 Inferential Statistics Gay, Mills, and Airasian 10 th Edition.
AOV Assumption Checking and Transformations (§ )
ITEC6310 Research Methods in Information Technology Instructor: Prof. Z. Yang Course Website: c6310.htm Office:
© Copyright McGraw-Hill Correlation and Regression CHAPTER 10.
1 G Lect 11a G Lecture 11a Example: Comparing variances ANOVA table ANOVA linear model ANOVA assumptions Data transformations Effect sizes.
ANOVA: Analysis of Variance.
Control of Experimental Error Blocking - –A block is a group of homogeneous experimental units –Maximize the variation among blocks in order to minimize.
1 ANALYSIS OF VARIANCE (ANOVA) Heibatollah Baghi, and Mastee Badii.
Introduction to Basic Statistical Tools for Research OCED 5443 Interpreting Research in OCED Dr. Ausburn OCED 5443 Interpreting Research in OCED Dr. Ausburn.
Chapter Eight: Using Statistics to Answer Questions.
Chapter 12 Introduction to Analysis of Variance PowerPoint Lecture Slides Essentials of Statistics for the Behavioral Sciences Eighth Edition by Frederick.
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.
PCB 3043L - General Ecology Data Analysis.
IE241: Introduction to Design of Experiments. Last term we talked about testing the difference between two independent means. For means from a normal.
Introduction to ANOVA Research Designs for ANOVAs Type I Error and Multiple Hypothesis Tests The Logic of ANOVA ANOVA vocabulary, notation, and formulas.
Analysis of Variance STAT E-150 Statistical Methods.
THE SCIENTIFIC METHOD: It’s the method you use to study a question scientifically.
Chapter 11: Categorical Data n Chi-square goodness of fit test allows us to examine a single distribution of a categorical variable in a population. n.
Class Seven Turn In: Chapter 18: 32, 34, 36 Chapter 19: 26, 34, 44 Quiz 3 For Class Eight: Chapter 20: 18, 20, 24 Chapter 22: 34, 36 Read Chapters 23 &
F73DA2 INTRODUCTORY DATA ANALYSIS ANALYSIS OF VARIANCE.
1 Chapter 5.8 What if We Have More Than Two Samples?
The 2 nd to last topic this year!!.  ANOVA Testing is similar to a “two sample t- test except” that it compares more than two samples to one another.
Transforming the data Modified from:
Step 1: Specify a null hypothesis
MEASURES OF CENTRAL TENDENCY Central tendency means average performance, while dispersion of a data is how it spreads from a central tendency. He measures.
CHAPTER 29: Multiple Regression*
Joanna Romaniuk Quanticate, Warsaw, Poland
Chapter Nine: Using Statistics to Answer Questions
STATISTICS INFORMED DECISIONS USING DATA
Presentation transcript:

Assumptions of the ANOVA The error terms are randomly, independently, and normally distributed, with a mean of zero and a common variance. –There should be no systematic patterns among the residuals –The distribution of residuals should be symmetric (not skewed) –there should be no relationship between the size of the error variance and the mean for different treatments or blocks –The error variances for different treatment levels or different blocks should be homogeneous The main effects are additive –the magnitude of differences among treatments in one block should be similar in all other blocks –i.e., there is no interaction between treatments and blocks

If the ANOVA assumptions are violated: Affects sensitivity of the F test Significance level of mean comparisons may be much different than they appear to be Can lead to invalid conclusions

Diagnostics Use descriptive statistics to test assumptions before you analyze the data –Means, medians and quartiles for each group (histograms, box plots) –Tests for normality, additivity –Compare variances for each group Examine residuals after fitting the model in your analysis –Descriptive statistics of residuals –Normal plot of residuals –Plots of residuals in order of observation –Relationship between residuals and predicted values (fitted values)

SAS Box Plots Look For  Outliers  Skewness  Common Variance Caution  Not many observations per group

Additivity Y ij =  +  i +  ij CRD Y ij =  +  i +  j +  ij RBD Linear additive model for each experimental design n Implies that a treatment effect is the same for all blocks and that the block effect is the same for all treatments

When the assumption would not be correct... Water Table When there is an interaction between blocks and treatments - the model is no longer additive –may be multiplicative; for example, when one treatment always exceeds another by a certain percentage Two nitrogen treatments applied to 3 blocks Differences between treatments might be greater in block 3

SAS interaction plot

Test is applicable to any two-way classification such as RBD classified by blocks and treatments Testing Additivity --- Tukey’s test Compute SS for nonadditivity = (Q 2 *N)/(SST*SSB) with 1 df The error term is partitioned into nonadditivity and residual and can be tested with F Compute a table with raw data, treatment means, treatment effects ( ), block means and block effects ( ) Q =  Y ij ( ) ( ) N = t*r Test can also be done with SAS

Residuals Residuals are the error terms – what is left over after accounting for all of the effects in the model CRD RBD

Independence Independence implies that the error (residual) for one observation is unrelated to the error for another –Adjacent plots are more similar than randomly scattered plots –So the best insurance is randomization –In some cases it may be better to throw out a randomization that could lead to biased estimates of treatment effects

Normality Look at stem leaf plots, boxplots of residuals Normal probability plots Minor deviations from normality are not generally a problem for the ANOVA

Normality

Homogeneity of Variances Logic would tell us that differences required for significance would be greater for the two highly variable treatments Replicates Treatment12345TotalMean s 2 A B C D

If we analyzed together: SourcedfSSMSF Treatments ** Error LSD=4.74 SourcedfSSMSF Treatments * Error SourcedfSSMSF Treatments Error Analysis for A and B Analysis for C and D Conclusions would be different if we analyzed the two groups separately:

Test the effect of a new vitamin on the weights of animals. What you see What the ANOVA assumes Independence of Means and Variances A relationship between means and variances is the most common cause of heterogeneity of variance

Take each observation and remove the general mean, the treatment effects and the block effects; what is left will be the error term for that observation The model = Block effect = Treatment effect = so... then... Finally... Examining the error terms

Looking at the error components Trt.IIIIIIIVMean A B C D Mean Trt.IIIIIIIVMean A B C D Mean00000 e 11 = 47 – 52 – = 0

Looking at the error components Trt.IIIIIIIVMean A B C D E F Mean Trt.IIIIIIIV A B C D E F e 11 = 0.18 – = 8.88

Predicted values

Residual Plots A valuable tool for examining the validity of assumptions for ANOVA – should see a random scattering of points on the plot For simple models, there may be a limited number of groups on the Predicted axis Look for random dispersion of residuals

Residual Plots – Outlier Detection Recheck data input May have to treat as a missing plot if too extreme

Are the errors randomly distributed? in this example the variance of the errors increases with the mean

Residual Plots Errors are not independent Model may not be adequate –e.g., fitting a straight regression line when response is curvilinear

Homogeneity Quick Test (F Max Test) By examining the ratio of the largest variance to the smallest and comparing with a probability table of ratios, you can get a quick test. The null hypothesis is that variances are equal, so if your computed ratio is greater than the table value (Kuehl, Table VIII), you reject the null hypothesis. Where t = number of independent variances (mean squares) that you are comparing v = degrees of freedom associated with each mean square

An Example An RBD experiment with four blocks to determine the effect of salinity on the application of N and P on sorghum /9.03 = Table value (t=7, v=r-1=3) = >72.9 Reject null hypothesis and conclude that variances are NOT homogeneous (equal)

Other HOV tests are more sensitive If the quick test indicates that variances are not equal (homogeneous), no need to test further But if quick test indicates that variances ARE homogeneous, you may want to go further with a Levene (Med) test or Bartlett’s test which are more sensitive. This is especially true for values of t and v that are relatively small. F max, Levene (Med), and Bartlett’s tests can be adapted to evaluate homogeneity of error variances from different sites in multilocational trials.

Homogeneity of Variances - Tests Johnson (1981) compared 56 tests for homogeneity of variance and found the Levene (Med) test to be one of the best. –Based on deviations of observations from the median for each treatment group. Test statistic is compared to a critical F ,t-1,N-t value. –This is now the default homogeneity of variance test in SAS (HOVTEST). Bartlett’s test is also common –Based on a chi-square test with t-1 df –If calculated value is greater than tabular value, then variances are heterogeneous

What to do if assumptions are violated? Divide your experiment into subsets of blocks or treatments that meet the assumptions and conduct separate analyses Transform the data and repeat the analysis –residuals follow another distribution (e.g., binomial, Poisson) –there is a specific relationship between means and variances –residuals of transformed data must meet the ANOVA assumptions Use a nonparametric test –no assumptions are made about the distribution of the residuals –most are based on ranks – some information is lost –generally less powerful than parametric tests Use a Generalized Linear Model (PROC GLIMMIX in SAS) –make the model fit the data, rather than changing the data to fit the model

Independence between means and variances... Can usually tell just by looking. Do the variances increase as the means increase? If so, construct a table of ratios of variance to means and standard deviation to means Determine which is more nearly proportional - the ratio that remains more constant will be the one more nearly proportional This information is necessary to know which transformation to use – the idea is to convert a known probability distribution to a normal distribution

M-C M-V C-C C-V S-C S-V Trt MeanVar SDev Var/M SDev/M Comparing Ratios - Which Transformation? SDev roughly proportional to the means

The Log Transformation When the standard deviations (not the variances) of samples are roughly proportional to the means, the log transformation is most effective Common for counts that vary across a wide range of values –numbers of insects –number of diseased plants/plot Also applicable if there is evidence of multiplicative rather than additive main effects –e.g., an insecticide reduces numbers of insects by 50%

General remarks... Data with negative values cannot be transformed with logs Zeros present a special problem If negative values or zeros are present, add 1 to all data points before transforming You can multiply all data points by a constant without violating any rules Do this if any of the data points are less than 1 (to avoid negative logs)

Recheck... After transformation, rerun the ANOVA on the transformed data Recheck the transformed data against the assumptions for the ANOVA –Look at residual plots, normal plots –Carry out Levene’s test or Bartlett’s for homogeneity of variance –Apply Tukey’s test for additivity Beware that a transformation that corrects one violation in assumptions may introduce another

Square Root Transformation One of a family of power transformations Use when you have counts of rare events in time or space –number of insects caught in a trap The variance tends to be proportional to the mean May follow a Poisson distribution If there are counts under 10, it is best to use square root of Y +.5 Will be easier to declare significant differences in mean separation When reporting, “detransform” the means – present summary mean tables on original scale

Arcsin or Angular Transformation Counts expressed as percentages or proportions of the total sample may require transformation Follow a binomial distribution - variances tend to be small at both ends of the range of values ( close to 0 and 100%) Not all percentage data are binomial in nature –e.g., grain protein is a continuous, quantitative variable that would tend to follow a normal distribution If appropriate, it usually helps in mean separation

Arcsin or Angular Transformation Data should be transformed if the range of percentages is greater than 40 May not be necessary for percentages in the range of % If percentages are in the range of 0-30% or %, a square root transformation may be better Do not include treatments that are fixed at 0% or at 100% Percentages are converted to an angle expressed in degrees or in radians –express Y ij as a decimal fraction – gives results in radians –1 radian = degrees

Summary of Transformations

Reasons for Transformation We don’t use transformation just to give us results more to our liking We transform data so that the analysis will be valid and the conclusions correct Remember.... –all tests of significance and mean separation should be carried out on the transformed data –calculate means of the transformed data before “detransforming”