2×2 Repeated Measures ANOVA R function

2×2 repeated measures ANOVAs are common in my work. For that, I now created a flexible function in R. The function outputs assumption checks (outliers and normality), interaction and main effect results, pairwise comparisons, and produces a result plot with within-subject error bars (SD, SE or 95% CI) and significance stars added to the plot.

 

The function rm_2by2_anova.R and its accompanying notebook is available here
https://github.com/dcdace/R_functions


Below is the HTML version of the notebook. In the notebook, I test the function on three different datasets and also provide a step-by-step walk through the function elements.


Having spent many hours on this I hope the function will be useful and time-saving also to others.


Please let me know if you find any statistics or other errors!


Notebook_rm_2by2_ANOVA