How to run a simple 2x2x2 ANOVA in R?

I am trying to run a 2 X 2 X 2 ANOVA in R. None of the codes (dplyr, etc.) available online work because the packages are all out of date. Please advise how I can go about running this relatively simple analysis!
I'm also not able to visualize my data but the ggpubr and ggplot2 don't work either.
I am using the latest version of R, but the online examples are obviously getting outdated faster than the latest updates.
Given these issues, R for me has been reduced to a complicated interface where I write code to calculate mean and standard deviation, which I can do with excel. Any help in this regard would be greatly appreciated.

Hi @ninjasrini! Welcome!

It's possible to run a 3-way factorial ANOVA in R without any add-on packages, using only the tools in the core stats package. Here's a nice quick reference to how this is done:

However, if you're using ANOVA and coming from SPSS or SAS, you should know that the people who wrote R's core ANOVA functions (aov() and anova()) took a different side in the Sums of Squares wars. These references have lots more info:

If you'd like help translating a specific older tutorial you've already found into more modern terms, then a link would be helpful! It certainly can be frustrating that the internet is full of advice, but not all of it is still relevant or up to date :confused:.

This sounds like it might be a separate problem? If so, it's probably best to start a new topic focusing on just the specific trouble you're having with these packages. In order for helpers here to understand what's going on, you'll need to at least provide the code you've been trying, the errors you've been seeing, and the output of sessionInfo(). But a self-contained, reproducible example is the gold standard, and the surest path to helping people help you.


Thank you so much for your welcoming and helpful message.

The link you shared is super useful!

Follow-up to the ANOVA question... I realized I should have been more specific. I am wondering how I can run post-hoc pair-wise comparison tests to see if the difference in means between some pairs of my 8 conditions are pair-wise statistically significant.

Thanks in advance.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.