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 27 of 49
In Progress

B2.1 ANOVA Approfondie— Tests Post-Hoc

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
  • Apply extensions to the basic ANOVA test and interpret their results
  • Explain when and how to use repeated measures statistics

You can download a copy of the slides here: B2.1 ANOVA Revisited- Post Hoc Testing

B2.1 PRACTICAL: R

In the last module we looked at linear regression to analyse the effect of different explanatory variables on the SBP of the participants.

We are going to revisit this here and look at it through the lens of the ANOVA.

Let’s look at the association of mean SBP across BMI groups again. But now we want to use the ANOVA post-estimation options to compute multiple comparisons with Fisher’s least-significant difference (LSD) test, which does not adjust the confidence intervals or p-values.

We can use the ‘LSD.test()’ function of the ‘agricolae’ package to perform this test in R.

#define group (factor) variable & fit one-way ANOVA

white.data<-Whitehall_fossa

white.data$bmi_fact<-factor(white.data$bmi_grp4)

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

                    Df  Sum Sq Mean Sq F value   Pr(>F)
bmi_fact       3    6451  2150.4   7.024 0.000104 ***
Residuals   4297 1315528   306.2

Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
26 observations deleted due to missingness

#perform Fisher’s LSD
install.packages(“agricolae”)

library(agricolae)

print(LSD.test(model1, “bmi_fact”)) 

$statisticsMSerror   Df    Mean      CV306.1504 4297 130.727 13.3845$parameterstest p.ajusted   name.t ntr alpha

Fisher-LSD      none bmi_fact   4  0.05

$means

sbp      std    r      LCL      UCL Min Max Q25   Q50    Q75

1 126.6600 18.47294   50 121.8088 131.5112  86 176 115 125.5 136.75

2 129.5695 17.49645 1791 128.7589 130.3801  87 230 118 128.0 139.00

3 131.3661 17.59025 2084 130.6147 132.1176  88 218 119 130.0 142.00

4 133.2394 16.83856  376 131.4703 135.0084  94 190 122 132.0 143.00

$comparison

NULL

$groups

sbp groups

4 133.2394      a

3 131.3661      a

2 129.5695      b

1 126.6600      b

attr(,”class”)

[1] “group”

To interpret this output we look at the section headed ‘$groups’. The groups that have different characters listed beside them (i.e. ‘a’ or ‘b’) are significantly different.

  • Question B2.1: Review your output. What do you notice? What can you conclude about the data from these tests? Compare this to your output from the linear regression on the same data.
Answer

Answer B2.1

The output of the main ANOVA gives the same values as the previous tests on this relationship (to be expected!). The post hoc testing, in the table titled ‘$groups’, shows the same relationships between groups as seen in the comparisons to reference categories shown as part of the linear regression on these data. Do check this for yourself by comparing to your own results from exercise B1.3.

The advantage of this method is that all of the comparisons are shown in one table, so you can inspect any pairing you wish.

In this output, we can see that :

  • Group 4 and group 2 have significantly different mean SBP, since group 4 has a value of ‘a’ and group 2 has a value of ‘b’.
  • Group 4 and group 1 have significantly different mean SBP, since group 4 has a value of ‘a’ and group 1 has a value of ‘b’.
  • Group 4 and group 3 do NOT have significant different mean SBP, since they both have a value of ‘a’.
B2.1 PRACTICAL: Stata

In the last module we looked at linear regression to analyse the effect of different explanatory variables on the SBP of the participants.

We are going to revisit this here and look at it through the lens of the ANOVA.

Let’s look at the association of mean SBP across BMI groups again. But now we want to use the ANOVA post-estimation options to compute multiple comparisons with Fisher’s least-significant difference (LSD) , which does not adjust the confidence intervals or p-values.

We can use the post-estimation command ‘pwcompare’ to run this test. In Stata, the default mcompare(noadjust) corresponds to Fisher’s protected LSD.

anova sbp bmi_grp4

[output omitted]

pwcompare bmi_grp4, mcompare(noadjust) effects

  • Question B2.1: Review your output. What do you notice? What can you conclude about the data from these tests? Compare this to your output from the linear regression on the same data.
Answer

The output of the main ANOVA gives the same values as the previous tests on this relationship (to be expected!). The post hoc testing, in the table titled ‘Pairwise comparisons’, shows the same relationships between groups as seen in the comparisons to reference categories shown as part of the linear regression on these data. Do check this for yourself by comparing to your own results from exercise B1.3.

The advantage of this method is that all of the comparisons are shown in one table, so you can inspect any pairing you wish.

B2.1 PRACTICAL: SPSS

In the last module we looked at linear regression to analyse the effect of different explanatory variables on the SBP of the participants.

We are going to revisit this here and look at it through the lens of the ANOVA.

Select

Analyze >> Compare Means and Proportions >> One-Way ANOVA

Move SBP into the Dependant List and BMI grouping (bmi_grp4) into the Factor box as before.

Now in and additional step, click on the post hoc button on the right-hand side. You will see a new box open up with lots of options for post hoc tests. We are going to select the very first option in the ‘Equal Variances Assumed’ section ‘LSD’ which stands for Least Significant Difference.

Press continue and then OK to run the test.

Review your output. What do you notice? What can you conclude about the data from these tests? Compare this to your output from the linear regression on the same data.

Answer

The output of the main ANOVA gives the same values as the previous tests on this relationship (to be expected!). The post hoc testing, in the table helpfully titled ‘Multiple Comparisons’, shows the same relationships between groups as seen in the comparisons to reference categories shown as part of the linear regression on these data. Do check this for yourself by comparing to your own results from exercise B1.3.

The advantage of this method is that all of the comparisons are shown in one table, so you can inspect any pairing you wish.

👋 Before you go, leave an anonymous rating & feedback

Average rating 4.8 / 5. Vote count: 9

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