one-way between subjects ANOVA using 3dANOVA and 3dMVM

Dear all,

I tried to run a one-way between subjects ANOVA, using both 3dANOVA and 3dMVM (as suggested in previous posts), unsuccessfully. I have 3 groups of participants (PT, HC, TC) of different sample sizes.

Please, see below my scripts and the attached error messages:

3dANOVA -levels 3 \
-dset 1 1371-006_stats+tlrc’[20]’ \
-dset 1 1371-015_stats+tlrc’[20]’
-dset 1 1371-016_stats+tlrc’[20]’
-dset 1 1371-021_stats+tlrc’[20]’
-dset 1 1371-032_stats+tlrc’[20]’
-dset 1 1371-040_stats+tlrc’[20]’
-dset 1 1372-002_stats+tlrc’[20]’
-dset 1 1372-011_stats+tlrc’[20]’
-dset 1 1372-020_stats+tlrc’[20]’
-dset 1 1372-023_stats+tlrc’[20]’
-dset 1 1372-029_stats+tlrc’[20]’
-dset 1 1372-040_stats+tlrc’[20]’
-dset 1 1372-050_stats+tlrc’[20]’ \
-dset 2 1371-013_stats+tlrc’[20]’
-dset 2 1371-014_stats+tlrc’[20]’
-dset 2 1371-017_stats+tlrc’[20]’
-dset 2 1371-030_stats+tlrc’[20]’
-dset 2 1371-036_stats+tlrc’[20]’
-dset 2 1371-037_stats+tlrc’[20]’
-dset 2 1371-054_stats+tlrc’[20]’
-dset 2 1371-085_stats+tlrc’[20]’
-dset 2 1371-087_stats+tlrc’[20]’
-dset 2 1371-091_stats+tlrc’[20]’
-dset 2 1371-092_stats+tlrc’[20]’
-dset 2 1371-095_stats+tlrc’[20]’
-dset 2 1371-097_stats+tlrc’[20]’
-dset 2 1371-104_stats+tlrc’[20]’
-dset 2 1372-006_stats+tlrc’[20]’
-dset 2 1372-016_stats+tlrc’[20]’
-dset 2 1372-026_stats+tlrc’[20]’
-dset 2 1372-034_stats+tlrc’[20]’
-dset 2 1372-048_stats+tlrc’[20]’ \
-dset 3 1371-007_stats+tlrc’[20]’
-dset 3 1371-022_stats+tlrc’[20]’
-dset 3 1371-029_stats+tlrc’[20]’
-dset 3 1371-033_stats+tlrc’[20]’
-dset 3 1371-039_stats+tlrc’[20]’
-dset 3 1371-041_stats+tlrc’[20]’
-dset 3 1371-050_stats+tlrc’[20]’
-dset 3 1371-064_stats+tlrc’[20]’
-dset 3 1371-075_stats+tlrc’[20]’
-dset 3 1371-077_stats+tlrc’[20]’
-dset 3 1371-080_stats+tlrc’[20]’
-dset 3 1371-084_stats+tlrc’[20]’
-dset 3 1371-093_stats+tlrc’[20]’
-dset 3 1371-094_stats+tlrc’[20]’
-dset 3 1371-101_stats+tlrc’[20]’
-dset 3 1372-001_stats+tlrc’[20]’
-dset 3 1372-004_stats+tlrc’[20]’
-dset 3 1372-007_stats+tlrc’[20]’
-dset 3 1372-008_stats+tlrc’[20]’
-dset 3 1372-009_stats+tlrc’[20]’
-dset 3 1372-010_stats+tlrc’[20]’
-dset 3 1372-012_stats+tlrc’[20]’
-dset 3 1372-013_stats+tlrc’[20]’
-dset 3 1372-017_stats+tlrc’[20]’
-dset 3 1372-018_stats+tlrc’[20]’
-dset 3 1372-022_stats+tlrc’[20]’
-dset 3 1372-027_stats+tlrc’[20]’
-dset 3 1372-032_stats+tlrc’[20]’
-dset 3 1372-035_stats+tlrc’[20]’
-dset 3 1372-042_stats+tlrc’[20]’
-dset 3 1372-045_stats+tlrc’[20]’
-dset 3 1372-047_stats+tlrc’[20]’
-dset 3 1372-049_stats+tlrc’[20]’
-ftr Group\
-mean 1 HC \
-mean 2 PT \
-mean 3 TC \
-diff 1 2 HCvsPT \
-diff 2 3 PTvsTC \
-diff 1 3 HCvsTC \
-contr 1 1 -1 HCPTvsTC \
-contr -1 1 1 PTTCvsHC \
-contr 1 -1 1 HCvsPTTC \
-bucket PPG_ANOVA

