Docsity

Understanding Alpha and Bonferroni-Holm Adjustments in Statistical Comparisons - Prof. B. , Study notes of Data Analysis & Statistical Methods

Toggle sidebar
bg1
Contrasts and Multiple Comparisons
Supplement for Section 6.5
Brian Habing – University of South Carolina
Last Updated: February 26, 2004
As discussed in Section 6.4 and at the beginning of Section 6.5, the F-test from the ANOVA table allows
us to test the null hypothesis “The population means of all of the groups/treatments are equal.” The
alternate hypothesis is simply that “At least two are not equal.” Often this isn’t what we want to know!
Say we are comparing 20 possible treatments for a disease. The ANOVA F-test (sometimes called the
omnibus test), could only tell us that at least one of the treatments worked differently than the others. We
might, however, want to be able to rank the 20 from best to worst, and say which of these differences are
significant. We might want to compare all the treatments produced by one company to those of another,
or maybe all the treatments based on one idea to those based on another.
An obvious suggestion in each of these cases would be to simply do a large number of t-tests. To rank the
20 from best to worst, we could simply do a separate t-test for each possible comparison (there are 190 of
them). To compare the two companies or two ideas, we could simply group all of the observations from
the related methods together and use t-tests to see if they differ. One difficulty with this is that the α-level
(probability of a Type I error) may no longer be what we want it to be.
Sidak’s Formula
Stepping back from the ANOVA setting for a minute, say we wish to conduct one-sample t-tests on
twenty completely independent populations. If we set α=0.05 for the first test, that means that:
0.05 = α = P[reject H0 for test one | H0 is true for test one]
We could write the same for the other nineteen populations as well. If we are concerned about all twenty
populations though, we might be more interested in the probability that we reject a true null hypothesis at
all. That is,
αT = P[reject H0 for test one âˆȘ reject H0 for test two âˆȘ· · · âˆȘ reject H0 for test 20 | H0 is true for all tests]
We call this quantity the family-wise (or experiment-wise) error rate. The α for each individual test is
called the comparison-wise error rate. The family (or experiment), in this case, is made up of the twenty
individual comparisons.
Using the rules of probability, and the fact that we assumed the tests were independent for this example,
we can calculate what αT would be if we used α=0.05 for the comparison-wise rate.
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Understanding Alpha and Bonferroni-Holm Adjustments in Statistical Comparisons - Prof. B. and more Study notes Data Analysis & Statistical Methods in PDF only on Docsity!

Contrasts and Multiple Comparisons

Supplement for Section 6.

Brian Habing – University of South Carolina

Last Updated: February 26, 2004

As discussed in Section 6.4 and at the beginning of Section 6.5, the F -test from the ANOVA table allows

us to test the null hypothesis “The population means of all of the groups/treatments are equal.” The

alternate hypothesis is simply that “At least two are not equal.” Often this isn’t what we want to know!

Say we are comparing 20 possible treatments for a disease. The ANOVA F -test (sometimes called the

omnibus test), could only tell us that at least one of the treatments worked differently than the others. We

might, however, want to be able to rank the 20 from best to worst, and say which of these differences are

significant. We might want to compare all the treatments produced by one company to those of another,

or maybe all the treatments based on one idea to those based on another.

An obvious suggestion in each of these cases would be to simply do a large number of t-tests. To rank the

20 from best to worst, we could simply do a separate t-test for each possible comparison (there are 190 of

them). To compare the two companies or two ideas, we could simply group all of the observations from

the related methods together and use t-tests to see if they differ. One difficulty with this is that the α-level

(probability of a Type I error) may no longer be what we want it to be.

Sidak’s Formula

Stepping back from the ANOVA setting for a minute, say we wish to conduct one-sample t-tests on

twenty completely independent populations. If we set α=0.05 for the first test, that means that:

0.05 = α = P[reject H 0 for test one | H 0 is true for test one]

We could write the same for the other nineteen populations as well. If we are concerned about all twenty

populations though, we might be more interested in the probability that we reject a true null hypothesis at

all. That is,

αT = P[reject H 0 for test one âˆȘ reject H 0 for test two âˆȘ · · · âˆȘ reject H 0 for test 20 | H 0 is true for all tests]

We call this quantity the family-wise (or experiment-wise ) error rate. The α for each individual test is

called the comparison-wise error rate. The family (or experiment), in this case, is made up of the twenty

