Chapter 5 Contrasts for One-Way ANOVA Page 1. What Is a Contrast?
Total Page:16
File Type:pdf, Size:1020Kb
Chapter 5 Contrasts for one-way ANOVA Page 1. What is a contrast? 5-2 2. Types of contrasts 5-5 3. Significance tests of a single contrast 5-10 4. Brand name contrasts 5-22 5. Relationships between the omnibus F and contrasts 5-24 6. Robust tests for a single contrast 5-29 7. Effect sizes for a single contrast 5-32 8. An example 5-34 Advanced topics in contrast analysis 9. Trend analysis 5-39 10. Simultaneous significance tests on multiple contrasts 5-52 11. Contrasts with unequal cell size 5-62 12. A final example 5-70 5-1 © 2006 A. Karpinski Contrasts for one-way ANOVA 1. What is a contrast? • A focused test of means • A weighted sum of means • Contrasts allow you to test your research hypothesis (as opposed to the statistical hypothesis) • Example: You want to investigate if a college education improves SAT scores. You obtain five groups with n = 25 in each group: o High School Seniors o College Seniors • Mathematics Majors • Chemistry Majors • English Majors • History Majors o All participants take the SAT and scores are recorded o The omnibus F-test examines the following hypotheses: H 0 : µ1 = µ 2 = µ3 = µ 4 = µ5 H1 : Not all µi 's are equal o But you want to know: • Do college seniors score differently than high school seniors? • Do natural science majors score differently than humanities majors? • Do math majors score differently than chemistry majors? • Do English majors score differently than history majors? HS College Students Students Math Chemistry English History µ 1 µ2 µ3 µ4 µ5 5-2 © 2006 A. Karpinski • Do college seniors score differently than high school seniors? HS College Students Students Math Chemistry English History µ1 µ + µ + µ + µ 2 3 4 5 4 µ + µ + µ + µ µ + µ + µ + µ H : µ = 2 3 4 5 H : µ ≠ 2 3 4 5 0 1 4 1 1 4 • Do natural science majors score differently than humanities majors? HS College Students Students Math Chemistry English History µ + µ µ + µ 2 3 4 5 2 2 µ + µ µ + µ µ + µ µ + µ H : 2 3 = 4 5 H : 2 3 ≠ 4 5 0 2 2 1 2 2 • Do math majors score differently than chemistry majors? HS College Students Students Math Chemistry English History µ2 µ3 H 0 : µ 2 = µ3 H1 : µ 2 ≠ µ3 • Do English majors score differently than history majors? HS College Students Students Math Chemistry English History µ4 µ5 H 0 : µ 4 = µ5 H1 : µ 4 ≠ µ5 5-3 © 2006 A. Karpinski • In general, a contrast is a set of weights that defines a specific comparison over the cell means a ψ = ∑ciµi = c1µ1 + c2µ2 + c3µ3 + ...+ caµa j =1 a ˆ ψ = ∑ci X i = c1X1 + c2 X 2 + c3 X 3 + ...+ ca X a j =1 o Where (µ1,µ2,µ3,...,µa ) are the population means for each group (X1 , X 2,X 3,...,X a ) are the observed means for each group (c1,c2,c3,...,ca )are weights/contrast coefficients a with ∑ci = 0 i=1 • A contrast is a linear combination of cell means o Do college seniors score differently than high school seniors? µ + µ + µ + µ µ + µ + µ + µ H : µ = 2 3 4 5 or H : µ − 2 3 4 5 = 0 0 1 4 0 1 4 1 1 1 1 1 1 1 1 ψ 1 = µ1 − µ 2 − µ3 − µ 4 − µ5 c = 1,− ,− ,− ,− 4 4 4 4 4 4 4 4 o Do natural science majors score differently than humanities majors? µ + µ µ + µ µ + µ µ + µ H : 2 3 = 4 5 or H : 2 3 − 4 5 = 0 0 2 2 0 2 2 1 1 1 1 1 1 1 1 ψ 2 = µ 2 + µ3 − µ 4 − µ5 c = 0, , ,− ,− 2 2 2 2 2 2 2 2 o Do math majors score differently than chemistry majors? H 0 : µ 2 = µ3 or H0 : µ2 − µ3 = 0 ψ 3 = µ 2 − µ3 c = (0,1,−1,0,0) 5-4 © 2006 A. Karpinski 2. Types of Contrasts • Pairwise contrasts o Comparisons between two cell means o Contrast is of the form ci = 1 and ci′ = −1 for some i and i′ a(a −1) o If you have a groups then there are possible pairwise contrasts 2 o Examples: • Do math majors score differently than chemistry majors? ψ 3 = µ 2 − µ3 c = (0,1,−1,0,0) • Do English majors score differently than history majors? ψ 4 = µ 4 − µ5 c = (0,0,0,1,−1) o When there are two groups (a = 2), then the two independent samples t- test is equivalent to the c = (1,−1) contrast on the two means. • Complex contrasts o A contrast between more than two means o There are an infinite number of contrasts you can perform for any design o Do college seniors score differently than high school seniors? 1 1 1 1 1 1 1 1 ψ 1 = µ1 − µ 2 − µ3 − µ 4 − µ5 c = 1,− ,− ,− ,− 4 4 4 4 4 4 4 4 o Do natural science majors score differently than humanities majors? 1 1 1 1 1 1 1 1 ψ 2 = µ 2 + µ3 − µ 4 − µ5 c = 0, , ,− ,− 2 2 2 2 2 2 2 2 o So long as the coefficients sum to zero, you can make any comparison: ψ k = .01µ1 − .08µ 2 − .98µ3 + .58µ 4 + .47µ5 c = (.01,−.08,−.98,.58,.47) • But remember you have to be able to interpret the result! 5-5 © 2006 A. Karpinski • Orthogonal contrasts o Sometimes called non-redundant contrasts o Orthogonality may be best understood through a counter-example o Suppose you want to test three contrasts: • Do math majors score differently than high school seniors? ψ 1 = µ 2 − µ1 c = (−1,1,0,0,0) • Do chemistry majors score differently than high school seniors? ψ 2 = µ3 − µ1 c = (−1,0,1,0,0) • Do math majors score differently than chemistry majors? ψ 3 = µ 2 − µ3 c = (0,1,−1,0,0) o But we notice that ψ 1 = µ 2 − µ1 = µ 2 (− µ3 + µ3 )− µ1 = (µ 2 − µ3 )+ (µ3 − µ1 ) =ψ 3 +ψ 2 • If I know ψ 2 and ψ 3 then I can determine the value of ψ 1 • ψ 1 ,ψ 2 , and ψ 3 are redundant or non-orthogonal contrasts o Orthogonality defined: • A set of contrasts is orthogonal if they are independent of each other (or if knowing the value of one contrast in no way provides any information about the other contrast) • If a set of contrasts are orthogonal then the contrast coefficients are not correlated with each other • Two contrasts are orthogonal if the angle between them in a-space is a right angle • Two contrasts are orthogonal if for equal n ψ 1 = (a1,a2,a3,...,aa ) ψ 2 = (b1,b2,b3,...,ba ) a ∑aibi = 0 or a1b1 + a2b2 + ...+ aaba = 0 j=1 5-6 © 2006 A. Karpinski • Two contrasts are orthogonal if for unequal n ψ 1 = (a1,a2,a3,...,aa ) ψ 2 = (b1,b2,b3,...,ba ) a a b ab a b a b ∑ i i = 0 or 1 1 + 2 2 + ...+ a a = 0 j=1 ni n1 n2 na o Examples of Orthogonality (assuming equal n) 1 1 • Set #1: c1 = ()1,0,−1 and c2 = ,−1, 2 2 a 1 1 ∑c1ic2i = 1* + ()0*−1 +− 1* j=1 2 2 c1 and c2 are orthogonal 1 1 = + 0 − = 0 2 2 c1 ⊥ c2 1 1 • Set #2: c3 = ()0,1,−1 and c4 = −1, , 2 2 a 1 1 ∑c3ic4 i = ()0*−1 +1* + −1* j=1 2 2 c3 and c4 are orthogonal 1 1 = 0 + − = 0 2 2 c3 ⊥ c4 • Set #3: c5 = ()1,−1,0 and c6 = (1,0,−1) a ∑c5ic6i = ()1*1 +−()1*0 + ()0*−1 j=1 c5 and c6 are NOT orthogonal =1+ 0 + 0 =1 5-7 © 2006 A. Karpinski o A set of contrasts is orthogonal if each contrast is orthogonal to all other contrasts in the set You can check that: c1 = ()1,−1,0,0 c1 ⊥ c2 c2 = ()1,1,−2,0 c2 ⊥ c3 c3 = ()1,1,1,−3 c1 ⊥ c3 o If you have a groups, then there are a-1 possible orthogonal contrasts • We lose one contrast for the grand mean (the unit contrast) • Having the contrasts sum to zero assures that they will be orthogonal to the unit contrast • If you have more than a-1 contrasts, then the contrasts are redundant and you can write at least one contrast as a linear combination of the other contrasts • Example: For a=3, we can find only 2 orthogonal contrasts. Any other contrasts are redundant. ψ 1 = µ1 − µ 2 ψ 1 ⊥ ψ 2 1 1 ψ = µ + µ − µ ψ is not orthogonal to ψ 2 2 1 2 2 3 1 3 4 1 ψ = −µ + µ + µ ψ is not orthogonal to ψ 3 1 5 2 5 3 2 3 We can write ψ 3 in terms of ψ 1 and ψ 2 9 1 ψ = − ψ − ψ 3 10 1 5 2 9 1 1 1 = − ()µ1 − µ 2 − µ1 + µ 2 − µ3 10 5 2 2 9 9 1 1 1 = − µ1 + µ 2 + − µ1 − µ 2 + µ 3 10 10 10 10 5 4 1 = −µ + µ + µ 1 5 2 5 3 • In general, you will not need to show how a contrast may be calculated from a set of orthogonal contrasts.