How to perform group analysis for different group subjects have different conditions

Dear Gang, AFNI experts and users
I have 5 groups subjects. Condition1 and condition 2 were performed for each subject in group 1. Condition 3 and 4 for group 2. Condition 5 and 6 for group 3…

Subj contrast roi InputFile
12120 generous roi_25 beta_12120_generous_x_roi_25_allrun+tlrc
12120 generous roi_26 beta_12120_generous_x_roi_26_allrun+tlrc
12120 selfish roi_25 beta_12120_selfish_x_roi_25_allrun+tlrc
12120 selfish roi_26 beta_12120_selfish_x_roi_26_allrun+tlrc
12216 generous roi_25 beta_12216_generous_x_roi_25_allrun+tlrc
12216 generous roi_26 beta_12216_generous_x_roi_26_allrun+tlrc
12216 selfish roi_25 beta_12216_selfish_x_roi_25_allrun+tlrc
12216 selfish roi_26 beta_12216_selfish_x_roi_26_allrun+tlrc
12517 generous roi_25 beta_12517_generous_x_roi_25_allrun+tlrc \

The roi is with-sub variable. Contrast meant the conditions. However, the 3dMVM could not perform well and it echo about 4 possible reasons. It perform well when I change the table to this:

Subj contrast roi InputFile
12120_1 generous roi_25 beta_12120_generous_x_roi_25_allrun+tlrc
12120_1 generous roi_26 beta_12120_generous_x_roi_26_allrun+tlrc
12120_2 selfish roi_25 beta_12120_selfish_x_roi_25_allrun+tlrc
12120_2 selfish roi_26 beta_12120_selfish_x_roi_26_allrun+tlrc
12216_1 generous roi_25 beta_12216_generous_x_roi_25_allrun+tlrc
12216_1 generous roi_26 beta_12216_generous_x_roi_26_allrun+tlrc
12216_2 selfish roi_25 beta_12216_selfish_x_roi_25_allrun+tlrc
12216_2 selfish roi_26 beta_12216_selfish_x_roi_26_allrun+tlrc
12517_1 generous roi_25 beta_12517_generous_x_roi_25_allrun+tlrc \

However, I want to let the model know the condition 1 and condition 2 were belong to one person; condition 3 and 4 were belong to another person. So how to model it ?
Thanks.

Rujing

Rujing, what are you research questions/hypotheses?

Dear Gang,
Thanks for your reply and help.

There were 10 conditions: thegood othergood, reject accept, healthy tasty, generous selfish, forage engage. For each subject, there were only two conditions, e.g., 12120 only has generous and selfish, and does not have other eight conditions.

The research questions is whether there are any differences between contrasts. Could this be called main effect or fixed effect? If the fixed effect is significant, a further question is which two contrasts are significantly different, e.g., is thegood vs. reject different?

After I post last message, I have tried the 3dLME. The 3dLME could run this table.

Subj contrast roi InputFile
12120 generous roi_25 beta_12120_generous_x_roi_25_allrun+tlrc
12120 generous roi_26 beta_12120_generous_x_roi_26_allrun+tlrc
12120 selfish roi_25 beta_12120_selfish_x_roi_25_allrun+tlrc
12120 selfish roi_26 beta_12120_selfish_x_roi_26_allrun+tlrc
12216 generous roi_25 beta_12216_generous_x_roi_25_allrun+tlrc
12216 generous roi_26 beta_12216_generous_x_roi_26_allrun+tlrc
12216 selfish roi_25 beta_12216_selfish_x_roi_25_allrun+tlrc
12216 selfish roi_26 beta_12216_selfish_x_roi_26_allrun+tlrc
12517 generous roi_25 beta_12517_generous_x_roi_25_allrun+tlrc \

And the code is :