individual comparisons.

Using the rules of probability, and the fact that we assumed the tests were independent for this example,

we can calculate what αT would be if we used α=0.05 for the comparison-wise rate.

αT = P[reject H 0 for 1 âˆȘ reject H 0 for 2 âˆȘ · · · âˆȘ reject H 0 for 20 | H 0 is true for all tests]

= 1 − P[fail to reject H 0 for 1 ∩ · · · ∩ fail to reject H 0 for 20| H 0 is true for all tests]

= 1 − P[fail to reject H 0 for 1| H 0 is true for all tests] · · · P[fail to reject H 0 for 2| H 0 is true for all tests]

= 1 − (1−α)(1−α) · · · (1−α) = 1 − (1−α)^20

20

The chance of making at least one error (αT ) isn’t 5%, it’s nearly 64%!

If we replace the twenty tests with k tests, we get Sidak’s formula :

αT = 1 − (1−α)k

when the tests are independent. If we know what αT we want, we can solve for the needed α, to get:

α = 1 − (1−αT )1/k

If we wanted αT = 0.05, this formula would show us that we need to use an α of 0.00256 for each

individual comparison!

Bonferroni’s Formula

In the case of ANOVA, the various tests will often not be independent. If we want to conduct the t-tests

to compare 20 possible medical treatments to each other, then clearly the comparison of 1 to 2, and 1 to 3

will not be independent; they both contain treatment 1!

The diagram below illustrates three possible situations that could occur for three tests:

The Holm Test

The Holm test is a method for dealing with the fact that the Bonferroni procedure is too conservative. The

main idea comes from noticing that we always used the condition “H 0 is true for all tests”, instead of

using the condition that it was true only for the specific test we were doing. The procedure behind the

Holm test is to first find all of the p-values for all of the individual tests we were performing, and then

rank them from smallest to largest. Compare the smallest to α=αT / k. If you fail to reject the null

hypothesis for the first step, then you stop here. If you do reject, then compare the next smallest to

α=αT/( k -1). Again, if you fail to reject the null hypothesis then you stop here; if you do reject continue on

and use α=αT /( k -2). (You do not need to check the omnibus F-test first, thus avoiding the first problem

with Fisher’s LSD.)

For example, say you have five hypotheses you are testing, you wanted αT =0.05, and you observed p-

values of 0.011, 0.751, 0.020, 0.030, and 0.001 respectively

Test Number P-value Compare To Conclusion 5 0.001 0.05/5=0.01 reject H 0 for test 5 1 0.011 0.05/4=0.0125 reject H 0 for test 1 3 0.020 0.05/3=0.0166 fail to reject for test 3 4 0.030 no comparison made fail to reject for test 4 2 0.751 no comparison made fail to reject for test 2

Notice that Bonferonni’s test would only have rejected for test 5. Using αT = α would have rejected for

tests 5, 1, 3, and 4. Thus the power of the Holm test is somewhere in between that of the Bonferroni

procedure and Fisher’s LSD.

While it is more powerful than Bonferroni’s method (it rejects more false H 0 ’s) it still makes sure that αT

is held to the desired level (unlike Fisher’s LSD). Notice that if all the null hypotheses are true, we make

an error if we reject any of them. The chance that we reject any is the same as the chance that we reject

the first, which is αT/ k. We are thus safe for the same reason that Bonferroni’s formula works. Now

assume that we rejected the first null hypothesis because it was false. There are only k-1 tests left, and so

when we go to the second test we can start as if we were using Bonferroni’s formula with k-1 instead of k.

And we continue in this way. While this argument is not a proof that the Holm Test protects the family-

wise error rate αT, it should make the general idea fairly clear.

While there are many other methods for making multiple comparisons (see pages 256-267), the Holm test

performs fairly well compared to all of them, controls αT at the desired level, and is fairly easy to

understand. Because of this, it will be the method that we will focus on.

Contrasts

In order to perform any of these tests though, we must be able to tell SAS what we want done. The

building blocks for many of the SAS procedures that we will have SAS use are called contrasts. They are

discussed on pages 243-249 of the text.

The key formulas are that for the contrast = ∑

t

i

L ai i

ÎŒ (where ∑ =

t

i

ai

0 ) are

t

i

L ai yi

ˆ and = ∑ = ∑

t

i (^) i

i

t

i (^) i

i L

n