3dMVM -prefix 3dMVM_PPG -jobs 24
-bsVars group
-wsVars condition
-num_glf 1
-glfLabel 1 ‘group’ -glfCode 1 ‘group : 1HC -1PT & 1HC -1PT & 1PT -1TC’
Subj group condition InputFile
1371-006_stats HC face-shape 1371-006_stats+tlrc.HEAD[20]
1371-015_stats HC face-shape 1371-015_stats+tlrc.HEAD[20]
1371-016_stats HC face-shape 1371-016_stats+tlrc.HEAD[20]
1371-021_stats HC face-shape 1371-021_stats+tlrc.HEAD[20]
1371-032-stats HC face-shape 1371-032_stats+tlrc.HEAD[20]
1371-040_stats HC face-shape 1371-040_stats+tlrc.HEAD[20]
1371-042_stats HC face-shape 1371-042_stats+tlrc.HEAD[20]
1371-043_stats HC face-shape 1371-043_stats+tlrc.HEAD[20]
1371-058_stats HC face-shape 1371-058_stats+tlrc.HEAD[20]
1371-060_stats HC face-shape 1371-060_stats+tlrc.HEAD[20]
1371-063_stats HC face-shape 1371-063_stats+tlrc.HEAD[20]
1371-074_stats HC face-shape 1371-074_stats+tlrc.HEAD[20]
1371-078_stats HC face-shape 1371-078_stats+tlrc.HEAD[20]
1371-099_stats HC face-shape 1371-099_stats+tlrc.HEAD[20]
1372-002_stats HC face-shape 1372-002_stats+tlrc.HEAD[20]
1372-011_stats HC face-shape 1372-011_stats+tlrc.HEAD[20]
1372-020_stats HC face-shape 1372-020_stats+tlrc.HEAD[20]
1372-023_stats HC face-shape 1372-023_stats+tlrc.HEAD[20]
1372-029_stats HC face-shape 1372-029_stats+tlrc.HEAD[20]
1372-040_stats HC face-shape 1372-040_stats+tlrc.HEAD[20]
1372-050_stats HC face-shape 1372-050_stats+tlrc.HEAD[20]
1371-013_stats PT face-shape 1371-013_stats+tlrc.HEAD[20]
1371-014_stats PT face-shape 1371-014_stats+tlrc.HEAD[20]
1371-017_stats PT face-shape 1371-017_stats+tlrc.HEAD[20]
1371-030_stats PT face-shape 1371-030_stats+tlrc.HEAD[20]
1371-036_stats PT face-shape 1371-036_stats+tlrc.HEAD[20]
1371-037_stats PT face-shape 1371-037_stats+tlrc.HEAD[20]
1371-054_stats PT face-shape 1371-054_stats+tlrc.HEAD[20]
1371-085_stats PT face-shape 1371-085_stats+tlrc.HEAD[20]
1371-087_stats PT face-shape 1371-087_stats+tlrc.HEAD[20]
1371-091_stats PT face-shape 1371-091_stats+tlrc.HEAD[20]
1371-092_stats PT face-shape 1371-092_stats+tlrc.HEAD[20]
1371-095_stats PT face-shape 1371-095_stats+tlrc.HEAD[20]
1371-097_stats PT face-shape 1371-097_stats+tlrc.HEAD[20]
1371-104_stats PT face-shape 1371-104_stats+tlrc.HEAD[20]
1372-006_stats PT face-shape 1372-006_stats+tlrc.HEAD[20]
1372-016_stats PT face-shape 1372-016_stats+tlrc.HEAD[20]
1372-026_stats PT face-shape 1372-026_stats+tlrc.HEAD[20]
1372-034_stats PT face-shape 1372-034_stats+tlrc.HEAD[20]
1372-048_stats PT face-shape 1372-048_stats+tlrc.HEAD[20]
1371-007_stats TC face-shape 1371-007_stats+tlrc.HEAD[20]
1371-022_stats TC face-shape 1371-022_stats+tlrc.HEAD[20]
1371-029_stats TC face-shape 1371-029_stats+tlrc.HEAD[20]
1371-033_stats TC face-shape 1371-033_stats+tlrc.HEAD[20]
1371-039_stats TC face-shape 1371-039_stats+tlrc.HEAD[20]
1371-041_stats TC face-shape 1371-041_stats+tlrc.HEAD[20]
1371-050_stats TC face-shape 1371-050_stats+tlrc.HEAD[20]
1371-064_stats TC face-shape 1371-064_stats+tlrc.HEAD[20]
1371-075_stats TC face-shape 1371-075_stats+tlrc.HEAD[20]
1371-077_stats TC face-shape 1371-077_stats+tlrc.HEAD[20]
1371-080_stats TC face-shape 1371-080_stats+tlrc.HEAD[20]
1371-084_stats TC face-shape 1371-084_stats+tlrc.HEAD[20]
1371-093_stats TC face-shape 1371-093_stats+tlrc.HEAD[20]
1371-094_stats TC face-shape 1371-094_stats+tlrc.HEAD[20]
1371-101_stats TC face-shape 1371-101_stats+tlrc.HEAD[20]
1372-001_stats TC face-shape 1372-001_stats+tlrc.HEAD[20]
1372-004_stats TC face-shape 1372-004_stats+tlrc.HEAD[20]
1372-007_stats TC face-shape 1372-007_stats+tlrc.HEAD[20]
1372-008_stats TC face-shape 1372-008_stats+tlrc.HEAD[20]
1372-009_stats TC face-shape 1372-009_stats+tlrc.HEAD[20]
1372-010_stats TC face-shape 1372-010_stats+tlrc.HEAD[20]
1372-012_stats TC face-shape 1372-012_stats+tlrc.HEAD[20]
1372-013_stats TC face-shape 1372-013_stats+tlrc.HEAD[20]
1372-017_stats TC face-shape 1372-017_stats+tlrc.HEAD[20]
1372-018_stats TC face-shape 1372-018_stats+tlrc.HEAD[20]
1372-022_stats TC face-shape 1372-022_stats+tlrc.HEAD[20]
1372-027_stats TC face-shape 1372-027_stats+tlrc.HEAD[20]
1372-032_stats TC face-shape 1372-032_stats+tlrc.HEAD[20]
1372-035_stats TC face-shape 1372-035_stats+tlrc.HEAD[20]
1372-042_stats TC face-shape 1372-042_stats+tlrc.HEAD[20]
1372-045_stats TC face-shape 1372-045_stats+tlrc.HEAD[20]
1372-047_stats TC face-shape 1372-047_stats+tlrc.HEAD[20]
1372-049_stats TC face-shape 1372-049_stats+tlrc.HEAD[20]

