3dLME incorrect level coding

Hi AFNI gurus,

I’m trying to complete a group analysis with 3dLME and I’m running into a “Incorrect level coding” error. I previously used 3dRegAna, but learned at AFNI bootcamp that this is now obsolete, and to examine a within-subject factor with a covariate I think I need to use 3dLME. Any advice on dealing with this error?

Design: 1 group, 1 within-subjects factor (“Face”) with 3 types (self, other, famous), and one quantitative variable (“Integration”)
Group analysis: I’m especially interested in what brain activity is related to the quantitative variable (glt 7 through 12).

Here’s my code:


   3dLME -prefix ANCOVA-fem-integration -jobs 2                                        							\
          -model  "Face+Integration"                                            							\
          -qVars "Integration"                                                  							\
          -qVarCenters "9.38"                                       									\
          -ranEff '~1'                                                  								\
          -SS_type 3                                                       								\
          -num_glt 12                                                       								\
          -gltLabel 1 'Self' -gltCode  1 'Face : 1*Self'    										\
          -gltLabel 2 'Other' -gltCode  2 'Face : 1*Other'    										\
          -gltLabel 3 'Famous' -gltCode  3 'Face : 1*Famous'    									\
          -gltLabel 4 'S-O' -gltCode  4 'Face : 1*Self - 1*Other'    									\
          -gltLabel 5 'F-O' -gltCode  5 'Face : 1*Famous - 1*Other'    									\
          -gltLabel 6 'S-F' -gltCode  6 'Face : 1*Self - 1*Famous'    									\
          -gltLabel 7 'S-IntEff' -gltCode  7 'Face : 1*Self Integration : '   		 						\
          -gltLabel 8 'S-IntEff-H' -gltCode  8 'Face : 1*Self Integration : 4.25'   		 					\
          -gltLabel 9 'S-IntEff-L' -gltCode  9 'Face : 1*Self Integration :-4.25'   		 					\
          -gltLabel 10 'S-O-IntEff' -gltCode  10 'Face : 1*Self - 1*Other Integration :'   		 				\
          -gltLabel 11 'S-O-IntEff-H' -gltCode  11 'Face : 1*Self - 1*Other Integration : 4.25'   		 			\
          -gltLabel 12 'S-O-IntEff-L' -gltCode  12 'Face : 1*Self - 1*Other Integration :-4.25'   		 			\
          -num_glf 1                                                       								\
          -glfLabel 1 'Face_Int' -glfCode  1 'Face : 1*Self & 1*Other & 1*Famous Integration :'						\
          -dataTable                                                       								\
          Subj  		                Face        Integration  Dx	    InputFile								\
          160427_NTD015_2	Famous		10	  DID	s160427_NTD015_2_3dD_fem_cond_betas+tlrc'[Famous_Female_times#0]'	\
          160506_NTD020_2	Famous		6	  DDNOS	s160506_NTD020_2_3dD_fem_cond_betas+tlrc'[Famous_Female_times#0]'	\
          160520_NTD021_2	Famous		13	  DID	s160520_NTD021_2_3dD_fem_cond_betas+tlrc'[Famous_Female_times#0]'	\
	  160527_NTD009_2	Famous		14	  DID	s160527_NTD009_2_3dD_fem_cond_betas+tlrc'[Famous_Female_times#0]'	\
	  160607_NTD028_2	Famous		14	  DID	s160607_NTD028_2_3dD_fem_cond_betas+tlrc'[Famous_Female_times#0]'	\
	  160617_NTD039_2	Famous		15	  DID	s160617_NTD039_2_3dD_fem_cond_betas+tlrc'[Famous_Female_times#0]'	\
	  160621_NTD010_2	Famous		14	  DID	s160621_NTD010_2_3dD_fem_cond_betas+tlrc'[Famous_Female_times#0]'	\
	  160629_NTD022_2	Famous		10	  DID	s160629_NTD022_2_3dD_fem_cond_betas+tlrc'[Famous_Female_times#0]'	\
	  160711_NTD035_2	Famous		7	  DID	s160711_NTD035_2_3dD_fem_cond_betas+tlrc'[Famous_Female_times#0]'	\
	  160718_NTD042_2	Famous		3	  DID	s160718_NTD042_2_3dD_fem_cond_betas+tlrc'[Famous_Female_times#0]'	\
	  160909_NTD016_2	Famous		5	  DID	s160909_NTD016_2_3dD_fem_cond_betas+tlrc'[Famous_Female_times#0]'	\
	  170301_NTD057_2	Famous		6	  DID	s170301_NTD057_2_3dD_fem_cond_betas+tlrc'[Famous_Female_times#0]'	\
	  170405_NTD053_2	Famous		5	  DID	s170405_NTD053_2_3dD_fem_cond_betas+tlrc'[Famous_Female_times#0]'	\
          160427_NTD015_2	Other		10	  DID	s160427_NTD015_2_3dD_fem_cond_betas+tlrc'[Other_Female_times#0]'	\
          160506_NTD020_2	Other		6	  DDNOS	s160506_NTD020_2_3dD_fem_cond_betas+tlrc'[Other_Female_times#0]'	\
          160520_NTD021_2	Other		13	  DID	s160520_NTD021_2_3dD_fem_cond_betas+tlrc'[Other_Female_times#0]'	\
	  160527_NTD009_2	Other		14	  DID	s160527_NTD009_2_3dD_fem_cond_betas+tlrc'[Other_Female_times#0]'	\
	  160607_NTD028_2	Other		14	  DID	s160607_NTD028_2_3dD_fem_cond_betas+tlrc'[Other_Female_times#0]'	\
	  160617_NTD039_2	Other		15	  DID	s160617_NTD039_2_3dD_fem_cond_betas+tlrc'[Other_Female_times#0]'	\
	  160621_NTD010_2	Other		14	  DID	s160621_NTD010_2_3dD_fem_cond_betas+tlrc'[Other_Female_times#0]'	\
	  160629_NTD022_2	Other		10	  DID	s160629_NTD022_2_3dD_fem_cond_betas+tlrc'[Other_Female_times#0]'	\
	  160711_NTD035_2	Other		7	  DID	s160711_NTD035_2_3dD_fem_cond_betas+tlrc'[Other_Female_times#0]'	\
	  160718_NTD042_2	Other		3	  DID	s160718_NTD042_2_3dD_fem_cond_betas+tlrc'[Other_Female_times#0]'	\
	  160909_NTD016_2	Other		5	  DID	s160909_NTD016_2_3dD_fem_cond_betas+tlrc'[Other_Female_times#0]'	\
	  170301_NTD057_2	Other		6	  DID	s170301_NTD057_2_3dD_fem_cond_betas+tlrc'[Other_Female_times#0]'	\
	  170405_NTD053_2	Other		5	  DID	s170405_NTD053_2_3dD_fem_cond_betas+tlrc'[Other_Female_times#0]'	\
          160427_NTD015_2	Self		10	  DID	s160427_NTD015_2_3dD_fem_cond_betas+tlrc'[Self_Female_times#0]'	\
          160506_NTD020_2	Self		6	  DDNOS	s160506_NTD020_2_3dD_fem_cond_betas+tlrc'[Self_Female_times#0]'	\
          160520_NTD021_2	Self		13	  DID	s160520_NTD021_2_3dD_fem_cond_betas+tlrc'[Self_Female_times#0]'	\
	  160527_NTD009_2	Self		14	  DID	s160527_NTD009_2_3dD_fem_cond_betas+tlrc'[Self_Female_times#0]'	\
	  160607_NTD028_2	Self		14	  DID	s160607_NTD028_2_3dD_fem_cond_betas+tlrc'[Self_Female_times#0]'	\
	  160617_NTD039_2	Self		15	  DID	s160617_NTD039_2_3dD_fem_cond_betas+tlrc'[Self_Female_times#0]'	\
	  160621_NTD010_2	Self		14	  DID	s160621_NTD010_2_3dD_fem_cond_betas+tlrc'[Self_Female_times#0]'	\
	  160629_NTD022_2	Self		10	  DID	s160629_NTD022_2_3dD_fem_cond_betas+tlrc'[Self_Female_times#0]'	\
	  160711_NTD035_2	Self		7	  DID	s160711_NTD035_2_3dD_fem_cond_betas+tlrc'[Self_Female_times#0]'	\
	  160718_NTD042_2	Self		3	  DID	s160718_NTD042_2_3dD_fem_cond_betas+tlrc'[Self_Female_times#0]'	\
	  160909_NTD016_2	Self		5	  DID	s160909_NTD016_2_3dD_fem_cond_betas+tlrc'[Self_Female_times#0]'	\
	  170301_NTD057_2	Self		6	  DID	s170301_NTD057_2_3dD_fem_cond_betas+tlrc'[Self_Female_times#0]'	\
	  170405_NTD053_2	Self		5	  DID	s170405_NTD053_2_3dD_fem_cond_betas+tlrc'[Self_Female_times#0]'

