Back to Course

FoSSA Français

0% Complete
0/0 Steps
  1. Information sur le cours

    Rencontrez l'équipe enseignante
  2. Jeu de données du cours 1
  3. Jeu de données du cours 2
  4. MODULE A1: INTRODUCTION AUX STATISTIQUES AVEC R ET STATA
    A1.1 Qu'est-ce que les Statistiques?
  5. A1.2.1a Introduction à Stata
  6. A1.2.2b: Introduction à R
  7. A1.2.2c: Introduction to SPSS
  8. A1.3: Statistiques Descriptives
  9. A1.4: Estimations et Intervalles de Confiance
  10. A1.5: Tests d'Hypothèses
  11. A1.6: Transformation de Variables
  12. Fin du Module A1
    1 Quiz
  13. MODULE A2: CALCULS DE PUISSANCE STATISTIQUE & DE TAILLE D’ÉCHANTILLON
    A2.1 Concepts Clés
  14. A2.2 Calculs de puissance pour une différence de moyennes
  15. A2.3 Calculs de puissance pour une différence de proportions
  16. A2.4 Calcul de taille d’échantillon pour les essais randomisés (RCTs)
  17. A2.5 Calculs de taille d’échantillon pour les études transversales (ou sondages)
  18. A2.6 Calcul de taille d'échantillon pour un devis cas-contrôle
  19. Fin du Module A2
    1 Quiz
  20. MODULE B1: RÉGRESSION LINÉAIRE
    B1.1 Corrélation et Nuages de Points (scatterplots)
  21. B1.2 Différences Entre Moyennes (ANOVA à un facteur)
  22. B1.3 Régression Linéaire Univariée
  23. B1.4 Régression Linéaire Multivariée
  24. B1.5 Sélection de Modèles et Tests F
  25. B1.6 Diagnostics de Régression
  26. Fin du Module B1
    1 Quiz
  27. MODULE B2: COMPARAISONS MULTIPLES & MESURES RÉPÉTÉES
    B2.1 ANOVA Approfondie— Tests Post-Hoc
  28. B2.2 Correction pour Comparaisons Multiples
  29. B2.3 ANOVA à deux facteurs (Two-way ANOVA)
  30. B2.4 Mesures Répétées et Test T Apparié
  31. B2.5 ANOVA pour Mesures Répétées
  32. Fin du Module B2
    1 Quiz
  33. MODULE B3: MÉTHODES NON-PARAMETRIC
    B3.1 Hypothèses des Tests Paramétriques
  34. B3.2 Test U de Mann-Whitney
  35. B3.3 Test de Kruskal-Wallis
  36. B3.4 Test des rangs signés de Wilcoxon
  37. B3.5 Test de Friedman
  38. B3.6 Corrélation des Rangs de Spearman
  39. Fin du Module B3
    1 Quiz
  40. MODULE C1: DONNÉES BINAIRES & RÉGRESSION LOGISTIQUE
    C1.1 Introduction à la prévalence, au Risque, aux Cotes (Odds) et aux Taux
  41. C1.2 Le Test du Chi Carré & le Test de Tendance
  42. C1.3 Régression Logistique Univariée
  43. C1.4 Régression Logistique Multivariée
  44. Fin du Module C1
    1 Quiz
  45. MODULE C2: DONNÉES DE SURVIE
    C2.1 Introduction aux Données de Survie
  46. C2.2 Fonction de Survie de Kaplan-Meier & Test du Log-Rank
  47. C2.3 Régression de Cox à Risque Proportionnel
  48. C2.4 Régression de Poisson
  49. Fin du Module C2
    1 Quiz
Lesson 28 of 49
In Progress

B2.2 Correction pour Comparaisons Multiples

Learning Outcomes

By the end of this section, students will be able to:

  • Explain when and how to use post hoc testing 
  • Explain the concept of multiple comparisons and be able to correct for it in their analysis
  • Explain when and how to use repeated measures statistics
  • Apply extensions to the basic ANOVA test and interpret their results

You can download a copy of the slides here: B2.2a Correcting for Multiple Comparisons

B2.2a PRACTICAL: ALL

False Discovery Rate

To use this method, we must first assign a value for q. Whereas α is the proportion of false positive tests we are willing to accept across the whole sample typically 0.05 (5%), q is the proportion of false positives (false ‘discoveries’) that we are willing to accept within the significant results. In this example we will set q to 0.05 (5%) as well.

Here we are going to apply the Benjamini-Hochberg (BH) method to the data from the Fishers LSD test in the previous practical in section B2.1

Firstly, take the P values for each comparison of pairs and put them in ascending numerical order. Then assign a rank number in that order (smallest P value is rank 1, next smallest rank 2 and so on).

