0todd0000 / spm1d

One-Dimensional Statistical Parametric Mapping in Python
GNU General Public License v3.0
61 stars 21 forks source link

Two-way repeated measures ANOVA: design questions #105

Closed 0todd0000 closed 4 years ago

0todd0000 commented 4 years ago

(Forwarded and paraphrased from an email question)

First, a little background. I have two samples (A1 and A2), each of them has a different amount of participants and my protocol included two conditions (B1 and B2), with repeated measures (I am considering the average over the two trials per condition). I want to assess if there are Factor A differences and if there are Factor B differences within each level of Factor A. Also, I have 5 different angles, which are my dependent variables.

Q1: This should be a Mixed ANOVA if I am not mistaken. What would be the most appropriate test in this case on SPM? I am thinking of two-way ANOVA with repeated measures, but then I would have to do this twice. Would this inflate my Type I error?

Q2. What would the data structure in two-way ANOVA with repeated measures be? I have tried to run it, selecting 5 subjects per Factor A, but I am still having an error that the "Design must be balanced" and I honestly don't understand why.

0todd0000 commented 4 years ago

Q1.

Q2. If you are trying to run two-way RM-ANOVA (i.e., spm1d.stats.anova2rm) you will receive this error because there are different participants in A1 and A2. anova2rm expects the same participants to be in A1 and A2. If the participants are indeed different, try spm1d.stats.anova2onerm instead. If that does not solve the problem, please clarify how many observations are in each group combination (i.e., A1B1, A1B2, A2B1, A2B2).

AlbertoNTC commented 4 years ago

Hello. Factor A comes from two different samples (A1 and A2), each of these samples were measured in two conditions B (B1 and B2), where: A1B1=14, A1B2 =14, A2B1=5, and A2B2=5, i.e. We have 14 subjects (A1) performing both conditions (B1 and B2), and 5 subjects (A2) performing the same both conditions (B1 and B2).

Q1.1 Due to non-balanced, we arbitrary selected 5 subjects from each sample. Would this then be a two-way ANOVA with repeated measures (anova2rm) or anova2onerm?

Thank you

0todd0000 commented 4 years ago

In this case anova2onerm is more appropriate than anova2rm.

For anova2rm, both factors must be RM. For anova2onerm, just one factor is RM.