Part III The General Linear Model Chapter 10 GLM. ANOVA.

Slides:



Advertisements
Similar presentations
REMINDER 1) GLM Review on Friday 2) Exam II on Monday.
Advertisements

Part III The General Linear Model Chapter 9 Regression.
BHS Methods in Behavioral Sciences I April 25, 2003 Chapter 6 (Ray) The Logic of Hypothesis Testing.
ANOVA notes NR 245 Austin Troy
Part I – MULTIVARIATE ANALYSIS
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 Topics The Completely Randomized Model: One-Factor Analysis of Variance F-Test for Difference in c Means The Tukey-Kramer Procedure ANOVA Assumptions.
Chapter 3 Analysis of Variance
PSY 307 – Statistics for the Behavioral Sciences
Lecture 9: One Way ANOVA Between Subjects
Analysis of Variance Chapter 3Design & Analysis of Experiments 7E 2009 Montgomery 1.
Chapter 2 Simple Comparative Experiments
PY 427 Statistics 1Fall 2006 Kin Ching Kong, Ph.D Lecture 6 Chicago School of Professional Psychology.
Independent Sample T-test Classical design used in psychology/medicine N subjects are randomly assigned to two groups (Control * Treatment). After treatment,
Hypothesis Testing :The Difference between two population mean :
Review for Exam 2 Some important themes from Chapters 6-9 Chap. 6. Significance Tests Chap. 7: Comparing Two Groups Chap. 8: Contingency Tables (Categorical.
6.1 - One Sample One Sample  Mean μ, Variance σ 2, Proportion π Two Samples Two Samples  Means, Variances, Proportions μ 1 vs. μ 2.
Choosing Statistical Procedures
Analysis of Variance (ANOVA) Quantitative Methods in HPELS 440:210.
Psy B07 Chapter 1Slide 1 ANALYSIS OF VARIANCE. Psy B07 Chapter 1Slide 2 t-test refresher  In chapter 7 we talked about analyses that could be conducted.
AM Recitation 2/10/11.
1 1 Slide © 2006 Thomson/South-Western Slides Prepared by JOHN S. LOUCKS St. Edward’s University Slides Prepared by JOHN S. LOUCKS St. Edward’s University.
1 1 Slide © 2005 Thomson/South-Western Chapter 13, Part A Analysis of Variance and Experimental Design n Introduction to Analysis of Variance n Analysis.
More About Significance Tests
PROBABILITY & STATISTICAL INFERENCE LECTURE 6 MSc in Computing (Data Analytics)
Today: Quizz 8 Friday: GLM review Monday: Exam 2.
Stats Lunch: Day 7 One-Way ANOVA. Basic Steps of Calculating an ANOVA M = 3 M = 6 M = 10 Remember, there are 2 ways to estimate pop. variance in ANOVA:
Part IV The General Linear Model. Multiple Explanatory Variables Chapter 13.3 Fixed *Random Effects Paired t-test.
BIOL 4605/7220 Ch 13.3 Paired t-test GPT Lectures Cailin Xu October 26, 2011.
Comparing Two Population Means
One-Way Analysis of Variance Comparing means of more than 2 independent samples 1.
PSY 307 – Statistics for the Behavioral Sciences Chapter 16 – One-Factor Analysis of Variance (ANOVA)
Testing Multiple Means and the Analysis of Variance (§8.1, 8.2, 8.6) Situations where comparing more than two means is important. The approach to testing.
Basic concept Measures of central tendency Measures of central tendency Measures of dispersion & variability.
Psychology 301 Chapters & Differences Between Two Means Introduction to Analysis of Variance Multiple Comparisons.
Section Copyright © 2014, 2012, 2010 Pearson Education, Inc. Lecture Slides Elementary Statistics Twelfth Edition and the Triola Statistics Series.
Testing Hypotheses about Differences among Several Means.
BIOL 4605/7220 GPT Lectures Cailin Xu October 12, 2011 CH 9.3 Regression.
Inference and Inferential Statistics Methods of Educational Research EDU 660.
ANALYSIS OF VARIANCE (ANOVA) BCT 2053 CHAPTER 5. CONTENT 5.1 Introduction to ANOVA 5.2 One-Way ANOVA 5.3 Two-Way ANOVA.
Analysis of Variance 1 Dr. Mohammed Alahmed Ph.D. in BioStatistics (011)
Copyright © 2013, 2009, and 2007, Pearson Education, Inc. Chapter 13 Multiple Regression Section 13.3 Using Multiple Regression to Make Inferences.
Chapter 9 Three Tests of Significance Winston Jackson and Norine Verberg Methods: Doing Social Research, 4e.
Chapter 13 - ANOVA. ANOVA Be able to explain in general terms and using an example what a one-way ANOVA is (370). Know the purpose of the one-way ANOVA.
CHAPTER 4 Analysis of Variance One-way ANOVA
Analysis of Variance (One Factor). ANOVA Analysis of Variance Tests whether differences exist among population means categorized by only one factor or.
Chapter 17 Comparing Multiple Population Means: One-factor ANOVA.
Statistical Inference for the Mean Objectives: (Chapter 9, DeCoursey) -To understand the terms: Null Hypothesis, Rejection Region, and Type I and II errors.
1 ANALYSIS OF VARIANCE (ANOVA) Heibatollah Baghi, and Mastee Badii.
Copyright © Cengage Learning. All rights reserved. 12 Analysis of Variance.
Chapter 12 Introduction to Analysis of Variance PowerPoint Lecture Slides Essentials of Statistics for the Behavioral Sciences Eighth Edition by Frederick.
Business Statistics: A First Course (3rd Edition)
Econ 3790: Business and Economic Statistics Instructor: Yogesh Uppal
Hypothesis test flow chart frequency data Measurement scale number of variables 1 basic χ 2 test (19.5) Table I χ 2 test for independence (19.9) Table.
IE241: Introduction to Design of Experiments. Last term we talked about testing the difference between two independent means. For means from a normal.
One-Way Analysis of Variance Recapitulation Recapitulation 1. Comparing differences among three or more subsamples requires a different statistical test.
Introduction to ANOVA Research Designs for ANOVAs Type I Error and Multiple Hypothesis Tests The Logic of ANOVA ANOVA vocabulary, notation, and formulas.
Significance Tests for Regression Analysis. A. Testing the Significance of Regression Models The first important significance test is for the regression.
Analysis of Variance 11/6. Comparing Several Groups Do the group means differ? Naive approach – Independent-samples t-tests of all pairs – Each test doesn't.
Chapter 13 Understanding research results: statistical inference.
BHS Methods in Behavioral Sciences I May 9, 2003 Chapter 6 and 7 (Ray) Control: The Keystone of the Experimental Method.
HYPOTHESIS TESTING FOR DIFFERENCES BETWEEN MEANS AND BETWEEN PROPORTIONS.
©2013, The McGraw-Hill Companies, Inc. All Rights Reserved Chapter 4 Investigating the Difference in Scores.
Statistical Inference for the Mean Objectives: (Chapter 8&9, DeCoursey) -To understand the terms variance and standard error of a sample mean, Null Hypothesis,
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.
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.
i) Two way ANOVA without replication
Hypothesis testing using contrasts
Econ 3790: Business and Economic Statistics
Facts from figures Having obtained the results of an investigation, a scientist is faced with the prospect of trying to interpret them. In some cases the.
Presentation transcript:

Part III The General Linear Model Chapter 10 GLM. ANOVA.

Chapter 10.1 Single Sample t-test

GLM, applied to ANOVA Single Sample t-test. Sleep data example William Sealy Gosset AKA Student

1. Construct Model Verbal – Drug A increases time slept. Graphical model – Define quantity of interest D V G F T=T DrugA T Control –

1. Construct Model D V G F Formal – Response: – Explanatory: – Formal:

2. Execute analysis Data=Model+ResRes 2 T=βoβo +εε2ε2 0.7= = = = = = = = = = ∑=0∑= ?

3. Evaluate Model □ Straight line model ok? □ Errors homogeneous? □ Errors normal? □ Errors independent?

3. Evaluate Model □ Straight line model ok? □ Errors homogeneous? □ Errors normal? □ Errors independent? NA

3. Evaluate Model □ Straight line model ok? □ Errors homogeneous? □ Errors normal? □ Errors independent? NA

3. Evaluate Model □ Straight line model ok? □ Errors homogeneous? □ Errors normal? □ Errors independent? NA

3. Evaluate Model □ Straight line model ok? □ Errors homogeneous? □ Errors normal? □ Errors independent? NA

4. State population and whether sample is representative. a)Differences in time slept relative to control for all possible subjects b)All possible differences in time slept relative to control, given the experimental protocol c)Differences in time slept relative to control, given the experimental protocol

