3dMEMA paired-t test

Hi all,

I want to do a paired t-test using 3DMEMA for a dataset where each participant was scanned twice (t1, t2). I modeled the data with 3dDeconvolve separately for each participant and each session. In the 3dMEMA example for paired t-tests it seems to me like there is only one beta-coef (B+tlrc) and one t-stat (T+tlrc) BRIK necessary for each subject and contrast:

Example 3 — Paired type (difference of two regression coefficients or
general linear contrasts from each subject in a group). One scenario of
general linear combinations is to test linear or higher order trend at
individual level, and then take the trend information to group level.

3dMEMA -prefix ex2
-jobs 4
-missing_data happyMiss+tlrc sadMiss+tlrc
-set happy-sad
ac ac_hap-sad_B+tlrc ac_hap-sad_T+tlrc
ejk ejk_hap-sad_B+tlrc ejk_hap-sad_T+tlrc

ss ss_hap-sad_B+tlrc ss_hap-sad_T+tlrc \

To me this looks odd becaue I have two timepoints per contrast per subject and I wonder how is this accounted for in the code. Here is an example of my data:

subject 1 subject1_time1_con1_B+tlrc subject1_time1_con1_T+tlrc
subject 1 subject1_time2_con1_B+tlrc subject1_time2_con1_T+tlrc

Can you please advise me on how to organize the data that time is accounted for?

Bests,
Philipp

Try something like

dMEMA -prefix ex2

-conditions happy sad
-set happy

-set sad

Hi Gang,

does this mean in my case I don’t have happy/sad but time1/time2? Otherwise I don’t understand how my WS factor time is accounted for in addition to the condition.

Bests,
Philipp

does this mean in my case I don’t have happy/sad but time1/time2?

The example script is intended to show a demo case, so change it to adapt to your specific situation.