3dMVM error

Hi,

Please see the following code and error message, Please help me to fix it

cd /home/mcsa/Documents/t-test_data
3dMVM -prefix GLM.nii -jobs 4
-bsVars ‘DiagAgeGenderEduMMSEICV’
-SS_type 3
-num_glt 1
-gltLabel 1 CNvsCI -gltCode 1 'Diag : 1
CN -1*CI’
-dataTable
subj Diag Age Gender Edu MMSE ICV InputFile
CI_01 CI 44 M 12 17 1607 ./CC013EH.nii
CI_02 CI 60 M 8 23 1774 ./CC025NM.nii
CI_03 CI 66 F 12 23 1254 ./NI9046DW.nii
CI_04 CI 70 M 14 23 1630 ./NI9059GT.nii
CI_05 CI 77 M 15 24 1656 ./NI020R.nii
CI_06 CI 78 F 18 23 1330 ./NI9013SB.nii
CI_07 CI 50 F 12 18 1579 ./CC001JG.nii
CI_08 CI 70 F 14 20 1245 ./MRT73.nii
CI_09 CI 61 M 15 14 1597 ./CC023GD.nii
CI_10 CI 64 F 20 15 1561 ./MRT76.nii
CI_11 CI 66 M 14 11 1557 ./NI015R.nii
CN_01 CN 75 F 20 29 1513 ./NI9028NC.nii
CN_02 CN 75 M 16 29 1573 ./NI001.nii
CN_03 CN 74 M 20 29 1511 ./NI012.nii
CN_04 CN 73 F 13 29 1465 ./NI9103PS.nii
CN_05 CN 72 F 18 30 1521 ./NI014R.nii
CN_06 CN 72 M 15 30 1559 ./NI9065BT.nii
CN_07 CN 71 F 18 28 1639 ./NI008R.nii
CN_08 CN 71 F 15 30 1550 ./NI9039HG.nii
CN_09 CN 70 F 11 28 1443 ./NI9076MM.nii
CN_10 CN 70 F 18 30 1320 ./NI017.nii
CN_11 CN 70 F 13 28 1453 ./NI9126LL.nii

Attaching package: ‘afex’

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

lmer

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

There are a couple of issues with your 3dMVM script:

  1. The header for the subject column should be ‘Subj’, not 'subj.
  2. You need to declare some of the variables as quantitative:

-qVars “Age,Edu,MMSE,ICV” \

  1. Be aware of the centering issue: https://afni.nimh.nih.gov/pub/dist/doc/htmldoc/statistics/center.html
  2. Are you really interested in the interactions among those 4 quantitative variables?

Hi Gang,

Thank you for your help the code is running fine now.
Yes, I forget about the centering, I will insert the flag. however, is this model correct for correcting the effects of the covariates or I need to use another tool to do the GLM?

is this model correct for correcting the effects of the covariates or I need to use another tool to do the GLM?

The model is fine. You’re “controlling” (not “correcting”) the effects of the covariates.