thank you! very flexible and easy to use for repeated measures anova. but it would be even more helpful if there was a little statistic (like mauchly's test on sphericity) specifying if one needs to adjust the degrees of freedoms with the computed epsilon estimates.
Thanks, a very helpful function! Together with Matt Mollison's addition of the Mauchly-Test for sphericity (see above) this completely saves me running the repeated measures ANOVAs on SPSS again to get the corrected p-values. And it seems to agree well with the comparisons I have made.
I suspect that this is a difference between how SPSS defines the Huynh-Feldt epsilon in its different versions of SPSS, but I don’t have the time to investigate this further now. I had checked this earlier with a version that I know was older than SPSS 20, but I don’t recall which. The ‘heart’ of the program is the EpsGG which is used to determine the EpsHF.
Matthew,
I applied your function to a simple Mixed-model ANOVA, with one BT factor (4 levels) and 1 WIn factor (3 levels), and checked the results with SPSS 20.
EpsGG is OK, however the discrepancy in EpsHF is still there, even when the commented line is used in the script.
I noticed that differences btw SPSS values and function outputs can be as great as 10%.
Yoni,
Not sure if you found a solution yet, but I stuck a call to GenCalcHFEps inside this guy's http://www.mathworks.com/matlabcentral/fileexchange/authors/7089 RMAOV scripts; I've used it in RMAOV2 and RMAOV33 and it works great. You'll just have to modify the print statements to output a table with the GG/HF values. Let me know if you want mine and I can send them along.
Thanks all for the comments and sorry to be slow to respond.
I didn’t add anything like mauchly’s test for sphericity because personally I prefer to account for even small deviations from sphericity rather than use a test like that to decide whether or not to. But thanks just the same to Matt for posting that code for anyone that wants to use it.
With regards to Yoni’s question, there is matlab’s anovan that could be combined with this to allow for a Repeated Measures anovan. I have code for that halfway finished, but stopped as I found a better way around that for the project I was working on at the time. If I come across a project later on where I need that, I will finish that and post it to the matlab file exchange. (Provided someone else hasn’t already done that by then!)
It’s unfortunate that matlab’s statistical toolbox is so lacking for such basic things like a repeated measures anova, among other things, but c’est la vie.
Comment only