# Is there an R function for a robust three-way mixed ANOVA?

I'm a PhD student in the social sciences and I have run into some issues analyzing my dissertation data - namely, non-normality, and to a lesser degree, heterogeneity of variance.

Specifically, I am examining teachers' perceptions of bullying behavior among students. My study used a repeated measures design, as teacher participants viewed four videos depicting incidents of bullying between students and then answered a series of questions regarding their perceptions of and attitudes toward the incidents, all via an online questionnaire.

As one part of my analyses, I am trying to conduct a three-way mixed ANOVA with two within-subjects factors and one between-subjects factor:

• type of bullying with two levels - physical bullying and relational bullying (within-subjects)
• student gender with two levels - boys and girls (within-subjects)
• years of teacher experience with three levels - novice, intermediate, and expert (between-subjects)

I am trying to run the three-way mixed ANOVA for four separate dependent variables (perception of seriousness, empathy for the victim, empathy for the bully, and likelihood of intervening in the incident). These DVs were each measured using 2-4 items rated on a 5-point scale. (I am running separate ANOVAs rather than a MANOVA.) This three-way mixed ANOVA will allow me to test for a bullying type x student gender x years of experience interaction on the four perception/attitude DVs.

However, as I mentioned, my data is not normal within many of the cells, with skewness values ranging from fairly symmetric to high. I also violate the assumption of homogeneity of variance within some cells.

I am most familiar with SPSS. However, it is not possible to conduct a robust mixed ANOVA (or repeated measures design, for that matter) in SPSS. I have learned that it is possible to run a robust mixed ANOVA in R, but from the reading and research I have done thus far, it seems this may only be true for a two-way mixed ANOVA. I have seen the ez and WRS2 packages cited.

Can anyone tell me whether it is possible to run a robust three-way mixed ANOVA in R?

I used R in one graduate course about 7 years ago so my knowledge of its use is very limited. I am happy to teach myself R, but I do not want to put in several hours of study if it turns out that I cannot run my planned analyses.

I have been ABD and out of grad school for a few years practicing in my field of study (school psychology), and I do not tend to use statistics much on a day-to-day basis. So I just ask for understanding and patience if my knowledge of statistics is a bit rusty. :)

ETA: By "robust" I mean robust to violation of assumptions. I use the "Discovering Statistics Using SPSS" text by Andy Field (2013), as I find it friendly to those of us who don't live and breathe statistics. He notes that there is no "non-parametric equivalent" of a mixed ANOVA, "but there are robust methods that can be used based on bootstrapping (Wilcox, 2012). They can't be done directly SPSS but they can be implemented in R."

In his companion R textbook (Discovering Statistics Using R, 2012), he writes, "There are robust methods that can be used based on trimmed means and M-estimators that are described in Rand Wilcox's book (Wilcox, 2005). Wilcox also makes available functions to do these tests in R. To access these tests we need to load the WRS package." But later he writes, "There is not a function for analyzing a mixed three-way design."

Given that Field's textbook was published nine years ago, I wanted to reach out to you experts in case this function has since been developed.

• If I understand this correctly you have four outcome variables, perception of seriousness, empathy for the victim, empathy for the bully, and likelihood of intervening in the incident, each based on other variables measured on 5-point scales. That's not the kind of data that in my experience gives rise to really marked skewness or outliers or that calls for strongly robust methods at all, but can you give graphical or numeric examples? Mar 17, 2021 at 13:34
• I take asking for a R function to be off-topic here, but there's a large residual question about how to handle such data. Mar 17, 2021 at 13:35
• @NickCox Sure, what kind of examples would be most helpful? The skewness values? Is there a way to upload images so that I can share screenshots of SPSS output? (All analyses I have conducted thus far have been in SPSS.) Mar 18, 2021 at 2:25
• @Laura: You can include images in posts. See meta.stackexchange.com/questions/317576/… Mar 18, 2021 at 2:51
• Maybe something like that cran.r-project.org/web/packages/WRS2/vignettes/WRS2.pdf ? In particular 6.2
– TMat
Mar 21, 2021 at 18:14

Yes there are indeed three-way robust ANOVAs for mixed designs in the current WRS package. bwwtrim for one between and two within subject variables and bbwtrim for two between and one within variable.