Group comparisons after 3dRegAna

Hello, I need some help about 3dRegAna. I am doing a two-way ANOVA with unbalanced data. Below is a sample of my model (columns are factor a, factor b, and axb respectively).
3dRegAna
-rows 39
-cols 3
-xydata 0 0 0 subj1.nii
-xydata 0 1 0 subj2.nii
-xydata 1 0 0 subj3.nii
-xydata 1 1 1 subj4.nii

-model 1 2 3 : 0 \

I observed significant axb interaction at a couple of voxel clusters. So, I hope to perform pairwise comparisons to find out the detail. Any suggestion on how to do it?

Thanks!

Use 3dMVM instead of 3dRegAna because the former is more equipped for teasing apart various effects.

Thank you, Gang.

I tried to run 3dMVM but got the following error message:

** Error:
Illegal parameters on command line:
c(“-prefix 3dMVM_test -jobs 1 -bsVars ’AB’ -mask mask.nii -SS_type 3 -num_glt 2 -gltLabel 1 a1_b1_vs_b2 -gltCode 1 ‘A : 1a1 B : 1b1 -1b2’ -gltLabel 2 a2_b1_vs_b2 -gltCode 2 ‘A : 1a2 B : 1b1 -1*b2’ -dataTable”, “@table.txt”)
Try -allowed_options, or -help for details

I would appreciate some advice.

Thanks!
Shiyu

Shiyu, could you show us the 3dMVM script? And how did you execute the script?

Hi Gang, my script is below:
3dMVM -prefix 3dMVM_test -jobs 1
-bsVars 'AB’
-mask mask.nii
-SS_type 3
-num_glt 2
-gltLabel 1 a1_b1_vs_b2 -gltCode 1 ‘A : 1
a1 B : 1b1 -1b2’
-gltLabel 2 a2_b1_vs_b2 -gltCode 2 ‘A : 1a2 B : 1b1 -1*b2’
-dataTable @table.txt

And the table.txt looks like this:
Subj A B InputFile
CD1 a1 b1 CD1_zmap.nii
CD2 a2 b2 CD2_zmap.nii

Thanks
Shiyu

Again, how did you execute your 3dMVM script?

I directly copied the command lines into the terminal.

And the R version is 3.4.4. Not sure if it is relevant to this problem.

Try to save the script to a file and then execute by typing something like

nohup tcsh myScript > myDiary &

See if you still get the error message.

Hi Gang,

I tried to save the script to txt and execute it in terminal. But still got the same error:

** Error:
Illegal parameters on command line:
c(“-prefix 3dMVM_test -jobs 1”, “-bsVars AB", “-mask wbrainmask_th05.nii”, “-SS_type 3”, “-num_glt 2”, "-gltLabel 1 a1_b1_vs_b2 -gltCode 1 A : 1a1 B : 1b1-1b2”, “-gltLabel 2 a2_b1_vs_b2 -gltCode 2”, “A : 1a2 B : 1b1-1*b2”, “-dataTable @table_test.txt”)
Try -allowed_options, or -help for details

Again, the script I’m using is:
3dMVM -prefix 3dMVM_test -jobs 1 -bsVars ‘AB’ -mask mask.nii -SS_type 3 -num_glt 2 -gltLabel 1 a1_b1_vs_b2 -gltCode 1 'A : 1a1 B : 1b1-1b2’ -gltLabel 2 a2_b1_vs_b2 -gltCode 2 ‘A : 1a2 B : 1b1-1*b2’ -dataTable @table_test.txt

The table_test.txt is:
Subj A B InputFile
s1 a1 b1 s1_rest_z.nii
s2 a1 b1 s2_rest_z.nii
s3 a1 b1 s3_rest_z.nii
s4 a1 b1 s4_rest_z.nii
s5 a2 b2 s5_rest_z.nii
s6 a2 b2 s6_rest_z.nii
s7 a2 b2 s7_rest_z.nii
s8 a2 b2 s8_rest_z.nii
s9 a1 b2 s9_rest_z.nii
s10 a1 b2 s10_rest_z.nii
s11 a1 b2 s11_rest_z.nii
s12 a1 b2 s12_rest_z.nii
s13 a2 b1 s13_rest_z.nii
s14 a2 b1 s14_rest_z.nii
s15 a2 b1 s15_rest_z.nii
s16 a2 b1 s16_rest_z.nii

I’m not so sure what’s going on about the situation since I can’t duplicate the error. A last ditch: what is your AFNI version? Is it up to date?

Hi Gang,

I tried to type in the script directly into the terminal and the error did not show up. I think it could be some formatting issue of the text. However, it gave me this error:
** Error:
The number of -gltLabel is not consistent with that
specified by -num_glt 2

No matter how many glt I set, it always gave me the error saying the number is not consistent.

Hi Gang,

I apologize for bothering you again… But I came across a new error message as below:

Error in outList[[1]][[n]] : subscript out of bounds
Calls: process.MVM.opts → gl_Constr
Execution halted

I think the issue is with the line below because everything works well without it.
-num_glt 1
-gltLabel 1 AvB -gltCode 1 ‘group : 1a -1b’ \

My data table looks like
-dataTable
Subj group treat InputFile
s1 a T1 s1_map_z.nii
s2 a T1 s2_map_z.nii
S3 a T2 s3_map_z.nii
S4 a T2 s4_map_z.nii
s5 b T1 s5_map_z.nii
s6 b T1 s6_map_z.nii
s7 b T2 s7_map_z.nii
s8 b T2 s8_map_z.nii

Could you help to see what could be wrong? Thanks.

Can you show the whole 3dMVM script? Is it the same as before?


3dMVM -prefix 3dMVM_test -jobs 1 -bsVars  'A*B' -mask mask.nii -SS_type 3 -num_glt 2 -gltLabel 1 a1_b1_vs_b2 -gltCode 1 'A : 1*a1 B : 1*b1-1*b2' -gltLabel 2 a2_b1_vs_b2 -gltCode 2 'A : 1*a2 B : 1*b1-1*b2' -dataTable @table_test.txt

Hi Gang, the whole script is:

3dMVM -prefix 3dmvm_test
-jobs 2
-mask brainmask.nii
-bsVars ‘grouptreat’
-num_glt 1
-gltLabel 1 AvB -gltCode 1 'group : 1
a -1*b’
-dataTable
Subj group treat InputFile
s1 a T1 s1_map_z.nii
s2 a T1 s2_map_z.nii
S3 a T2 s3_map_z.nii
S4 a T2 s4_map_z.nii
s5 b T1 s5_map_z.nii
s6 b T1 s6_map_z.nii
s7 b T2 s7_map_z.nii
s8 b T2 s8_map_z.nii

It runs well without the glt lines:
-num_glt 1
-gltLabel 1 AvB -gltCode 1 ‘group : 1a -1b’ \

Many thanks!

Since you’re not revealing your AFNI version, I suggest that you try a different interface:

https://afni.nimh.nih.gov/pub/dist/doc/htmldoc/tutorials/3dMVM_validator/main_toc.html

Hi Gang,

Thank you so much for the suggestion. It works! I really appreciate your help.

Best,
Shiyu