Here is the error:
** Error:
Incorrect level coding in variable Face : 1

Thank you for your time and help!
Best,
Lauren

Luren,

The reason you got that error message is that the model you specified is not consistent with one of the tests you requested. In the model specification, you assumed that there is no interaction between Face and Integration. Under that assumption, the following test does not make sense:

      -gltLabel 10 'S-O-IntEff' -gltCode  10 'Face : 1*Self - 1*Other Integration :'   		 				\

To be able to perform the above test, you need

      -model  "Face*Integration"                                            							\

However, I would use 3dMVM with the following for its simplicity:

3dMVM -prefix ANCOVA-fem-integration -jobs 2
-bsVars “Integration”
-wsVars “Face”
-qVars “Integration”
-qVarCenters “9.38” \

Hi Gang,

Thank you so much! I tried setting it up with MVM, but I now get the following error:

** Error:
Inappropriate coding in test No.4!

Here is the script:


   3dMVM -prefix ANCOVA-fem-integration -jobs 2                                        							\
          -bsVars  "Integration"                                            								\
          -wsVars "Face"                                                  								\
          -qVars "Integration"                                                  							\
          -qVarCenters "9.38"                                       									\
          -SS_type 3                                                       								\
	  -GES																\
	  -wsE2																\
          -num_glt 12                                                       								\
          -gltLabel 1 'Self' -gltCode 1 'Face : 1*Self'    										\
          -gltLabel 2 'Other' -gltCode 2 'Face : 1*Other'    										\
          -gltLabel 3 'Famous' -gltCode 3 'Face : 1*Famous'    										\
	  -gltLabel 4 'S-O' -gltCode 4 'Face : 1*Self - 1*Other'    									\
          -gltLabel 5 'F-O' -gltCode 5 'Face : 1*Famous - 1*Other'    									\
          -gltLabel 6 'S-F' -gltCode 6 'Face : 1*Self - 1*Famous'    									\
          -gltLabel 7 'S-IntEff' -gltCode 7 'Face : 1*Self Integration : '   		 						\
          -gltLabel 8 'S-IntEff-H' -gltCode 8 'Face : 1*Self Integration : 4.25'   		 					\
          -gltLabel 9 'S-IntEff-L' -gltCode 9 'Face : 1*Self Integration :-4.25'   		 					\
          -gltLabel 10 'S-O-IntEff' -gltCode 10 'Face : 1*Self - 1*Other Integration :'   		 				\
          -gltLabel 11 'S-O-IntEff-H' -gltCode 11 'Face : 1*Self - 1*Other Integration : 4.25'   		 			\
          -gltLabel 12 'S-O-IntEff-L' -gltCode 12 'Face : 1*Self - 1*Other Integration :-4.25'   		 			\
          -dataTable                                                       								\
          Subj  		Face        Integration	Dx	InputFile								\
          160427_NTD015_2	Famous		10	DID	s160427_NTD015_2_3dD_fem_cond_betas+tlrc'[Famous_Female_times#0]'	\
          160506_NTD020_2	Famous		6	DDNOS	s160506_NTD020_2_3dD_fem_cond_betas+tlrc'[Famous_Female_times#0]'	\
          160520_NTD021_2	Famous		13	DID	s160520_NTD021_2_3dD_fem_cond_betas+tlrc'[Famous_Female_times#0]'	\
	  160527_NTD009_2	Famous		14	DID	s160527_NTD009_2_3dD_fem_cond_betas+tlrc'[Famous_Female_times#0]'	\
	  160607_NTD028_2	Famous		14	DID	s160607_NTD028_2_3dD_fem_cond_betas+tlrc'[Famous_Female_times#0]'	\
	  160617_NTD039_2	Famous		15	DID	s160617_NTD039_2_3dD_fem_cond_betas+tlrc'[Famous_Female_times#0]'	\
	  160621_NTD010_2	Famous		14	DID	s160621_NTD010_2_3dD_fem_cond_betas+tlrc'[Famous_Female_times#0]'	\
	  160629_NTD022_2	Famous		10	DID	s160629_NTD022_2_3dD_fem_cond_betas+tlrc'[Famous_Female_times#0]'	\
	  160711_NTD035_2	Famous		7	DID	s160711_NTD035_2_3dD_fem_cond_betas+tlrc'[Famous_Female_times#0]'	\
	  160718_NTD042_2	Famous		3	DID	s160718_NTD042_2_3dD_fem_cond_betas+tlrc'[Famous_Female_times#0]'	\
	  160909_NTD016_2	Famous		5	DID	s160909_NTD016_2_3dD_fem_cond_betas+tlrc'[Famous_Female_times#0]'	\
	  170301_NTD057_2	Famous		6	DID	s170301_NTD057_2_3dD_fem_cond_betas+tlrc'[Famous_Female_times#0]'	\
	  170405_NTD053_2	Famous		5	DID	s170405_NTD053_2_3dD_fem_cond_betas+tlrc'[Famous_Female_times#0]'	\
          160427_NTD015_2	Other		10	DID	s160427_NTD015_2_3dD_fem_cond_betas+tlrc'[Other_Female_times#0]'	\
          160506_NTD020_2	Other		6	DDNOS	s160506_NTD020_2_3dD_fem_cond_betas+tlrc'[Other_Female_times#0]'	\
          160520_NTD021_2	Other		13	DID	s160520_NTD021_2_3dD_fem_cond_betas+tlrc'[Other_Female_times#0]'	\
	  160527_NTD009_2	Other		14	DID	s160527_NTD009_2_3dD_fem_cond_betas+tlrc'[Other_Female_times#0]'	\
	  160607_NTD028_2	Other		14	DID	s160607_NTD028_2_3dD_fem_cond_betas+tlrc'[Other_Female_times#0]'	\
	  160617_NTD039_2	Other		15	DID	s160617_NTD039_2_3dD_fem_cond_betas+tlrc'[Other_Female_times#0]'	\
	  160621_NTD010_2	Other		14	DID	s160621_NTD010_2_3dD_fem_cond_betas+tlrc'[Other_Female_times#0]'	\
	  160629_NTD022_2	Other		10	DID	s160629_NTD022_2_3dD_fem_cond_betas+tlrc'[Other_Female_times#0]'	\
	  160711_NTD035_2	Other		7	DID	s160711_NTD035_2_3dD_fem_cond_betas+tlrc'[Other_Female_times#0]'	\
	  160718_NTD042_2	Other		3	DID	s160718_NTD042_2_3dD_fem_cond_betas+tlrc'[Other_Female_times#0]'	\
	  160909_NTD016_2	Other		5	DID	s160909_NTD016_2_3dD_fem_cond_betas+tlrc'[Other_Female_times#0]'	\
	  170301_NTD057_2	Other		6	DID	s170301_NTD057_2_3dD_fem_cond_betas+tlrc'[Other_Female_times#0]'	\
	  170405_NTD053_2	Other		5	DID	s170405_NTD053_2_3dD_fem_cond_betas+tlrc'[Other_Female_times#0]'	\
          160427_NTD015_2	Self		10	DID	s160427_NTD015_2_3dD_fem_cond_betas+tlrc'[Self_Female_times#0]'	\
          160506_NTD020_2	Self		6	DDNOS	s160506_NTD020_2_3dD_fem_cond_betas+tlrc'[Self_Female_times#0]'	\
          160520_NTD021_2	Self		13	DID	s160520_NTD021_2_3dD_fem_cond_betas+tlrc'[Self_Female_times#0]'	\
	  160527_NTD009_2	Self		14	DID	s160527_NTD009_2_3dD_fem_cond_betas+tlrc'[Self_Female_times#0]'	\
	  160607_NTD028_2	Self		14	DID	s160607_NTD028_2_3dD_fem_cond_betas+tlrc'[Self_Female_times#0]'	\
	  160617_NTD039_2	Self		15	DID	s160617_NTD039_2_3dD_fem_cond_betas+tlrc'[Self_Female_times#0]'	\
	  160621_NTD010_2	Self		14	DID	s160621_NTD010_2_3dD_fem_cond_betas+tlrc'[Self_Female_times#0]'	\
	  160629_NTD022_2	Self		10	DID	s160629_NTD022_2_3dD_fem_cond_betas+tlrc'[Self_Female_times#0]'	\
	  160711_NTD035_2	Self		7	DID	s160711_NTD035_2_3dD_fem_cond_betas+tlrc'[Self_Female_times#0]'	\
	  160718_NTD042_2	Self		3	DID	s160718_NTD042_2_3dD_fem_cond_betas+tlrc'[Self_Female_times#0]'	\
	  160909_NTD016_2	Self		5	DID	s160909_NTD016_2_3dD_fem_cond_betas+tlrc'[Self_Female_times#0]'	\
	  170301_NTD057_2	Self		6	DID	s170301_NTD057_2_3dD_fem_cond_betas+tlrc'[Self_Female_times#0]'	\
	  170405_NTD053_2	Self		5	DID	s170405_NTD053_2_3dD_fem_cond_betas+tlrc'[Self_Female_times#0]'