5. Decide on mode of inference. Is hypothesis testing appropriate? Does Drug A affect hours of sleep? – Don’t know if the answer is yes or no 6. State H A / H o pair, with tolerance for Type I error H A : H o : State test statistic: Distribution of test statistic: Tolerance for Type I error:

7. ANOVA- Calculate df, SS, MS, according to model GLM:T=βoβo +ε df: 1019 SS:

7. ANOVA- Calculate df, SS, MS, according to model GLM:T=βoβo +ε df:1019 SS: ANOVA Table dfSSMSFP-value DrugA0.218 Res Total

8. Recompute p-value if necessary. Assumptions met so no need to recompute 9. Declare and report decision about model terms (compare p to α). p = < α = 0.05, so reject H A : β o ≠ 0 Report decision: – There is no significant difference in extra time slept, for drug A (F 1,9 = 1.76, p = 0.218) – But might Type II error be a problem here?

There may be a difference, but it is hidden in the variance Power analysis: – Compute the minimum detectable difference T = 0.75 hours F = 1.76 p = T = 1.00 hours F = 3.12 p = T = 1.25 hours F = 4.88 p = T = 1.28 hours F = 5.12 p = Declare and report decision about model terms (compare p to α).

Another experiment, with more subjects, should be considered before concluding there is no evidence of an effect Power analysis: – Compute sample size needed to detect a difference n = 10 F = 1.76 p = n = 20 F = 3.71 p = n = 24 F = 4.49 p = Declare and report decision about model terms (compare p to α).

Parameters are not of interest there because there appears to be no difference BUT, with this sampling effort and variability, the study needs to be repeated to be conclusive. 10. Report and interpret parameters of biological interest.

Chapter 10.2 Two Sample t-test

GLM, applied to ANOVA Two Sample t-test. Sleep data example William Sealy Gosset AKA Student

1. Construct Model D V G F

2. Execute analysis lm1 <- lm(diff~drug, data=drugs) diffdrugfitsres 0.7DrugA DrugA DrugA DrugA DrugA DrugA DrugA DrugA DrugA DrugA DrugB DrugB DrugB DrugB DrugB DrugB DrugB DrugB DrugB DrugB

2. Execute analysis lm1 <- lm(diff~drug, data=drugs)

3. Evaluate Model □ Straight line model ok? □ Errors homogeneous? □ Errors normal? □ Errors independent?

3. Evaluate Model □ Straight line model ok? □ Errors homogeneous? □ Errors normal? □ Errors independent? NA

3. Evaluate Model □ Straight line model ok? □ Errors homogeneous? □ Errors normal? □ Errors independent? NA

3. Evaluate Model □ Straight line model ok? □ Errors homogeneous? □ Errors normal? □ Errors independent? NA

3. Evaluate Model □ Straight line model ok? □ Errors homogeneous? □ Errors normal? □ Errors independent? NA X

3. Evaluate Model □ Straight line model ok? □ Errors homogeneous? □ Errors normal? □ Errors independent? NA X

4. State population and whether sample is representative. All possible differences in time slept relative between the two groups 5. Decide on mode of inference. Is hypothesis testing appropriate? Yes. The question is whether one drug is better than the other. It is not clear whether the greater hours of sleep due to the one drug is more than just chance.

