This topic contains 3 replies, has 2 voices, and was last updated by henrik 11 months ago.

AuthorPosts

January 18, 2018 at 16:23 UTC #184
I have a fourway Repeated Measures ANOVA. I want to test the main effects and the firstorder interactions and one secondorder interaction. Rather than using the aov function in R, I wanted to use Anova from the CAR package, because it can test sphericity assumptions. As I have never managed to find a way to properly cast longformat data as wideformat data with four factors (96 columns), I decided to use aov_car from the AFEX package as it passes longformat data to the Anova function (right?). However, despite specifying the model to only test the main effects and interactions I am interested in, the output gives me the full, factorial model with all the interactions. Also, sphericity tests were not available due to singular error SSP matrix.
Without going to details of the code and data I have used to perform this, can you tell me if I am misusing the AFEX package, or why I am not getting the output I expect? Of course I can give these details if necessary, but I would have to clean up the code first.
Thanks!

January 18, 2018 at 16:37 UTC #185
You can simply and safely ignore the tests that you are not interested in. A repeatedmeasures ANOVA as run with
car::Anova()
(this is exactly whatafex
uses) **always** tests all effects (so this is a consequence ofcar::Anova()
and not ofafex
). I know this because I asked John Fox (the author ofcar
) a very similar question some years ago and he responded with:The withinsubjects contrasts are constructed by Anova() to be orthogonal in the rowbasis of the design, so you should be able to safely ignore the effects in which (for some reason that escapes me) you are uninterested.
The full quote can be seen at the following link which also provides link to the full exchange:
https://stat.ethz.ch/pipermail/rhelp/2012July/319143.htmlI also think there is not much you can do if the sphericity tests fail for your data (at least I do not know what, these tests are also all done by
car
).Hope that helps!

January 18, 2018 at 19:04 UTC #187
Thanks for your blisteringly quick reply, Henrik!
The strange thing is that I tried running car::Anova with a smaller wideformat dataset that I have, (specifying the model as: dataMatrix ~ 1) and being able to get tests for only the specified terms in idesign. However, I was able to get sphericity tests for this dataset with both afex::aov_car and car::Anova (having the data in both long and wide formats). So clearly it is a matter of having too many conditions (or levels of one particular factor?) in the larger dataset for the number of subjects (right?). :\
Good to know I can ignore the tests I am not interested in. I got told off in my thesis defence for doing this and was told to always report the full set of tests, which John Fox also seems to be advocating in your quote. Any idea why?Thanks for your help!
Andy 
January 18, 2018 at 22:07 UTC #190
AFAIK, the problem of the sphericity tests is not so much related to the number of conditions or their levels (as long as you have more participants than cells of the design), but probably more bad luck with your data. You might try to randomly remove one or two participants to see if this still happens. However, this is not part of
afex
so might also be wrong.For balanced designs where the contrasts are orthogonal (as is always the case for repeated measures ANOVA via
car::Anova()
) ignoring individual effects does not change the other effects. Hence you can do it here. However, should one of the previously mentioned conditions (balance and orthogonality) not be met, omitting one of the effects from a model changes the other effects. This could be what your thesis committee had in mind. Furthermore, if a test is always at least implicitly part of the model then why omit it? If its inclusion does not change the model, knowing it results does not hurt. 
AuthorPosts
You must be logged in to reply to this topic.