a

MSE

n

a

MSW

σˆˆ

where L ˆ^ is normally distributed if the ANOVA assumptions are met. Since we have the standard error for

L ˆ^ , we could make a confidence interval for L , or test the null hypothesis that L =0. This is exactly what

we will ask SAS to do in the examples below.

Independence, Orthogonal Contrasts and Sidak’s Formula (an aside-note)

As discussed on pages 246- 249, two contrasts are said to be orthogonal if the dot-product (sum of the

cross products) of their coefficient vectors is zero. The reason to care if two contrasts are orthogonal is

that the estimates that go with a set of orthogonal contrasts are independent. This will play an important

roll in constructing the ANOVA table for factorial designs in Chapter 9. In the present situation though

the test statistics will not be independent, however, as they both contain the same MSE in the

denominator. Because of this it is not technically appropriate to use Sidak’s formula even in this

situation.

Tying it All Together

When we approach an ANOVA problem, there are three basic types of questions we could have in mind.

1. A re there any differences between any of the group means?

Choose α and simply use the F test from the ANOVA table (the omnibus test).

2. Do the means of some particular groups differ from the means of some other particular

groups? Choose αT and come up with the contrasts you wish to test. Find the p-values for the

tests that go with these contrasts, and then use the Holm test procedure to see which are

significant.

3. What is the order of the group means, and which are significantly different from each other?

Choose αT. Make all of the contrasts that compare two means to each other, find their p-values,

and use the Holm test procedure to see which are significantly different. Then make a simple

graph to display the result.

It is important to note that you should decide which one of these questions you want to answer before you

look at any of the output. (If for some reason you don’t know why you are looking at the data in advance,

then Scheffé’s method, discussed on pages 259-260, can be used.) Also, you should only pick one of these

three questions. (It doesn’t make sense to look at more than one of them, does it?) Finally, in all cases

remember to check the assumptions!

Check the Assumptions Using PROC INSIGHT and the Modified Levene test

PROC INSIGHT;

OPEN shrimp_weights; FIT weight=diet; RUN;

PROC GLM DATA=shrimp_weights ORDER=DATA; CLASS diet; MODEL weight=diet; MEANS diet / HOVTEST=BF; RUN;

The GLM Procedure

Brown and Forsythe's Test for Homogeneity of weight Variance ANOVA of Absolute Deviations from Group Medians

Sum of Mean Source DF Squares Square F Value Pr > F

diet 6 41.4549 6.9091 1.32 0. Error 28 146.1 5.

From the residual vs. predicted plot, the means for each of the three groups seem to be near zero (in fact,

they must always be for a one-way ANOVA). However, it is not clear from the residual vs. predicted

plot if the variances of the errors for the seven groups are the same. Using the modified Levene test we

fail to reject that they are different with a p-value of 0.2793. Finally, from the Q-Q plot of the residuals it

appears that the distribution of the errors is approximately normally distributed, although its arguable at

the ends.

Since it is a randomized experiment the assumption of independence is also satisfied so that all four

assumptions for the ANOVA are met in this case.

40 60 80 P_weight

0

5

R _ w e i g h t

-2 0 2 RN_weight

0

5

R _ w e i g h t

Possible Question 1: Are there any differences between any of the group means?

PROC GLM DATA=shrimp_weights ORDER=DATA; CLASS diet; MODEL weight=diet; RUN;

The GLM Procedure

Dependent Variable: weight

Sum of Source DF Squares Mean Square F Value Pr > F

Model 6 5850.774857 975.129143 88.14 <.

Error 28 309.792000 11.

Corrected Total 34 6160.

As the p-value of <.0001 is less than 0.05 we reject the null hypothesis

Η 0 :ÎŒcafo1 = ÎŒcalo2 = ÎŒfaso3 = ÎŒfalo4 = ÎŒbc5 = ÎŒlma6 = ÎŒlmaa

and conclude that at least one of the diets has an effect that differs from the other six.

Since we have seven tests that we are conducting, we need to determine which p-values to compare them

to. We could do this by hand as follows (note we have put the tests in order of p-value).

Test T P-value Compare To Conclusion art 20.50 <.0001 0.05/7=0.0071 reject H (^0) mic 13.08 <.0001 0.05/6=0.0083 reject H (^0) corn -9.88 <.0001 0.05/5=0.0100 reject H (^0) lin -6.50 <.0001 0.05/4=0.0125 reject H (^0) newold -6.14 <.0001 0.05/3=0.0167 reject H (^0) sun 2.45 0.0208 0.05/2=0.0250 reject H (^0) fish 0.94 0.3573 0.05 fail to reject H (^0)