6. State H A / H o pair, with tolerance for Type I error H A : H o : State test statistic: Distribution of test statistic: Tolerance for Type I error:

7. ANOVA- Calculate df, SS, MS, according to model GLM:T=βoβo +β Drug Drug+ε Source:TotalDrugRes df: SS:

8. Recompute p-value if necessary. When assumptions not met, recompute if: – n small (n = 19, so _____) – p near α (p =0.079, so _____) Colquhoun (1971) carried out a randomization test – p = (976/12000)

9. Declare and report decision about model terms (compare p to α). p = < α = 0.05, so reject H A Report decision: – There is no significant difference in extra time slept for the two drugs (F 1,18 = 3.46, p = 0.081) – Again, Type II error may be a problem Run a Power Analysis to guide future study

Parameters are not of interest there because there appears to be no difference BUT, with this sampling effort and variability, the study needs to be repeated to be conclusive. – The inclusion of 10 more samples may allow the detection of a significant difference 10. Report and interpret parameters of biological interest.

Chapter 10.3 One way ANOVA, Fixed Effects

GLM, applied to ANOVA One way ANOVA, Fixed Effects Pea section growth data, from Box 9.4 in Sokal and Rohlf (1995). Does growth depend on treatment (control versus 4 different sugars with auxin present)? = + ε

1. Construct Model

2. Execute analysis lm1 <- lm(len~trt, data=peas) lentrtfitsres 75Control Control Control Control Control Control Control Control Control Control Glucose Glucose Glucose Glucose Glucose Glucose Glucose Glucose Glucose Glucose Fructose Fructose Fructose

3. Evaluate Model □ Straight line model ok? □ Errors homogeneous? □ Errors normal? □ Errors independent?

3. Evaluate Model □ Straight line model ok? □ Errors homogeneous? □ Errors normal? □ Errors independent? NA

3. Evaluate Model □ Straight line model ok? □ Errors homogeneous? □ Errors normal? □ Errors independent? NA

3. Evaluate Model □ Straight line model ok? □ Errors homogeneous? □ Errors normal? □ Errors independent? NA

3. Evaluate Model □ Straight line model ok? □ Errors homogeneous? □ Errors normal? □ Errors independent? NA

3. Evaluate Model □ Straight line model ok? □ Errors homogeneous? □ Errors normal? □ Errors independent? NA

3. Evaluate Model □ Straight line model ok? □ Errors homogeneous? □ Errors normal? □ Errors independent? NA

4. State population and whether sample is representative. Population is all possible measurements, given the method of applying treatments and the protocol for taking measurements. It is taken to be representative (i.e. not biased) 5. Decide on mode of inference. Is hypothesis testing appropriate? Yes. We want to know if there are any differences between treatments ANOVA tells us if there are ANY differences in variance among groups

6. State H A / H o pair Research Hypothesis (H A ) Treatment effects differ μ C ≠ μ G ≠ μ F ≠ μ G+F ≠ μ S OR var( β Trt Trt) > 0 Null Hypothesis (H o ) Treatment effects do not differ μ C = μ G = μ F = μ G+F = μ S OR var( β Trt Trt) = 0

6. H A / H o pairs for planned comparisons 5·5 = 25 possible comparisons We usually have some expectations about the direction of the contrasts among groups – Based on these, we can undertake planned or a priori comparisons – Examples: H A : β C ≠ (1/4)(β G + β F + β G+F + β S ) [Control vs. Treatment] H A : β G+F ≠ (1/3)(β G + β F + β S )[Mixed vs. Pure] H A : β S ≠ (1/2)(β G + β F )[Poly vs Mono]

6. H A / H o pair, test statistic, distribution, tolerance of Type I error State test statistic :F-ratio Distribution of test statistic: F-distribution Tolerance for Type I error: 5% BUT we need to adjust α for planned comparisons – 5% = 1 in 20; hence, we would likely reject one true H A if we did 20 comparisons – Adjust α level for three comparisons (use Dunn- Sidak method) α expwise = 1 – (1 – α) k = 1 – (1 – 0.05) 3 = 0.017

