3dMVM: Error in if (all(abs(inData[ii, jj, kk, ]) < 1e-07)) fm <- NULL

AFNI version info (afni -ver): 20.3.00

Dear AFNI Experts,

I have a task fMRI dataset, the study design has 1 factor called "sex" with 2 levels (males and females), and every subject has a questionnaire score which is a continuous variable. Iran 3dMVM with the following code:

3dMVM -prefix results.nii -jobs 24  \
  -mask GM_mask.nii  \
  -bsVars  sex  \
  -qVars  score  \
  -num_glt 1  \
  -gltLabel 1 male_vs_female   -gltCode 1 'sex : 1*male -1*female score:'  \
  -dataTable  \
  Subj	sex	score	InputFile  \
  001	female	19	sub-01_task_reml.nii'[13]'  \
  002	male	23	sub-02_task_reml.nii'[13]'

To simplify, I only list two input files. After the code above, I got the following error:

***** End of data structure information *****
++++++++++++++++++++++++++++++++++++++++++++++++++++

Reading input files now...

Reading input files: Done!


Range of input data: [-84.344, 77.579]

If the program hangs here for more than, for example, half an hour,
kill the process because the model specification or the GLT coding
is likely inappropriate.

Error in if (all(abs(inData[ii, jj, kk, ]) < 1e-07)) fm <- NULL else { : 
  missing value where TRUE/FALSE needed
Execution halted

Any suggestions are welcome!

A couple of suggestions:

  • Update your AFNI to the latest version.

  • Is sex supposed to cause score to differ between the two groups? If so, centering within each group may be necessary for more accurate inference.

  • Since score is a between-individual variable, update your script from:

    -bsVars  sex  \
    

    to:

    -bsVars  'sex*score'  \
    

Gang Chen

Hi Gang,

Thank you so much for your reply! I didn't use qVarCenters option for score because the default is centering on mean, which is what I want. Please let me know if I understand incorrectly.

After I replaced the code -bsVars sex \
with -bsVars 'sex*score' \

I still got the same error message:

Error in if (all(abs(inData[ii, jj, kk, ]) < 1e-07)) fm <- NULL else { : 
  missing value where TRUE/FALSE needed
Execution halted

Chuan

Hi Gang,

I just tried the revised code with afni 23.3.09 which is the latest version my computer has, and it works! Thank you so much!

Chuan

Hi Chuan,

I'm glad the error has been resolved.

Regarding centering the variable score, you can manually perform the procedure and then input the values into the data table in 3dMVM.

Gang Chen