3dLMEr order effect

Hi, I am running 3dLMEr to get an order effect. I am interested in finding out if the 'order' by which the subjects did the study had an effect on the results. I have two groups (ON medications and OFF medication)
First I used 3dcalc to get the falff difference for each subject; I get ## subjects that started with OFF first and ## subjects that started with ON first. I included the difference falff files in the InputFile
This is my model:

3dLMEr -prefix LMEr_fALFF.OrderEffect.nii.gz -jobs 12 \
-model "group*order+(1|Subj)" \
-qVars 'order' \
-mask B-Str2Resampled.nii \
-gltCode OFF 'group : 1*OFF' \
-gltCode ON 'group : 1*ON' \
-gltCode groupOFFvsON 'group : 1*OFF - 1*ON' \
-gltCode order 'order : 1*1' \
-gltCode groupvsorder0 'group : 1*OFF -1*ON order : 0' \
-gltCode groupvsorder1  'group : 1*OFF -1*ON order : 1' \
-dataTable \
Subj 			group order	InputFile \	
s1		OFF	0	diff.s1.falff.off1st.nii	\
s2		OFF	0	diff.s2.falff.off1st.nii	\
s3		OFF	0	diff.s3.falff.off1st.nii	\
s4		ON	1	diff.s4.falff.on1st.nii	\
s5		ON	1	diff.s5.falff.on1st.nii	\
s6		ON	1	diff.s6.falff.on1st.nii	

This is my error message:

 -dataTable Subj group order InputFile
[INFO] Please allocate lscratch for batch/sinteractive R jobs
Error in seq.default(wd + i, len, wd) : wrong sign in 'by' argument
Calls: read.LME.opts.batch ... dtCheck_str2frame -> data.frame -> cbind -> seq -> seq.default
Execution halted

Thank you!
jasmin

Jasmin,

Are both variables group and 'order' between-individual factors? Could you show the contingency table between them like the following?

###
         group
order  OFF   ON  
0       x    x   
1       x    x

Gang Chen

Hi Gang, Thank you! In my study, the primary variable is the within subject difference (the difference falff values) between ON and OFF medication, as each participant experienced both conditions. The 'order' variable (whether participants started OFF or ON meds) is a between subjects factor, since each participant is assigned to only one group (twos who started OFF first and those who stated with ON first. So, order is between subject factor, while medication state is wishing subject factor.

#
       group
order 	OFF	ON	
0 	          x
0	x
0	x			                   	
0	x		 
0	x		 
1		 X
1		 X
1		 X
1		 X
1		X

Hi Jasmin,

Your data structure looks like this:

###
         group
order   OFF   ON  
0        15    0   
1         0   15

This indicates that the two factors, group and order, are collinear and they represent the same distinction. In this case, you can simply perform a two-sample t-test using 3dttest++.

Gang Chen