2x2 Within-subjects design - 3dMEMA

My question is hopefully fairly easy to answer, but unfortunately I haven’t been able to find what I’m looking for in any AFNI documentation so far.

My experiment is set up with 2 different factors, each of which have two levels. These are all within subjects (that is, I don’t have any groups).

From reading here (Two-Way Within-Subject ANOVA), my understanding is that I can use 3dMEMA to do this because all of my factors have two levels. However, I can’t find any code examples that implement multiple 2-level factors without also using multiple groups (like in example #2 from the 3dMEMA -help output).

Any help would be appreciated!

See the discussion here: https://afni.nimh.nih.gov/MEMA

Thank you, that is helpful. I’m still not exactly sure how to actually implement that in 3dMEMA - would the code be something like this?


3dMEMA    -prefix 2_by_2_example    \
                  -set Condition_1_A            \
                      Subj001 Subj001+tlrc'[A#0_Coef]'  Subj001+tlrc'[A#0_Tstat]'  \
                      Subj002 Subj002+tlrc'[A#0_Coef]'  Subj002+tlrc'[A#0_Tstat]'  \
                  -set Condition_1_B            \
                      Subj001 Subj001+tlrc'[B#0_Coef]'  Subj001+tlrc'[B#0_Tstat]'  \
                      Subj002 Subj002+tlrc'[B#0_Coef]'  Subj002+tlrc'[B#0_Tstat]'  \
                  -set Condition_2_X            \
                      Subj001 Subj001+tlrc'[X#0_Coef]'  Subj001+tlrc'[X#0_Tstat]'  \
                      Subj002 Subj002+tlrc'[X#0_Coef]'  Subj002+tlrc'[X#0_Tstat]'  \
                  -set Condition_2_Y            \
                      Subj001 Subj001+tlrc'[Y#0_Coef]'  Subj001+tlrc'[Y#0_Tstat]'  \
                      Subj002 Subj002+tlrc'[Y#0_Coef]'  Subj002+tlrc'[Y#0_Tstat]'  \

I know this must be missing something, because there is no way to tell that 1A and 1B are levels of the same condition (same for 2X and 2Y)

P.S. - I believe the page you linked me to might be the one that is supposed to be linked in the output of 3dMEMA -help, but that link is currently broken (https://afni.nimh.nih.gov/sscc/gangc/MEMA.html).

You need to combine those 4 effect estimates, and obtain their weighted value plus the corresponding t-stat as input for 3dMEMA. This means that you would have to get the combined value and its t-stat from each subject’s individual analysis (3dREMLfit in AFNI).

I believe the page you linked me to might be the one that is supposed to be linked in the output of 3dMEMA -help,
but that link is currently broken (https://afni.nimh.nih.gov/sscc/gangc/MEMA.html).

This was caused by our server update. Thanks for notifying us of this. I’ll update the link in the next AFNI release.