-1

I performed a 2x2x2 three-way ANOVA and the three-way interaction term was significant. I understand this to mean that one (or more) two-way interactions operate differently in the presence of the third variable.

How do I perform a post hoc test(s) to tease apart these interactions? I would like to do this in r if possible.

I found a resource (link below) that uses tibbles to perform a two-way ANOVA at each level. However, I'm new to r and don't quite understand how this was achieved. Perhaps this is an issue translating the code to my dataset?

https://www.datanovia.com/en/lessons/repeated-measures-anova-in-r/#post-hoc-tests-2

Thanks in advance!

Quinn
  • 59
  • 6
  • 1
    It seem syour question got already downvited (not by me) and I can somewhat see why: If your question is *How should I analyze this data set* I think the question is to broad for this forum... If you need help with a specific R problem I did not understand where you struggle. – dario Feb 07 '20 at 21:00

1 Answers1

2

In case anyone else was following this question for an answer, I think I've found a solution.

What I ended up doing was subsetting my data and re-running the ANOVA as a two-way ANOVA.

In my data set I was interested in the proportion of clams caught in traps. Independent variables to consider were: flow of the water (30_cms or 39_cms), grain size of the sediment (coarse or fine), and species of clam (mya or merc). When I ran the three-way ANOVA, I found an interaction between all three terms. As post-hoc tests, I ended up running six ANOVAs: one for each subset of data including only one level of a factor (ie. just 30_cms flow speed, then a separate model with a subset of just 39_cms).

This is an example of two of the ANOVAs I ran (for the 'flow of water' factor):

Clams30<-subset(ClamData, ClamData$Speed == "30_cms")
Clams39<-subset(ClamData, ClamData$Speed == "39_cms")
SpeciesGrainSize30=aov(PropinTrap~Species*GrainSize, data=Clams30)
Anova(SpeciesGrainSize30)
SpeciesGrainSize39=aov(PropinTrap~Species*GrainSize, data=Clams39)
Anova(SpeciesGrainSize39)

I then created a table of p-values to identify significant interactions.

I hope this helps someone in the future!

If someone has a more elegant way to do this, I would certainly be interested to hear it.

Quinn
  • 59
  • 6