Thanks for your time!
Best,
Lauren

3dMVM and 3dLME are somewhat finicky about the syntax. The following lines are troubling:

  -gltLabel 4 'S-O' -gltCode 4 'Face : 1*Self - 1*Other'    									\
      -gltLabel 5 'F-O' -gltCode 5 'Face : 1*Famous - 1*Other'    									\
      -gltLabel 6 'S-F' -gltCode 6 'Face : 1*Self - 1*Famous'    									\


-gltLabel 10 ‘S-O-IntEff’ -gltCode 10 ‘Face : 1Self - 1Other Integration :’
-gltLabel 11 ‘S-O-IntEff-H’ -gltCode 11 ‘Face : 1Self - 1Other Integration : 4.25’
-gltLabel 12 ‘S-O-IntEff-L’ -gltCode 12 ‘Face : 1Self - 1Other Integration :-4.25’ \

For the negative weights, you can’t separate the negative sign from the number. In addition, you need to add a space between the colon (:slight_smile: and the value for the covariate for the following lines:

       -gltLabel 9 'S-IntEff-L' -gltCode 9 'Face : 1*Self Integration :-4.25'   		 					\


-gltLabel 12 ‘S-O-IntEff-L’ -gltCode 12 ‘Face : 1Self - 1Other Integration :-4.25’ \