3dMVM multiple covariates question

Hello!

I am getting this error with 3dMVM. The issue seems to be related to the two quantitative covariates (age and anxiety score). According to other posts with this same error, if I remove Anxiety and Age from the gltCode lines it should resolve. However, I am unsure how to specify multiple analyses with and without these covariates if I simply remove them from the gltCode lines. In other words, if the way to resolve the error is just having glt lines 1 through 8 (no qVars in gltCode), how will I get the other anaylses I’m looking for in the remaining lines?

I have also copied the error below my code.


3dMVM 																											                                \
 -prefix 3dMVM.FB.Doors.Anxiety.012720																	                                        \
 -jobs 11																										                                \
 -wsVars 'Task*Outcome'																							                                \
 -bsVars 'Age*Anxiety'																									                        \
 -qVars 'Age,Anxiety'																									                        \
 -num_glt 32																									                                \
-gltLabel 1 DislikeGames 						            -gltCode 1 'Task : +1*DislikeGames'								                    \
-gltLabel 2 DislikeGames_Lose 					            -gltCode 2 'Task : +1*DislikeGames Outcome : +1*Lose'			                    \
-gltLabel 3 DislikeGames_Win 					            -gltCode 3 'Task : +1*DislikeGames Outcome : +1*Win'			                    \
-gltLabel 4 DislikeGames_Win.V.Lose				            -gltCode 4 'Task : +1*DislikeGames Outcome : +1*Win -1*Lose'	                    \
-gltLabel 5 LikeGames 							            -gltCode 5 'Task : +1*LikeGames'								                    \
-gltLabel 6 LikeGames_Lose 						            -gltCode 6 'Task : +1*LikeGames Outcome : +1*Lose'				                    \
-gltLabel 7 LikeGames_Win 						            -gltCode 7 'Task : +1*LikeGames Outcome : +1*Win'				                    \
-gltLabel 8 LikeGames_Win.V.Lose 				            -gltCode 8 'Task : +1*LikeGames Outcome : +1*Win -1*Lose'		                    \
-gltLabel 9 DislikeGames_Age 					            -gltCode 9 'Task : +1*DislikeGames Age : '						                    \
-gltLabel 10 DislikeGames_Lose_Age 				            -gltCode 10 'Task : +1*DislikeGames Outcome : +1*Lose Age : '			            \
-gltLabel 11 DislikeGames_Win_Age 				            -gltCode 11 'Task : +1*DislikeGames Outcome : +1*Win Age : '			            \
-gltLabel 12 DislikeGames_Win.V.Lose_Age		                    -gltCode 12 'Task : +1*DislikeGames Outcome : +1*Win -1*Lose Age : '	            \
-gltLabel 13 LikeGames_Age 						            -gltCode 13 'Task : +1*LikeGames Age : '								            \
-gltLabel 14 LikeGames_Lose_Age 				            -gltCode 14 'Task : +1*LikeGames Outcome : +1*Lose Age : '				            \
-gltLabel 15 LikeGames_Win_Age 					    -gltCode 15 'Task : +1*LikeGames Outcome : +1*Win Age : '				            \
-gltLabel 16 LikeGames_Win.V.Lose_Age 			            -gltCode 16 'Task : +1*LikeGames Outcome : +1*Win -1*Lose Age : '		            \
-gltLabel 17 DislikeGames_Anxiety  			                    -gltCode 17 'Task : +1*DislikeGames Anxiety : '						                \
-gltLabel 18 DislikeGames_Lose_Anxiety 				    -gltCode 18 'Task : +1*DislikeGames Outcome : +1*Lose Anxiety : '			        \
-gltLabel 19 DislikeGames_Win_Anxiety 				    -gltCode 19 'Task : +1*DislikeGames Outcome : +1*Win Anxiety : '			        \
-gltLabel 20 DislikeGames_Win.V.Lose_Anxiety		            -gltCode 20 'Task : +1*DislikeGames Outcome : +1*Win -1*Lose Anxiety : '	        \
-gltLabel 21 LikeGames_Anxiety 						    -gltCode 21 'Task : +1*LikeGames Anxiety : '								        \
-gltLabel 22 LikeGames_Lose_Anxiety 				            -gltCode 22 'Task : +1*LikeGames Outcome : +1*Lose Anxiety : '				        \
-gltLabel 23 LikeGames_Win_Anxiety 					    -gltCode 23 'Task : +1*LikeGames Outcome : +1*Win Anxiety : '				        \
-gltLabel 24 LikeGames_Win.V.Lose_Anxiety 			    -gltCode 24 'Task : +1*LikeGames Outcome : +1*Win -1*Lose Anxiety : '		        \
-gltLabel 25 DislikeGames_Age_Anxiety 			            -gltCode 25 'Task : +1*DislikeGames Age : Anxiety : '						        \
-gltLabel 26 DislikeGames_Lose_Age_Anxiety 			    -gltCode 26 'Task : +1*DislikeGames Outcome : +1*Lose Age : Anxiety : '			    \
-gltLabel 27 DislikeGames_Win_Age_Anxiety 			    -gltCode 27 'Task : +1*DislikeGames Outcome : +1*Win Age : Anxiety : '			    \
-gltLabel 28 DislikeGames_Win.V.Lose_Age_Anxiety		    -gltCode 28 'Task : +1*DislikeGames Outcome : +1*Win -1*Lose Age : Anxiety : '	    \
-gltLabel 29 LikeGames_Age_Anxiety 					    -gltCode 29 'Task : +1*LikeGames Age : Anxiety : '								    \
-gltLabel 30 LikeGames_Lose_Age_Anxiety 				    -gltCode 30 'Task : +1*LikeGames Outcome : +1*Lose Age : Anxiety : '				\
-gltLabel 31 LikeGames_Win_Age_Anxiety 				    -gltCode 31 'Task : +1*LikeGames Outcome : +1*Win Age : Anxiety : '				    \
-gltLabel 32 LikeGames_Win.V.Lose_Age_Anxiety 		    -gltCode 32 'Task : +1*LikeGames Outcome : +1*Win -1*Lose Age : Anxiety : '		    \
-dataTable																		                                                                \
Subj        Task		    Age         Outcome	    Anxiety       InputFile				     						                                            \
etc. 