I can’t figure out what the issues are in my scripts. For the 3dMVM function, I also tried to run the script with the Input File ’ …_stats+tlrc [20]', but I still obtained the same error message. Any help would be greatly appreciated.

Thank you,


Hi Sarah,

According to the errors, the scripts have shell errors in them (not necessarily AFNI errors). However, you may have already fixed some of them, since I do not see the same errors that would lead to the given error messages.

But error messages to be aware of:

a. XXX: Command not found.

This means that the shell does not know of program XXX (in your PATH), for whatever “XXX” program is in question.
This error usually means that there is are bad or simply missing line continuation characters ().
Since your message says “-dset: Commmand not found” after the line “-dset 1 1376-006_stats+tlrc[20]”, it is likely there is a missing '' at the end of that line.

If there are apparent '' characters at the ends of all lines and this error still appears, try something like:

file_tool -test -infile MY_SCRIPT.txt -prefix FIXED.txt

to fix or suggest lines that need fixing.

Note also that there is a “-dataTable: Command not found.” error, suggesting a missing backslash in that script, too.

b. XXX: No match

This is also a shell error, and means there is a wildcard failure somewhere, due to characters like *?[.
It tends to mean that you need “quotes” around some sub-brick selectors. The 3dMVM command seems to be missing quotes around all inputs. Note that if the data table is in an external file that you pass to 3dMVM, the quotes are not needed.

Does that seem reasonable?

  • rick

Hi Rick,

Thank you very much for your quick and effective response! Really helpful.

For the 3dANOVA, I followed your suggestion and tried:
file_tool -test -infile MY_SCRIPT.txt -prefix FIXED.txt

It solved my issue, and I was able to run the 3dANOVA effectively, tons of thanks!

For the 3dMVM, I edited the script as follow:

3dMVM -prefix 3dMVM_PPG -jobs 24
-bsVars group
-wsVars condition
-num_glf 1
-glfLabel 1 ‘group’ -glfCode 1 ‘group : 1HC -1PT & 1HC -1PT & 1PT -1TC’ \
-dataTable \
Subj group condition InputFile \
1371-006_stats HC face-shape 1371-006_stats+tlrc’[20]’
1371-015_stats HC face-shape 1371-015_stats+tlrc’[20]’
1371-016_stats HC face-shape 1371-016_stats+tlrc’[20]’
1371-021_stats HC face-shape 1371-021_stats+tlrc’[20]’
1371-032-stats HC face-shape 1371-032_stats+tlrc’[20]’
1371-040_stats HC face-shape 1371-040_stats+tlrc’[20]’
1371-042_stats HC face-shape 1371-042_stats+tlrc’[20]’
1371-043_stats HC face-shape 1371-043_stats+tlrc’[20]’
1371-058_stats HC face-shape 1371-058_stats+tlrc’[20]’
1371-060_stats HC face-shape 1371-060_stats+tlrc’[20]’
1371-063_stats HC face-shape 1371-063_stats+tlrc’[20]’
1371-074_stats HC face-shape 1371-074_stats+tlrc’[20]’
1371-078_stats HC face-shape 1371-078_stats+tlrc’[20]’
1371-099_stats HC face-shape 1371-099_stats+tlrc’[20]’
1372-002_stats HC face-shape 1372-002_stats+tlrc’[20]’
1372-011_stats HC face-shape 1372-011_stats+tlrc’[20]’
1372-020_stats HC face-shape 1372-020_stats+tlrc’[20]’
1372-023_stats HC face-shape 1372-023_stats+tlrc’[20]’
1372-029_stats HC face-shape 1372-029_stats+tlrc’[20]’
1372-040_stats HC face-shape 1372-040_stats+tlrc’[20]’
1372-050_stats HC face-shape 1372-050_stats+tlrc’[20]’
1371-013_stats PT face-shape 1371-013_stats+tlrc’[20]’
1371-014_stats PT face-shape 1371-014_stats+tlrc’[20]’
1371-017_stats PT face-shape 1371-017_stats+tlrc’[20]’
1371-030_stats PT face-shape 1371-030_stats+tlrc’[20]’
1371-036_stats PT face-shape 1371-036_stats+tlrc’[20]’
1371-037_stats PT face-shape 1371-037_stats+tlrc’[20]’
1371-054_stats PT face-shape 1371-054_stats+tlrc’[20]’
1371-085_stats PT face-shape 1371-085_stats+tlrc’[20]’
1371-087_stats PT face-shape 1371-087_stats+tlrc’[20]’
1371-091_stats PT face-shape 1371-091_stats+tlrc’[20]’
1371-092_stats PT face-shape 1371-092_stats+tlrc’[20]’
1371-095_stats PT face-shape 1371-095_stats+tlrc’[20]’
1371-097_stats PT face-shape 1371-097_stats+tlrc’[20]’
1371-104_stats PT face-shape 1371-104_stats+tlrc’[20]’
1372-006_stats PT face-shape 1372-006_stats+tlrc’[20]’
1372-016_stats PT face-shape 1372-016_stats+tlrc’[20]’
1372-026_stats PT face-shape 1372-026_stats+tlrc’[20]’
1372-034_stats PT face-shape 1372-034_stats+tlrc’[20]’
1372-048_stats PT face-shape 1372-048_stats+tlrc’[20]’
1371-007_stats TC face-shape 1371-007_stats+tlrc’[20]’
1371-022_stats TC face-shape 1371-022_stats+tlrc’[20]’
1371-029_stats TC face-shape 1371-029_stats+tlrc’[20]’
1371-033_stats TC face-shape 1371-033_stats+tlrc’[20]’
1371-039_stats TC face-shape 1371-039_stats+tlrc’[20]’
1371-041_stats TC face-shape 1371-041_stats+tlrc’[20]’
1371-050_stats TC face-shape 1371-050_stats+tlrc’[20]’
1371-064_stats TC face-shape 1371-064_stats+tlrc’[20]’
1371-075_stats TC face-shape 1371-075_stats+tlrc’[20]’
1371-077_stats TC face-shape 1371-077_stats+tlrc’[20]’
1371-080_stats TC face-shape 1371-080_stats+tlrc’[20]’
1371-084_stats TC face-shape 1371-084_stats+tlrc’[20]’
1371-093_stats TC face-shape 1371-093_stats+tlrc’[20]’
1371-094_stats TC face-shape 1371-094_stats+tlrc’[20]’
1371-101_stats TC face-shape 1371-101_stats+tlrc’[20]’
1372-001_stats TC face-shape 1372-001_stats+tlrc’[20]’
1372-004_stats TC face-shape 1372-004_stats+tlrc’[20]’
1372-007_stats TC face-shape 1372-007_stats+tlrc’[20]’
1372-008_stats TC face-shape 1372-008_stats+tlrc’[20]’
1372-009_stats TC face-shape 1372-009_stats+tlrc’[20]’
1372-010_stats TC face-shape 1372-010_stats+tlrc’[20]’
1372-012_stats TC face-shape 1372-012_stats+tlrc’[20]’
1372-013_stats TC face-shape 1372-013_stats+tlrc’[20]’
1372-017_stats TC face-shape 1372-017_stats+tlrc’[20]’
1372-018_stats TC face-shape 1372-018_stats+tlrc’[20]’
1372-022_stats TC face-shape 1372-022_stats+tlrc’[20]’
1372-027_stats TC face-shape 1372-027_stats+tlrc’[20]’
1372-032_stats TC face-shape 1372-032_stats+tlrc’[20]’
1372-035_stats TC face-shape 1372-035_stats+tlrc’[20]’
1372-042_stats TC face-shape 1372-042_stats+tlrc’[20]’
1372-045_stats TC face-shape 1372-045_stats+tlrc’[20]’
1372-047_stats TC face-shape 1372-047_stats+tlrc’[20]’
1372-049_stats TC face-shape 1372-049_stats+tlrc’[20]’

I ran the script again, but it didn’t work. I tried:
file_tool -test -infile MY_SCRIPT.txt -prefix FIXED2.txt

and re-run 3dMVM and now had the following message:

Error: quitting due to model test failure.

I know that I can use the 3dANOVA that is now working, but out of curiosity, would you know what’s wrong in my 3dMVM model?

Thanks again,


Hi Sarah,

The MVM model validation is above my pay grade. :slight_smile: Gang will surely chime in.
Though I admit to not recognizing ‘&’ characters as being part of the GLT.

  • rick


Are you trying to use 3dANOVA and 3dMVM to build the same model and perform the same analysis? In other words, do you just have one condition: face-shape? If so, remove “condition” and try something like

3dMVM -prefix 3dMVM_PPG -jobs 24
-bsVars group
-num_glt 3
-gltLabel 1 ‘HC-PT’ -gltCode 1 ‘group : 1HC -1PT’
-gltLabel 2 ‘HC-TC’ -gltCode 2 ‘group : 1HC -1TC’
-gltLabel 3 ‘TC-PT’ -gltCode 3 ‘group : 1TC -1PT’
Subj group condition InputFile

Hi Gang & Rick,

Gang, yes, I wanted to use 3dANOVA and 3dMVM to build the same model and perform the same analysis. I want to explore the outcomes using both models. I followed your suggestions to build the 3dMVM and it worked perfectly!

Thanks so much for your quick and effective responses!