3dMVM output confusing

AFNI version info (afni -ver):

I just tried to run this 3dMVM script. Both Condition Briks (Condition and Condition Z) look identitical to the Condition_by_Slope Brik file in the output. What am I doing wrong?

3dMVM -prefix EndvsBoundINTSlope -jobs 16 \
-wsVars 'Condition' \
-qVars 'Slope' \
-num_glf 3 \
-glfLabel 1 Slope -glfCode 1 'Slope' \
-glfLabel 2 Condition -glfCode 2 'Condition : 1*VOT -1*VOW' \
-glfLabel 3 Condition_by_Slope -glfCode 3 'Condition : 1*VOT -1*VOW Slope :' \
-dataTable  \
Subj Slope Condition InputFile \
MAT001	3.03	VOT	/Users/saraguediche/Desktop/avgSlopes/VOTEndvsBound_MAT001+tlrc. \
MAT001	0.82	VOW	/Users/saraguediche/Desktop/avgSlopes/VOWEndvsBound_MAT001+tlrc. \
MAT002	2.67	VOT	/Users/saraguediche/Desktop/avgSlopes/VOTEndvsBound_MAT002+tlrc. \
MAT002	0.24	VOW	/Users/saraguediche/Desktop/avgSlopes/VOWEndvsBound_MAT002+tlrc. \
MAT003	2.67	VOT	/Users/saraguediche/Desktop/avgSlopes/VOTEndvsBound_MAT003+tlrc. \
MAT003	0.94	VOW	/Users/saraguediche/Desktop/avgSlopes/VOWEndvsBound_MAT003+tlrc. \
MAT005	3.59	VOT	/Users/saraguediche/Desktop/avgSlopes/VOTEndvsBound_MAT005+tlrc. \
MAT005	0.64	VOW	/Users/saraguediche/Desktop/avgSlopes/VOWEndvsBound_MAT005+tlrc. \
MAT006	3.00	VOT	/Users/saraguediche/Desktop/avgSlopes/VOTEndvsBound_MAT006+tlrc. \
MAT006	0.08	VOW	/Users/saraguediche/Desktop/avgSlopes/VOWEndvsBound_MAT006+tlrc. \
MAT007	4.11	VOT	/Users/saraguediche/Desktop/avgSlopes/VOTEndvsBound_MAT007+tlrc. \
MAT007	1.13	VOW	/Users/saraguediche/Desktop/avgSlopes/VOWEndvsBound_MAT007+tlrc. \
MAT008	3.86	VOT	/Users/saraguediche/Desktop/avgSlopes/VOTEndvsBound_MAT008+tlrc. \
MAT008	0.57	VOW	/Users/saraguediche/Desktop/avgSlopes/VOWEndvsBound_MAT008+tlrc. \
MAT009	3.71	VOT	/Users/saraguediche/Desktop/avgSlopes/VOTEndvsBound_MAT009+tlrc. \
MAT009	0.66	VOW	/Users/saraguediche/Desktop/avgSlopes/VOWEndvsBound_MAT009+tlrc. \
MAT010	3.08	VOT	/Users/saraguediche/Desktop/avgSlopes/VOTEndvsBound_MAT010+tlrc. \
MAT010	0.70	VOW	/Users/saraguediche/Desktop/avgSlopes/VOWEndvsBound_MAT010+tlrc. \
MAT011	3.49	VOT	/Users/saraguediche/Desktop/avgSlopes/VOTEndvsBound_MAT011+tlrc. \
MAT011	0.92	VOW	/Users/saraguediche/Desktop/avgSlopes/VOWEndvsBound_MAT011+tlrc. \
MAT012	2.26	VOT	/Users/saraguediche/Desktop/avgSlopes/VOTEndvsBound_MAT012+tlrc. \
MAT012	0.71	VOW	/Users/saraguediche/Desktop/avgSlopes/VOWEndvsBound_MAT012+tlrc. \
MAT013	3.05	VOT	/Users/saraguediche/Desktop/avgSlopes/VOTEndvsBound_MAT013+tlrc. \
MAT013	0.59	VOW	/Users/saraguediche/Desktop/avgSlopes/VOWEndvsBound_MAT013+tlrc. \
MAT014	3.90	VOT	/Users/saraguediche/Desktop/avgSlopes/VOTEndvsBound_MAT014+tlrc. \
MAT014	1.08	VOW	/Users/saraguediche/Desktop/avgSlopes/VOWEndvsBound_MAT014+tlrc. \
MAT017	2.31	VOT	/Users/saraguediche/Desktop/avgSlopes/VOTEndvsBound_MAT017+tlrc. \
MAT017	0.95	VOW	/Users/saraguediche/Desktop/avgSlopes/VOWEndvsBound_MAT017+tlrc. \
MAT018	2.98	VOT	/Users/saraguediche/Desktop/avgSlopes/VOTEndvsBound_MAT018+tlrc. \
MAT018	0.97	VOW	/Users/saraguediche/Desktop/avgSlopes/VOWEndvsBound_MAT018+tlrc. \
MAT019	3.62	VOT	/Users/saraguediche/Desktop/avgSlopes/VOTEndvsBound_MAT019+tlrc. \
MAT019	0.78	VOW	/Users/saraguediche/Desktop/avgSlopes/VOWEndvsBound_MAT019+tlrc. \
MAT020	4.60	VOT	/Users/saraguediche/Desktop/avgSlopes/VOTEndvsBound_MAT020+tlrc. \
MAT020	0.65	VOW	/Users/saraguediche/Desktop/avgSlopes/VOWEndvsBound_MAT020+tlrc. \
MAT021	3.13	VOT	/Users/saraguediche/Desktop/avgSlopes/VOTEndvsBound_MAT021+tlrc. \
MAT021	0.04	VOW	/Users/saraguediche/Desktop/avgSlopes/VOWEndvsBound_MAT021+tlrc. \
MAT022	3.90	VOT	/Users/saraguediche/Desktop/avgSlopes/VOTEndvsBound_MAT022+tlrc. \
MAT022	0.74	VOW	/Users/saraguediche/Desktop/avgSlopes/VOWEndvsBound_MAT022+tlrc. \
MAT023	4.15	VOT	/Users/saraguediche/Desktop/avgSlopes/VOTEndvsBound_MAT023+tlrc. \
MAT023	0.77	VOW	/Users/saraguediche/Desktop/avgSlopes/VOWEndvsBound_MAT023+tlrc. \
MAT024	3.56	VOT	/Users/saraguediche/Desktop/avgSlopes/VOTEndvsBound_MAT024+tlrc. \
MAT024	0.76	VOW	/Users/saraguediche/Desktop/avgSlopes/VOWEndvsBound_MAT024+tlrc. \
MAT025	3.94	VOT	/Users/saraguediche/Desktop/avgSlopes/VOTEndvsBound_MAT025+tlrc. \
MAT025	1.25	VOW	/Users/saraguediche/Desktop/avgSlopes/VOWEndvsBound_MAT025+tlrc. \
MAT026	3.31	VOT	/Users/saraguediche/Desktop/avgSlopes/VOTEndvsBound_MAT026+tlrc. \
MAT026	0.26	VOW	/Users/saraguediche/Desktop/avgSlopes/VOWEndvsBound_MAT026+tlrc. \
MAT029	3.96	VOT	/Users/saraguediche/Desktop/avgSlopes/VOTEndvsBound_MAT029+tlrc. \
MAT029	0.69	VOW	/Users/saraguediche/Desktop/avgSlopes/VOWEndvsBound_MAT029+tlrc. \
MAT032	2.68	VOT	/Users/saraguediche/Desktop/avgSlopes/VOTEndvsBound_MAT032+tlrc. \
MAT032	0.80	VOW	/Users/saraguediche/Desktop/avgSlopes/VOWEndvsBound_MAT032+tlrc. \
MAT035	3.83	VOT	/Users/saraguediche/Desktop/avgSlopes/VOTEndvsBound_MAT035+tlrc. \
MAT035	0.19	VOW	/Users/saraguediche/Desktop/avgSlopes/VOWEndvsBound_MAT035+tlrc. \
MAT040	3.29	VOT	/Users/saraguediche/Desktop/avgSlopes/VOTEndvsBound_MAT040+tlrc. \
MAT040	0.84	VOW	/Users/saraguediche/Desktop/avgSlopes/VOWEndvsBound_MAT040+tlrc. \
MAT041	3.36	VOT	/Users/saraguediche/Desktop/avgSlopes/VOTEndvsBound_MAT041+tlrc. \
MAT041	0.99	VOW	/Users/saraguediche/Desktop/avgSlopes/VOWEndvsBound_MAT041+tlrc. \
MAT042	4.25	VOT	/Users/saraguediche/Desktop/avgSlopes/VOTEndvsBound_MAT042+tlrc. \
MAT042	1.08	VOW	/Users/saraguediche/Desktop/avgSlopes/VOWEndvsBound_MAT042+tlrc. \
MAT043	4.38	VOT	/Users/saraguediche/Desktop/avgSlopes/VOTEndvsBound_MAT043+tlrc. \
MAT043	1.09	VOW	/Users/saraguediche/Desktop/avgSlopes/VOWEndvsBound_MAT043+tlrc. \
MAT044	3.97	VOT	/Users/saraguediche/Desktop/avgSlopes/VOTEndvsBound_MAT044+tlrc. \
MAT044	0.68	VOW	/Users/saraguediche/Desktop/avgSlopes/VOWEndvsBound_MAT044+tlrc. \
MAT045	3.33	VOT	/Users/saraguediche/Desktop/avgSlopes/VOTEndvsBound_MAT045+tlrc. \
MAT045	0.87	VOW	/Users/saraguediche/Desktop/avgSlopes/VOWEndvsBound_MAT045+tlrc. \
MAT046	4.50	VOT	/Users/saraguediche/Desktop/avgSlopes/VOTEndvsBound_MAT046+tlrc. \
MAT046	1.05	VOW	/Users/saraguediche/Desktop/avgSlopes/VOWEndvsBound_MAT046+tlrc. \
MAT031	4.80	VOT	/Users/saraguediche/Desktop/avgSlopes/VOTEndvsBound_MAT031+tlrc. \
MAT031	-0.36	VOW	/Users/saraguediche/Desktop/avgSlopes/VOWEndvsBound_MAT031+tlrc. \
MAT039	4.52	VOT	/Users/saraguediche/Desktop/avgSlopes/VOTEndvsBound_MAT039+tlrc. \
MAT039	-0.24	VOW	/Users/saraguediche/Desktop/avgSlopes/VOWEndvsBound_MAT039+tlrc. \
MAT049	2.62	VOT	/Users/saraguediche/Desktop/avgSlopes/VOTEndvsBound_MAT049+tlrc. \
MAT049	-0.2	VOW	/Users/saraguediche/Desktop/avgSlopes/VOWEndvsBound_MAT049+tlrc. 