We could simultaneously make the following conclusions then:

1. We have significant evidence to conclude that the average effect of the four experimental diets is

different from the average effect of the three standard diets (we estimate it to be 6.98 lower)

2. We have significant evidence to conclude that the average effect of the two diets with corn oil is

different from the average effect of the five that don’t (we estimate it to be 12.3 lower)

3. We do not have significant evidence to reject that the average effect of the three diets with fish oil

are the same as the average effect of the four diets that don’t

4. We have significant evidence to conclude that the average effect of the two diets with linseed oil is

different from the average effect of the five that don’t (we estimate it to be 8.09 lower)

5. We have significant evidence to conclude that the average effect of the diet with sunflower oil is

different from the average effect of the six that don’t (we estimate it to be 3.94 higher)

6. We have significant evidence to conclude that the average effect of the two diets with micro algae

is different from the average effect of the five that don’t (we estimate it to be 16.27 higher)

7. We have significant evidence to conclude that the effect of the diet with Artemia is different from

the average effect of the six that don’t (we estimate it to be 32.94 higher)

PROC MULTTEST could also be used to produce the above t-test p-values and automatically adjust them

with the Holm procedure (what SAS calls the “Stepdown Bonferroni” procedure). This procedure will

not produce the means that go with the contrasts however. A sample of the code is contained below in

answering the third possible question.

Possible Question 3: What is the order of the group means, and which are

significantly different from each other?

We will use PROC MULTTEST to conduct this procedure. (In reading the output, note that SAS also calls

the Holm test the Stepdown Bonferroni test). To compare the means for all of the groups, we first need to

enter all of the contrasts for comparing the means. There will always be ( k choose 2) of them. Because

there are k =2 groups in this example, there will be 21 such contrasts. We could also have entered these in

PROC GLM, but PROC MULTTEST will automatically adjust all of the α levels, so that we don’t have to!

PROC MULTTEST DATA=shrimp_weights ORDER=DATA HOLM; CLASS diet; CONTRAST '1 vs. 2' 1 -1 0 0 0 0 0; CONTRAST '1 vs. 3' 1 0 -1 0 0 0 0; CONTRAST '1 vs. 4’ 1 0 0 -1 0 0 0; CONTRAST '1 vs. 5’ 1 0 0 0 -1 0 0; CONTRAST '1 vs. 6’ 1 0 0 0 0 -1 0; CONTRAST '1 vs. 7’ 1 0 0 0 0 0 -1; CONTRAST '2 vs. 3’ 0 1 -1 0 0 0 0; CONTRAST '2 vs. 4’ 0 1 0 -1 0 0 0; CONTRAST '2 vs. 5’ 0 1 0 0 -1 0 0; CONTRAST '2 vs. 6’ 0 1 0 0 0 -1 0; CONTRAST '2 vs. 7’ 0 1 0 0 0 0 -1; CONTRAST '3 vs. 4’ 0 0 1 -1 0 0 0; CONTRAST '3 vs. 5’ 0 0 1 0 -1 0 0; CONTRAST '3 vs. 6’ 0 0 1 0 0 -1 0; CONTRAST '3 vs. 7’ 0 0 1 0 0 0 -1; CONTRAST '4 vs. 5’ 0 0 0 1 -1 0 0; CONTRAST '4 vs. 6’ 0 0 0 1 0 -1 0; CONTRAST '4 vs. 7’ 0 0 0 1 0 0 -1; CONTRAST '5 vs. 6’ 0 0 0 0 1 -1 0; CONTRAST '5 vs. 7’ 0 0 0 0 1 0 -1; CONTRAST '6 vs. 7’ 0 0 0 0 0 1 -1; TEST mean(weight); RUN;

The Multtest Procedure

Continuous Variable Tabulations

Standard Variable diet NumObs Mean Deviation

weight cafo_1 5 48.0400 2. weight calo_2 5 38.0400 2. weight faso_3 5 55.2000 1. weight falo_4 5 54.0600 3. weight bc_5 5 40.5400 2. weight lma_6 5 46.8400 1. weight lmaa_7 5 80.0600 5.