Skip to content
R for the Rest of Us Logo

Inferential Statistics with R

One-Way ANOVA

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 a one-way ANOVA to test whether there is a difference in hs_gpa by grade_class. Is there a difference? What is the p-value?

  2. Perform a one-way ANOVA to test whether there is a difference in act_english by race. Is there a difference? What is the p-value?

Learn More

Read more about the anova_test() function in the rstatix package. If you are interested in learning how to do the one-way ANOVA using the base stats package, use the aov() function.

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

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

Shiva Sreenivasan

Shiva Sreenivasan • September 1, 2024

My anova_test() function gives me a data.frame object rather than a tibble. To convert to tibble, I need to pipe to as_tibble()

Matt Newman

Matt Newman • September 5, 2024

How are you producing the nice looking table outputs that you show in the videos? It's much easier to read than what I'm getting in the console!

David Keyes

David Keyes Founder • September 5, 2024

That's using the paged option for data frame printing. It only works in RMarkdown/Quarto (see how to use it here)

Matt Newman

Matt Newman • September 6, 2024

Thanks, David. It took a couple of tries to convince Quarto that I meant it, but I got it to work!

David Keyes

David Keyes Founder • September 6, 2024

Glad you got it to work! FYI, you can also use it as follows:

mtcars |>
  rmarkdown::paged_table()