Skip to content
Prev 15356 / 20628 Next

Visualizing three-way interaction

Hi Klemens,


You probably have all the answers you need now, but just in case they are at all useful then I have a little series of posts on my website about visualising 3-way interactions using various methods:

2 continuous, 1 categorical:
https://tomhouslay.com/2015/06/02/understanding-3-way-interactions-between-continuous-and-categorical-variables-part-ii-2-cats-1-con/

1 continuous, 2 categorical:
https://tomhouslay.com/2014/09/06/understanding-3-way-interactions-between-continuous-and-categorical-variables-small-multiples/

3 continuous:
https://tomhouslay.com/2014/03/21/understanding-3-way-interactions-between-continuous-variables/

Some of these are a little old and don't take advantage of better functions in R (that didn't exist or I was unaware of at the time!), but might be helpful for ideas on different ways of plotting things. These are generally using standard regression models, but predict/broom etc can be used to average over random effects (eg using 're.form = NA' in the predict.merMod function).

Good luck with your plots!

Cheers

Tom
Message-ID: <AM5PR03MB30768A58236437D456FE83F6D2020@AM5PR03MB3076.eurprd03.prod.outlook.com>
In-Reply-To: <mailman.307.1492072790.23071.r-sig-mixed-models@r-project.org>