Skip to content
R for the Rest of Us Logo

Inferential Statistics with R

Post Hoc Comparisons

Transcript

Click on the transcript to go to that point in the video. Please note that transcripts are auto generated and may contain minor inaccuracies.

Your Turn

  1. Perform one-way ANOVA to test whether there is a difference in hs_gpa by grade_class. Is there a difference? If so, perform a Tukey’s HSD to test where the differences are. Describe the differences.

  2. Perform one-way ANOVA to test whether there is a difference in weight_2 by gender. Is there a difference? If so, perform a Tukey’s HSD to test where the differences are. Describe the differences.

Learn More

Read more about the tukey_hsd() function in the rstatix package. The rstatix package also has functions for Dunn's test of multiple comparisons using dunn_test(), Games Howell post-hoc tests using games_howell_test(), and pairwise comparisons of estimated marginal means using emmeans_test().

Have any questions? Put them below and we will help you out!

You need to be signed-in to comment on this post. Login.

Mike LeVan

Mike LeVan • January 7, 2025

For the second problem in Your Turn, how can we interpret the results? What does it mean that weight_2 and the female and male gender are statistically significant? Thanks.

David Keyes

David Keyes Founder • January 8, 2025

I'm not sure of the answer, but I've asked Dana to respond. Hopefully that will happen soon!

Dana Linnell

Dana Linnell • January 9, 2025

Hi Mike, because there is only one significant Tukey HSD (Female vs Male, p = .001) you would say something like (note that the APA style italicization can't be shown here): There was a significant difference in weight by gender, F (2, 297) = 6.41, p = .002, ges = .041. Tukey's HSD revealed that there was a significant difference in weight between males (M = fill in the blank, SD = fill in the blank) and females (M = fill in the blank, SD = fill in the blank; p = .001) but no difference between trans individuals with males or females by weight.

Mike LeVan

Mike LeVan • January 9, 2025

Dana,

Thank you so much for your response! I appreciate the context added. Also loving the course!

Mike

Dana Linnell

Dana Linnell • January 9, 2025

Glad to hear you've been enjoying it, Mike!