Performs a correlated sample (within-subjects) ANOVA. This is a generalization of the paired T-test to 3 or more treatments. This function accepts data as either a tuple of ranges (1 for each treatment, such that a given index represents the same subject in each range) or similarly as a range of ranges.
A TestRes with the F-statistic and P-value for the null that the the variable being measured did not vary across treatments against the alternative that it did.
1 // Test the hypothesis that alcohol, loud music, caffeine and sleep 2 // deprivation all have equivalent effects on programming ability. 3 4 uint alcohol = [8,6,7,5,3,0,9]; 5 uint caffeine = [3,6,2,4,3,6,8]; 6 uint noSleep = [3,1,4,1,5,9,2]; 7 uint loudMusic = [2,7,1,8,2,8,1]; 8 // Subject 0 had ability of 8 under alcohol, 3 under caffeine, 3 under 9 // no sleep, 2 under loud music. Subject 1 had ability of 6 under alcohol, 10 // 6 under caffeine, 1 under no sleep, and 7 under loud music, etc. 11 auto result = correlatedAnova(alcohol, caffeine, noSleep, loudMusic);
References: "Concepts and Applications of Inferrential Statistics". Richard Lowry. Vassar College. version. http://faculty.vassar.edu/lowry/webtext.html