Group A Group B P Rank
Normal Obese <0.001 1
Normal Overweight 0.001 2
Underweight Obese 0.013 3
Overweight Obese 0.056 4
Underweight Overweight 0.060 5
Underweight Normal 0.246 6

Calculate the BH critical value for each P value, using the formula q(i/m), where:

i = the individual p-value’s rank,

m = total number of tests,

q= the false discovery rate you have selected (0.05)

Group A Group B P Rank BHcrit Significant
Normal Obese <0.001 1 0.008 Yes
Normal Overweight 0.001 2 0.016 Yes
Underweight Obese 0.013 3 0.025 Yes
Overweight Obese 0.056 4 0.033 No
Underweight Overweight 0.060 5 0.042 No
Underweight Normal 0.246 6 0.050 No

P values which are lower than our BH critical values are considered true ‘discoveries’. The first P value which is higher than the BH critical value and all significant P values below that (below in terms of the table, higher rank numbers) would be considered false ‘discoveries’. P values of ≥0.05 are not treated any differently to normal.

From this we can conclude that all three of our statistically significant differences from out pairwise comparisons are in true ‘discoveries’, and none of them should be discounted.

With small numbers of comparisons like this it is easy to use this method by hand, however where the FDR approach is most useful is when we are making very large numbers (hundreds) of comparisons.

—-

To compute this in R use the code

BH(u, alpha = 0.05)

where u is a vector containing all of the P values, and alpha is in fact your specified value for q

—-

To compute this is Stata you need to download the package smileplot which contains the programme multploc. This will allow you to perform the BH test. More details can be seen on this here- https://www.rogernewsonresources.org.uk/papers/multproc.pdf

—-

In SPSS there is a function to do this test within one of the extension bundles, but you can create a variable which contains all of your P values and then conduct a calculation for BH critical values using the ‘compute variable’ function (see A1.6) then make a visual assessment.

—-

There are also online FDR calculator you can use like this one https://tools.carbocation.com/FDR.

Try analysing the data from our example with at least one other method to check your results.

You can download a copy of the slides here: B2.2b Correcting for Multiple Comparisons

B2.2b PRACTICAL: R

In Practical B2.1, we ran the Fisher’s LSD test to compare systolic blood pressure (SBP) between each possible pairing of groups in the BMI group categorical variable. Now we know a little be more about post hoc tests and correcting for multiple comparisons, we are going to go back and conduct the Bonferroni post hoc and Tukey’s HSD post hoc on the same data.   

Tukey’s test in R

The function is ‘TukeyHSD’ (which comes loaded in R already so you do not need to install any packages). You run this function after you fit the ANOVA as you did in B2.1: 

> model1<- aov(sbp~bmi_fact, data=white.data)  
> summary(model1) 

[output omitted] 

> TukeyHSD(model1, conf.level = .95) 
  Tukey multiple comparisons of means 
    95% family-wise confidence level 
 
Fit: aov(formula = sbp ~ bmi_fact, data = white.data) 
 
$bmi_fact 
        diff        lwr       upr     p adj 
2-1 2.909514 -3.5381290  9.357157 0.6523423 
3-1 4.706123 -1.7291986 11.141444 0.2370134 
4-1 6.579362 -0.1897670 13.348490 0.0603475 
3-2 1.796609  0.3476829  3.245534 0.0079012 
4-2 3.669847  1.1189404  6.220755 0.0012615 
4-3 1.873239 -0.6463616  4.392839 0.2235822 

Bonferroni test in R 

To perform a Bonferroni correction, you run the post estimation function ‘pairwise.t.test(x, g, p.adjust.method =’bonferroni’)’. Here ‘x’ is your response variable, ‘g’ is the grouping variable, and for p.adjust.method you specify ‘bonferroni’. 

The output is: 

> model1<- aov(sbp~bmi_fact, data=white.data)  
> summary(model1) 

[output omitted] 

pairwise.t.test(white.data$sbp, white.data$bmi_grp4, p.adjust.method ='bonferroni') 
 
 Pairwise comparisons using t tests with pooled SD  
 
data:  white.data$sbp and white.data$bmi_grp4  

     1      2      3      
2 1.0000 -      -      
3 0.3615 0.0087 -      
4 0.0752 0.0013 0.3366 P value adjustment method: bonferroni 

Consider the different post hoc tests and the results for each comparison in them. Is one method producing higher or lower p values than the others? Do any previously significant findings become non-significant after correction for multiple comparisons?

Answer

The table below shows the outcome for each of the possible pairs, for each of the three different post hoc tests. These have been ordered from smallest to largest p value for ease of comparison.  

 Group A   Group B  P value 
