3dMVM error

Hello, afni experts

When I used 3dMVM to conduct a ANOVA analysis, an error message showed up:

[1] “Great, test run passed at voxel (55, 42, 31)!”
Error: $ operator is invalid for atomic vectors
Execution halted

My intention is to calculate the main effect of sleep stage (Wakefullness, N2, N3). As some sleep stage did not showed up in some subjects, we enlarge the data sample by combining two sleep subgroup (scan1,scan2), and considered the sleep stage as a between-subject variance. The main part of my 3dMVM script is attached here:

3dMVM -prefix MVM.maskHarv.noN1 -jobs 4
-bsVars ‘sleepstage+scanner’
-mask $maskdir/Harv_mask5_nobrainstem_grey_resam2.nii
-SS_type 3
-num_glf 1
-glfLabel 1 sleepstage -glfCode 1 ‘sleepstage : 1W -1N2 & 1W -1N3 & 1N2 -1N3’
Subj scanner sleepstage InputFile
ms7w scan1 W sleep_montreal.W.s7.nii
ms9w scan1 W sleep_montreal.W.s9.nii
ms15w scan1 W sleep_montreal.W.s15.nii
ws2w scan2 W sleep_western.W.s2.nii
ws5w scan2 W sleep_western.W.s5.nii
ms7n2 scan1 N2 sleep_montreal.N2.s7.nii
ms8n2 scan1 N2 sleep_montreal.N2.s8.nii
ms9n2 scan1 N2 sleep_montreal.N2.s9.nii
ms15n2 scan1 N2 sleep_montreal.N2.s15.nii
ws35n2 scan2 N2 sleep_western.N2.s35.nii
ws36n2 scan2 N2 sleep_western.N2.s36.nii
ws42n2 scan2 N2 sleep_western.N2.s42.nii
ws43n2 scan2 N2 sleep_western.N2.s43.nii
ms7n3 scan1 N3 sleep_montreal.N3.s7.nii
ms15n3 scan1 N3 sleep_montreal.N3.s15.nii
ms16n3 scan1 N3 sleep_montreal.N3.s16.nii
ms53n3 scan1 N3 sleep_montreal.N3.s53.nii
ws33n3 scan2 N3 coactmap.sleep_western.N3.s33.nii
ws34n3 scan2 N3 coactmap.sleep_western.N3.s34.nii
ws36n3 scan2 N3 coactmap.sleep_western.N3.s36.nii
ws41n3 scan2 N3 coactmap.sleep_western.N3.s41.nii

Check your AFNI version:

afni -ver

If you don’t have the most recent version, update your AFNI:

@update.afni.binaries -defaults -do_extras

Also, you don’t have to add this line:

-glfLabel 1 sleepstage -glfCode 1 ‘sleepstage : 1W -1N2 & 1W -1N3 & 1N2 -1N3’ \

3dMVM automatically provides the statistics for all the main effects and interactions.

If the problem remains after the update, I may have to ask you to share the data so that I could take a close look.