You are on page 1of 14

CONTRAST ORTHOGONAL

Erlina Ambarwati
Multiple comparisons
 Results from multiple comparisons
A B C
 In general, if A = B, B = C, then A = C…
 Remember that the situation here is probabilistic
 Failure to reject H0 does not mean that they are
equal
 They are not sufficiently different for us to assert that they are
different
 Although we don’t have evidence that A and B differ or that B
and C differ, we do have evidence that A and C differ

2 Erlina Ambarwati 9/10/2012


Linear contrasts
 Pairwise comparisons of means are a special case of linear
contrasts
 Comparison of one group with another group with
general weights µ1 = µ 2
µ3 = µ 4
µ1 ( µ3 + µ 4 ) / 2
=
 Linear contrasts take the form of a linear combination of
the means
L= a1Y1 + a2Y2 +... + ak Yk
= ∑ a jY j

3 Erlina Ambarwati 9/10/2012


Linear contrasts
 Restriction

∑a j =0

 Suppose we had three means and wanted to compare the


first and the second only. This could be done by having
a1= 1, a2= –1, and a3= 0

L = (1)Y1 + (−1)Y2 + 0Y3 = Y1 − Y2

4 Erlina Ambarwati 9/10/2012


Linear contrasts
 Linear contrasts allow us to express the sum of squared
differences between the means of sets of treatments

n ( ∑ a jY j )
2
2
nL
SS= =
contrast
∑ j
a 2
∑ ja 2

(∑aj Yj)2
 or SS contrast =
n ∑ aj 2
 Formula assumes equal sample sizes

5 Erlina Ambarwati 9/10/2012


Example
 Suppose we had= =
Y1 1.5, =
Y2 2.0, =
Y3 3.0, n 10
 We can easily compute
SS treat n ∑ (Y j − Y ) 2
=
= 10 ( (1.5 − 2.17) 2 + (2 − 2.17) 2 + (3 − 2.17) 2 )
= 10(0.44 + 0.028 + 0.694)= 11.667

 Let’s say we wanted to compare the average of


treatments 1 and 2 to treatment 3. Thus
L =∑ a jY j =(1)1.5 + (1)2.0 + (−2)3.0 =−2.5
nL2 10(−2.5) 2
=
SScontrast = = 10.417
1
∑aj 2
6
6 Erlina Ambarwati 9/10/2012
Example
 Now suppose we wanted to compare groups 1 and 2:

L =∑ a jY j =(1)1.5 + (−1)2.0 + (0)3.0 =−0.5

nL2 10(−0.5) 2
=
SScontrast = = 1.25
2
∑aj 2
6

 Note that the sum of the two SScontrast is


=SS treat SScontrast1 + SScontrast 2
= 10.417 + 1.25
11.667
 In this case, we can say that the contrasts completely
partition SStreat

7 Erlina Ambarwati 9/10/2012


F test for contrast
 Note that the absolute value of the contrast weights
does not matter
Means: Y1 Y2 Y3 Y4 Y5

aj: 2 2 2 -3 -3
1 1 1 -1.5 -1.5

 The significance of a contrast can be tested with an F


test 2
nL
=
MScontrast
F =
∑ j
a 2

MSerror MSerror
8 Erlina Ambarwati 9/10/2012
Contrasts
 The square root of the F for a simple contrast
(a1 = 1,a2 = –1) is the same value obtained in a t test
 t tests are special cases of linear contrasts

 Note however that if you run several contrasts, the


familywise error will be much larger than α
 Bonferroni correction can be used
 Run fewer contrasts! Only as many as needed
 If they were really a priori, probably ok without
correction

9 Erlina Ambarwati 9/10/2012


Orthogonal contrasts

 Some contrasts are independent of one another,


while others “share” information
 Independent contrasts are called orthogonal
∑ a = 0 and ∑ b = 0
j j

∑a b j j =0
or ∑ajbj = a1b1+ a2b2 + a3b3 + …… + atbt = 0

contrasts given by aj and bj are orthogonal

10 Erlina Ambarwati 9/10/2012


Orthogonal contrasts
 It is useful to have orthogonal contrasts
because they exactly partition SStreat

SS(L1) + SS(L2) + …… + SS(Lt-1) = SS treat

 However , it is not strictly necessary that all


contrasts be orthogonal

 But remember that in this case the contrasts


do not convey independent information
11 Erlina Ambarwati 9/10/2012
Degrees of freedom
 For a contrast, we have
MScontrast
F=
MSerror
 What are the numerator degrees of freedom?
 Consider df for SScontrast
 A contrast always compares two quantities
µ1 = µ 2
µ3 = µ 4
µ1 ( µ3 + µ 4 ) / 2
=

12 Erlina Ambarwati 9/10/2012


Degrees of freedom
 Thus SScontrast has df = 1
 Another way to think of the df is that the F for a
contrast can in fact be written in the usual way
( SSE ( R) − SSE ( F ) /(df R − df F )
F=
SSE ( F ) / df F
 To determine dfR, we must determine the number of
independent parameters in the restricted model
which is associated with the contrast
 Consider the following null hypothesis:
H 0 : 13 µ1 + 13 µ 2 + 13 µ3 − µ 4 =
0

13 Erlina Ambarwati 9/10/2012


Degrees of freedom
 The corresponding restricted model is
Y=
ij µ j + ε ij

where 1/3µ1+1/3µ2 + 1/3µ3 – µ4 = 0


 Model has 4 parameters but only 3 are independent
 In the general case for a groups, we would have a – 1
independent parameters
 Thus
df R − df F = [ N − (a − 1)] − ( N − a )
=1

14 Erlina Ambarwati 9/10/2012

You might also like