ERROR


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

Warning messages:
1: In if (is.na(code[[n]][QVpos + 2])) { :
  the condition has length > 1 and only the first element will be used
2: In if (QVpos == 1) outList[[1]][[n]] <- NA else outList[[1]][[n]] <- glfConstr(code[[n]][-(QVpos:(QVpos +  :
  the condition has length > 1 and only the first element will be used
3: In QVpos:(QVpos + 2) :
  numerical expression has 2 elements: only the first used
4: In QVpos:(QVpos + 2) :
  numerical expression has 2 elements: only the first used
5: In gl_Constr(lop$num_glt, lop$gltCode, lop) :
  NAs introduced by coercion

Thank you in advance for any guidance!

Best,
Camille

All those specifications that involve both Age and Anxiety at the same time don’t make sense. To be clear, notations in gltCode such as “Anxiety :” are meant to make inferences about the slope effect. If you want to control a quantitative variable at its center value, do not include the variable in the specification.

Thank you so much!

We had included both Age and Anxiety at the same time to for a Task x Outcome x Age x Anxiety interaction. If I delete the erroneous lines where I have both Age and Anxiety in the gltCode, how do I analyze the full interaction - one that includes interactive effects of age and anxiety (using continuous measures): Task x Outcome x Age x Anxiety?

Thank you again!
Camille

Camille,

Since both Age and Anxiety are quantitative variables, to model their interaction properly, do the following:

  1. properly center Age and Anxiety;
  2. create a new variable called, for example, ‘AA’, that is the product of centered Age and Anxiety;
  3. add ‘AA’ to the data table;
  4. change the following lines

-bsVars ‘Age*Anxiety’ \
-qVars ‘Age,Anxiety’ \

to

-bsVars ‘Age+Anxiety+AA’ \
-qVars ‘Age,Anxiety,AA’
–qVarCenters ‘0,0,0’ \

  1. formulate appropriate contrast through -gltCode