3dLME -prefix Example2 -jobs 28
-model "contrastroi"
-ranEff ‘~1’
-SS_type 3
-num_glt 40
-gltLabel 1 thegood_reject -gltCode 1 'contrast : 1
thegood -1reject’
-gltLabel 2 thegood_accept -gltCode 2 'contrast : 1
thegood -1accept’
-gltLabel 3 thegood_healthy -gltCode 3 'contrast : 1
thegood -1healthy’
-gltLabel 4 thegood_tasty -gltCode 4 'contrast : 1
thegood -1tasty’
-gltLabel 5 thegood_generous -gltCode 5 'contrast : 1
thegood -1generous’
-gltLabel 6 thegood_selfish -gltCode 6 'contrast : 1
thegood -1selfish’
-gltLabel 7 thegood_forage -gltCode 7 'contrast : 1
thegood -1forage’
-gltLabel 8 thegood_engage -gltCode 8 'contrast : 1
thegood -1engage’
-gltLabel 9 othergood_reject -gltCode 9 'contrast : 1
othergood -1reject’
-gltLabel 10 othergood_accept -gltCode 10 'contrast : 1
othergood -1accept’
-gltLabel 11 othergood_healthy -gltCode 11 'contrast : 1
othergood -1healthy’
-gltLabel 12 othergood_tasty -gltCode 12 'contrast : 1
othergood -1tasty’
-gltLabel 13 othergood_generous -gltCode 13 'contrast : 1
othergood -1generous’
-gltLabel 14 othergood_selfish -gltCode 14 'contrast : 1
othergood -1selfish’
-gltLabel 15 othergood_forage -gltCode 15 'contrast : 1
othergood -1forage’
-gltLabel 16 othergood_engage -gltCode 16 'contrast : 1
othergood -1engage’
-gltLabel 17 reject_healthy -gltCode 17 'contrast : 1
reject -1healthy’
-gltLabel 18 reject_tasty -gltCode 18 'contrast : 1
reject -1tasty’
-gltLabel 19 reject_generous -gltCode 19 'contrast : 1
reject -1generous’
-gltLabel 20 reject_selfish -gltCode 20 'contrast : 1
reject -1selfish’
-gltLabel 21 reject_forage -gltCode 21 'contrast : 1
reject -1forage’
-gltLabel 22 reject_engage -gltCode 22 'contrast : 1
reject -1engage’
-gltLabel 23 accept_healthy -gltCode 23 'contrast : 1
accept -1healthy’
-gltLabel 24 accept_tasty -gltCode 24 'contrast : 1
accept -1tasty’
-gltLabel 25 accept_generous -gltCode 25 'contrast : 1
accept -1generous’
-gltLabel 26 accept_selfish -gltCode 26 'contrast : 1
accept -1selfish’
-gltLabel 27 accept_forage -gltCode 27 'contrast : 1
accept -1forage’
-gltLabel 28 accept_engage -gltCode 28 'contrast : 1
accept -1engage’
-gltLabel 29 healthy_generous -gltCode 29 'contrast : 1
healthy -1generous’
-gltLabel 30 healthy_selfish -gltCode 30 'contrast : 1
healthy -1selfish’
-gltLabel 31 healthy_forage -gltCode 31 'contrast : 1
healthy -1forage’
-gltLabel 32 healthy_engage -gltCode 32 'contrast : 1
healthy -1engage’
-gltLabel 33 tasty_generous -gltCode 33 'contrast : 1
tasty -1generous’
-gltLabel 34 tasty_selfish -gltCode 34 'contrast : 1
tasty -1selfish’
-gltLabel 35 tasty_forage -gltCode 35 'contrast : 1
tasty -1forage’
-gltLabel 36 tasty_engage -gltCode 36 'contrast : 1
tasty -1engage’
-gltLabel 37 generous_forage -gltCode 37 'contrast : 1
generous -1forage’
-gltLabel 38 generous_engage -gltCode 38 'contrast : 1
generous -1engage’
-gltLabel 39 selfish_forage -gltCode 39 'contrast : 1
selfish -1forage’
-gltLabel 40 selfish_engage -gltCode 40 'contrast : 1
selfish -1*engage’
-dataTable @table1.txt \

Questions:
1, is the model I tried in the 3dLME code correct?
2, in the Example2+tlrc, there are many subricks, such as Interecept F, contrast F, roi F, contrast:roi F, thegood_reject, thegood_reject z,… Is the contrast F subrick fixed effect of contrast? Is thegood_reject z fixed effect of thegood vs. reject?
3, in the Example2+tlrc, I would like to know where I could find voxel size, then I can use them to set the Clustersize in the AFNI GUI (multiple comparisons correction) to see significant clusters.

Thanks very much.
All the best.
Rujing

Condition1 and condition 2 were performed for each subject in group 1. Condition 3 and 4 for group 2. Condition 5 and 6 for group 3

You can use 3dttest++ and compare condition 1 and condition 2 among the subjects in group 1, compare condition 3 and condition 4 among group 2, …

Hi Gang,
Thanks very much for your reply. I have two more questions:

question1:
I am also interested in main effect of conditions and in comparing condition 1 among the subjects in group 1 and condition 3 among subjects in group 2. Based on this, is 3dLME better?

question2:
I would like to know where I could find voxel sizes, then I can use them to set the Clustersize in the AFNI GUI (multiple comparisons correction) to see significant clusters.

Thanks.
Rujing

I am also interested in main effect of conditions and in comparing condition 1 among the subjects in group 1 and condition 3 among subjects in group 2.

You could operationally compare the two conditions with a two-sample t-test (using 3dttest++), but from the modeling perspective it’s really a bad model and a poor experimental design. Ideally you want to have both conditions available for the two groups.

I would like to know where I could find voxel sizes, then I can use them to set the Clustersize in the AFNI GUI (multiple comparisons correction) to see significant clusters.

You can try 3dttest++ -Clusterize or -ETAC. Read the help documentation for details.