Fisher’s LSD  Tukey’s HSD  Bonferroni 
Normal  Obese  <0.001*  0.001*  0.001* 
Normal  Overweight  0.001*  0.008*  0.009* 
Underweight  Obese  0.013*  0.060  0.075 
Overweight  Obese  0.056  0.224  0.337 
Underweight  Overweight  0.060  0.237  0.361 
Underweight  Normal  0.246  0.652  1.000 

*= P<0.05- Reject H0

You should notice that the p-vales are lowest for each comparison on the LSD test, and highest in the Bonferroni. Once we apply a correction for multiple comparisons in this way the significant difference in SBP between underweight and obese groups disappears and we fail to reject the null hypothesis for this pairing.

B2.2b PRACTICAL: Stata

In Practical B2.1, we ran the Fisher’s LSD test to compare systolic blood pressure (SBP) between each possible pairing of groups in the BMI group categorical variable. Now we know a little be more about post hoc tests and correcting for multiple comparisons, we are going to go back and conduct the Bonferroni post hoc and Tukey’s HSD post hoc on the same data.   

The post-estimation command ‘pwcompare’  with the ‘mcompare(method)’ option specifies the method for computing p-values and confidence intervals that account for multiple comparisons.  

In the Fisher’s LSD example we used ‘mcompare(noadjust)’, meaning there is no adjustment for multiple comparisons.  

To run the same test with Bonferroni post hoc replace this with ‘mcompare(bonferroni)’. 

To run the Tukey’s post hoc replace this with ‘mcompare(tukey)’  

See the output here: 

quietly: anova sbp bmi_grp4 
pwcompare bmi_grp4, mcompare(bonferroni) effects 

pwcompare bmi_grp4, mcompare(tukey) effects 

Consider the different post hoc tests and the results for each comparison in them. Is one method producing higher or lower p values than the others? Do any previously significant findings become non-significant after correction for multiple comparisons?

Answer

The table below shows the outcome for each of the possible pairs, for each of the three different post hoc tests. These have been ordered from smallest to largest p value for ease of comparison.  

 Group A   Group B  P value 
Fisher’s LSD  Tukey’s HSD  Bonferroni 
Normal  Obese  <0.001*  0.001*  0.001* 
Normal  Overweight  0.001*  0.008*  0.009* 
Underweight  Obese  0.013*  0.060  0.075 
Overweight  Obese  0.056  0.224  0.337 
Underweight  Overweight  0.060  0.237  0.361 
Underweight  Normal  0.246  0.652  1.000 

*= P<0.05- Reject H0

You should notice that the p-vales are lowest for each comparison on the LSD test, and highest in the Bonferroni. Once we apply a correction for multiple comparisons in this way the significant difference in SBP between underweight and obese groups disappears and we fail to reject the null hypothesis for this pairing.

B2.2b PRACTICAL: SPSS

In Practical B2.1, we ran the Fisher’s LSD test to compare systolic blood pressure (SBP) between each possible pairing of groups in the BMI group categorical variable. Now we know a little be more about post hoc tests and correcting for multiple comparisons, we are going to go back and conduct the Bonferroni post hoc and Tukey’s HSD post hoc on the same data.   

Run the ANOVA in exactly the same way as before, but when you reach the screen where you tick the box next to your choice of post hoc tests, select ‘Bonferroni’ and ‘Tukey’.

Consider the different post hoc tests and the results for each comparison in them. Is one method producing higher or lower p values than the others? Do any previously significant findings become non-significant after correction for multiple comparisons?

Answer

The table below shows the outcome for each of the possible pairs, for each of the three different post hoc tests. These have been ordered from smallest to largest p value for ease of comparison.  

 Group A   Group B  P value 
Fisher’s LSD  Tukey’s HSD  Bonferroni 
Normal  Obese  <0.001*  0.001*  0.001* 
Normal  Overweight  0.001*  0.008*  0.009* 
Underweight  Obese  0.013*  0.060  0.075 
Overweight  Obese  0.056  0.224  0.337 
Underweight  Overweight  0.060  0.237  0.361 
Underweight  Normal  0.246  0.652  1.000 

*= P<0.05- Reject H0

You should notice that the p-vales are lowest for each comparison on the LSD test, and highest in the Bonferroni. Once we apply a correction for multiple comparisons in this way the significant difference in SBP between underweight and obese groups disappears and we fail to reject the null hypothesis for this pairing.

👋 Before you go, leave an anonymous rating & feedback

Average rating 4.8 / 5. Vote count: 12

No votes so far! Be the first to rate this post.

Please share any positive or negative feedback you may have.

Feedback is completely anonymous

0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
0
Questions or comments?x