The 3dMVM script is incorrectly specified. Before addressing the issue, could you clarify the relationship between Condition and Slope? Specifically, does one influence the other (e.g., Condition \rightarrow Slope)?

Gang Chen

Dear Gang Chen,

Thanks for your quick response. Yes, we want to see whehter any brain regions show an interaction between condition and slope. These two do interact in our behavioral results. Thanks for your help.

I’d be happy to assist further, but I would appreciate some clarification on the question I posed earlier:

could you clarify the relationship between Condition and Slope ? Specifically, does one influence the other (e.g., ConditionSlope )?

Gang Chen

The slope (measured via a behavioral categorization task) differs by condition, in the behavior. Our question is where this interaction can be observed in the BOLD signal, and if so where.

I recommend the following steps for analyzing your data:

  1. Center the slope variable within each condition.
  2. Replace the original slope values in the data table with the newly centered values.
  3. Run the analysis using 3dLMEr with a script like the one below:
3dLMEr -prefix EndvsBoundINTSlope -jobs 16 \
-model 'Condition*slope+(slope|Subj)' \
-qVars 'slope' \
-qVarCenters 0 \
-gltCode 1 Slope 'slope :' \
-gltCode 2 Condition 'Condition : 1*VOT -1*VOW' \
-gltCode 3 Condition_by_Slope 'Condition : 1*VOT -1*VOW slope :' \
-dataTable \
Subj Slope Condition InputFile \
...

