3dMVM error

Dear AFNI users,

I have run into errors for running 3dMVM,

Loading required package: afex
Loading required package: lme4
Loading required package: Matrix
Loading required package: emmeans

Welcome to afex. For support visit: http://afex.singmann.science/

  • Functions for ANOVAs: aov_car(), aov_ez(), and aov_4()
  • Methods for calculating p-values with mixed(): ‘KR’, ‘S’, ‘LRT’, and ‘PB’
  • ‘afex_aov’ and ‘mixed’ objects can be passed to emmeans() for follow-up tests
  • Get and set global package options with: afex_options()
  • Set orthogonal sum-to-zero contrasts globally: set_sum_contrasts()
  • For example analyses see: browseVignettes(“afex”)

Attaching package: ‘afex’

The following object is masked from ‘package:lme4’:


Loading required package: phia
Loading required package: car
Error in $<-.data.frame(*tmp*, Subj, value = integer(0)) :
replacement has 0 rows, data has 532
Calls: $<- → $<-.data.frame
Execution halted

The command lines i used are

3dMVM -prefix TBI_PVSinteraction
-bsVars ‘TBIPVS+Gender+Age’
-qVars ‘Age’
-num_glt 7
-gltLabel 1 TBI_PVSpresent -gltCode 1 'TBI : 1
TBI PVS : 1PVS_present’
-gltLabel 2 TBI_PVSabsent -gltCode 2 'TBI : 1
TBI PVS : 1PVS_absent’
-gltLabel 3 nonTBI_PVSpresent -gltCode 3 'TBI : 1
nonTBI PVS : 1PVS_present’
-gltLabel 4 nonTBI_PVSabsent -gltCode 4 'TBI : 1
nonTBI PVS : 1PVS_absent’
-gltLabel 5 TBI_by_PVS -gltCode 5 'TBI : 1
TBI -1nonTBI PVS : 1PVS_present -1PVS_absent’
-gltLabel 6 Gender_TBI_interaction -gltCode 6 'TBI : 1
TBI -1nonTBI Gender : 1M -1F’
-gltLabel 7 Gender_PVS_interaction -gltCode 7 'PVS : 1
PVS_present -1PVS_absent Gender : 1M -1*F’
ID TBI PVS Gender Age InputFile
NCNC0062 TBI PVS_present F 44 /data/NEURO2/ping/SWI/QSM/NCNC0062/nonlinear_t2map_inQSM_MNI_sgima2.1233226_5mm_smooth.nii.gz .
NCNC9074 TBI PVS_present M 42 /data/NEURO2/ping/SWI/QSM/NCNC9074/nonlinear_t2map_inQSM_MNI_sgima2.1233226_5mm_smooth.nii.gz \

Change the header “ID” under -dataTable to “Subj”.

Hi Gang,

Thanks for the reply.
3dMVM ran after changing “ID” to “Subj”, however, it crashed early with the following error:

** Error:
Quitting due to model test failure…
Warning message:
NAs introduced by coercion

Thank you,


Any suggestions for fixing 3dMVM error? Thanks.

** Error:
Quitting due to model test failure…
Warning message:
NAs introduced by coercion

Did you get the email I sent to you yesterday? Could you paste the whole message from the terminal when you run the 3dMVM script?