7. ANOVA GLM:Len – β o =β Trt Trt+ε Source:TotalTrtError df:n – SS: n = 50

8. Recompute p-value if necessary. Assumptions met, skip 9. Declare decision about model terms. p < p < 0.05 so accept H A That μ C ≠ μ G ≠ μ F ≠ μ G+F ≠ μ S Pea section length differs significantly among the 5 groups (control and 4 treatments). – F 4,45 = 49.37, p <

Where are the differences, among the 5 groups? – Two approaches: A priori A posteriori First planned comparison: Growth in treated media differs from that in untreated 10. Report and interpret parameters of biological interest.

Run t-test on Control vs. Treatment 10. Report and interpret parameters of biological interest. lentrtcomp1 75Control 67Control 70Control 75Control 65Control 71Control 67Control 67Control 76Control 68Control 57GlucoseTreatment 58GlucoseTreatment 60GlucoseTreatment 59GlucoseTreatment 62GlucoseTreatment 60GlucoseTreatment 60GlucoseTreatment 57GlucoseTreatment 59GlucoseTreatment 61GlucoseTreatment 58FructoseTreatment Analysis of Variance Table Response: len Df Sum Sq Mean Sq F value Pr(>F) comp e-12 *** Residuals lm2 <- lm(len~comp1, data=peas) anova(lm2)

First work out UCL ≤ mean ≤ LCL Control: 67.6 ≤ 70.1 ≤ 72.6 units (n=40) Treatment: 58.9 ≤ 59.9 ≤ 60.9 units (n=40) Then work out degree of difference (μ Con – μ Trt )/ μ Con ( )/70.1 = 15% Sugar supressed growth by 15% 10. Report and interpret parameters of biological interest.

Conclusions from the 3 planned comparisons: – A 2% sugar solution reduces growth F 1,45 = , α = > p < – Mixed glucose + fructose reduces growth relative to pure sugars F 1,45 = 8.82, α = > p = – The monosaccharides (fructose, glucose) suppress growth more than the polysaccharide (sucrose) F = 34.98, α = > p = Conclusions reaffirmed using CL 10. Report and interpret parameters of biological interest.

Chapter 10.4 One way ANOVA, Random Effects

GLM, applied to ANOVA One way ANOVA, Random Effects Example. Box 9.1 of Sokal and Rohlf 1995, p Does tick size, as measured by scutum width, differ among hosts (rabbits)? Random effects example – contrast with fixed effects

1. Construct Model

β H = [ , -5.33, -4.4, +1.6] β o = SS Total

β H = [ , -5.33, -4.4, +1.6] β o = SS H

β H = [ , -5.33, -4.4, +1.6] β o = SS Res

2.Execute analysis. 3.Evaluate model. 4.State the population and whether the sample is representative. – Fixed vs. Random Fixed: All possible measurement of scutum widths from ticks on these four rabbits only – A fixed factor has levels that are the only ones of interest (e.g. different sugar treatments). Random: All possible measurement of scutum widths from ticks found on all possible rabbits – A random factor has levels that are considered a sample from some larger population of levels (such as rabbits)

More Fixed vs. Random Because we want to infer to a larger population level Because we’re usually interested in specific contrasts Depends on context

5.Decide on mode of inference. Is hypothesis testing appropriate? 6.State H A / H o pair, test statistic, distribution, tolerance for Type I error. – Q: Is additional variation in size due to their host? – H A : Var(β H ·H) > 0 – H o : Var(β H ·H) = 0 7.ANOVA - Compute and partition the df in the response variable according to the model Recommendation: Cross-check your workings with the computer generated ANOVA table. This ensures the computer did what you wanted it to do!

8.Recompute p-value by randomization if necessary. 9.Declare and report statistical decision, with evidence – The variance among hosts exceeds variance within hosts (F 3,33 = 5.26, p = 0.004) 10.Report and interpret parameters of biological interest. – In this example the interest was in whether there was variance among the hosts. – There was no stated interest in which hosts differed, or by how much.