For details on specifying hierarchical models, refer to this blog post.

Gang Chen

Thank you! I'll give that a try later this week and keep you posted. Does that mean it is not possible with 3dMVM?

The 3dMVM program cannot handle within-subject quantitative variables, which is why the use of 3dLMEr is recommended.

Gang Chen

I just tried 3dLMEr, and it's giving me this error

Error in [.data.frame(lop$dataStr, , jj) : undefined columns selected
Calls: process.LME.opts -> [ -> [.data.frame
Execution halted

I tried to check all the syntax and changed a few things but still the same error. Any insights?

If the first letter of the variable Slope is capitalized, the 3dLMEr script should be corrected as follows:

3dLMEr -prefix EndvsBoundINTSlope -jobs 16 \
-model 'Condition*Slope+(Slope|Subj)' \
-qVars 'Slope' \
-qVarCenters 0 \
-gltCode 1 Slope 'Slope :' \
-gltCode 2 Condition 'Condition : 1*VOT -1*VOW' \
-gltCode 3 Condition_by_Slope 'Condition : 1*VOT -1*VOW Slope :' \
-dataTable \
Subj Slope Condition InputFile \
...

Gang Chen

Error in if (is.na(code[[n]][QVpos + 2])) { :
the condition has length > 1
Calls: process.LME.opts -> gl_Constr
Execution halted

More correction is needed:

-gltCode Slope 'Slope :' \
-gltCode Condition 'Condition : 1*VOT -1*VOW' \
-gltCode Condition_by_Slope 'Condition : 1*VOT -1*VOW Slope :' \

Gang Chen

Thanks Gang Chen, I thought it was something else so I also added the gltLabels. I have removed those now and it is running! Thank you so much. You may get another message regarding output interpretation next week once I play around with this some more. I really appreciate your quick replies. Thanks again!