Dear AFNI Gurus,
I have a problem with my 3dLME scripts. At the individual level, I deconvolved different word types for 20 seconds after the stimulus onset, resulting in 21 beta values per word type. When I do my group level analyses with 3dLME, the results look fine at different time points individually (i.e., swear words vs. baseline is a different map for each time point, matched words vs. baseline is a different map for each time point, etc.). However, when I do contrasts, one particular contrast (swear words vs. matched words) always results in the same brain map at each time point. The contrast of swear words vs. random words (technically swear vs. two sets of random words) doesn't do this.
I've checked the individual files and they look fine for each word type, which explains why the group level word type vs. baseline results look fine too. Any thoughts on why one particular contrast would be the same for each time point at the group level? I've tried multiple different scripts with the same outcome; one example is provided below.
Thank you!
P.S. If I want to compare swear words vs. the average of the two random word groups, should I change my script to
condition : 1*swear_words -0.5*random1 -0.5*random2 timepoint : 1*0
instead of
condition : 1*swear_words -1*random1 -1*random2 timepoint : 1*0
? Similarly, when I want to average across certain time points, should it be
timepoints : 0.333*0 0.333*1 0.333*2
instead of
timepoints : 1*0 1*1 1*2
? Thank you.
3dLME script example below:
module load apptainer
apptainer exec -B "$input_dir" "$input_dir"/afni-latest_12_12_24.sif /opt/afni-latest/3dLME \
-prefix avfc_lme_analysis_w_timepoints.nii.gz \
-jobs 1 \
-mask "$input_dir"/group_mask_70percent.nii.gz \
-model "condition+age+gender+timepoint+movie" \
-qVars "age" \
-qVarCenters "26.29" \
-ranEff '~1' \
-SS_type 3 \
-num_glt 50 \
-gltLabel 1 'swear_words_time0to2' -gltCode 1 'condition : 1*swear_words timepoint : 1*0 1*1 1*2' \
-gltLabel 2 'swear_words_time3to5' -gltCode 2 'condition : 1*swear_words timepoint : 1*3 1*4 1*5' \
-gltLabel 3 'swear_words_time6to8' -gltCode 3 'condition : 1*swear_words timepoint : 1*6 1*7 1*8' \
-gltLabel 4 'swear_words_time9to11' -gltCode 4 'condition : 1*swear_words timepoint : 1*9 1*10 1*11' \
-gltLabel 5 'swear_words_time12to14' -gltCode 5 'condition : 1*swear_words timepoint : 1*12 1*13 1*14' \
-gltLabel 6 'swear_words_time15to17' -gltCode 6 'condition : 1*swear_words timepoint : 1*15 1*16 1*17' \
-gltLabel 7 'swear_words_time18to20' -gltCode 7 'condition : 1*swear_words timepoint : 1*18 1*19 1*20' \
-gltLabel 8 'swear_words_time0to8' -gltCode 8 'condition : 1*swear_words timepoint : 1*0 1*1 1*2 1*3 1*4 1*5 1*6 1*7 1*8' \
-gltLabel 9 'swear_words_time0to11' -gltCode 9 'condition : 1*swear_words timepoint : 1*0 1*1 1*2 1*3 1*4 1*5 1*6 1*7 1*8 1*9 1*10 1*11' \
-gltLabel 10 'swear_words_time0to14' -gltCode 10 'condition : 1*swear_words timepoint : 1*0 1*1 1*2 1*3 1*4 1*5 1*6 1*7 1*8 1*9 1*10 1*11 1*12 1*13 1*14' \
-gltLabel 11 'avfc_match_words_time0to2' -gltCode 11 'condition : 1*avfc_match_words timepoint : 1*0 1*1 1*2' \
-gltLabel 12 'avfc_match_words_time3to5' -gltCode 12 'condition : 1*avfc_match_words timepoint : 1*3 1*4 1*5' \
-gltLabel 13 'avfc_match_words_time6to8' -gltCode 13 'condition : 1*avfc_match_words timepoint : 1*6 1*7 1*8' \
-gltLabel 14 'avfc_match_words_time9to11' -gltCode 14 'condition : 1*avfc_match_words timepoint : 1*9 1*10 1*11' \
-gltLabel 15 'avfc_match_words_time12to14' -gltCode 15 'condition : 1*avfc_match_words timepoint : 1*12 1*13 1*14' \
-gltLabel 16 'avfc_match_words_time15to17' -gltCode 16 'condition : 1*avfc_match_words timepoint : 1*15 1*16 1*17' \
-gltLabel 17 'avfc_match_words_time18to20' -gltCode 17 'condition : 1*avfc_match_words timepoint : 1*18 1*19 1*20' \
-gltLabel 18 'avfc_match_words_time0to8' -gltCode 18 'condition : 1*avfc_match_words timepoint : 1*0 1*1 1*2 1*3 1*4 1*5 1*6 1*7 1*8' \
-gltLabel 19 'avfc_match_words_time0to11' -gltCode 19 'condition : 1*avfc_match_words timepoint : 1*0 1*1 1*2 1*3 1*4 1*5 1*6 1*7 1*8 1*9 1*10 1*11' \
-gltLabel 20 'avfc_match_words_time0to14' -gltCode 20 'condition : 1*avfc_match_words timepoint : 1*0 1*1 1*2 1*3 1*4 1*5 1*6 1*7 1*8 1*9 1*10 1*11 1*12 1*13 1*14' \
-gltLabel 21 'random_time0to2' -gltCode 21 'condition : 1*random1 1*random2 timepoint : 1*0 1*1 1*2' \
-gltLabel 22 'random_time3to5' -gltCode 22 'condition : 1*random1 1*random2 timepoint : 1*3 1*4 1*5' \
-gltLabel 23 'random_time6to8' -gltCode 23 'condition : 1*random1 1*random2 timepoint : 1*6 1*7 1*8' \
-gltLabel 24 'random_time9to11' -gltCode 24 'condition : 1*random1 1*random2 timepoint : 1*9 1*10 1*11' \
-gltLabel 25 'random_time12to14' -gltCode 25 'condition : 1*random1 1*random2 timepoint : 1*12 1*13 1*14' \
-gltLabel 26 'random_time15to17' -gltCode 26 'condition : 1*random1 1*random2 timepoint : 1*15 1*16 1*17' \
-gltLabel 27 'random_time18to20' -gltCode 27 'condition : 1*random1 1*random2 timepoint : 1*18 1*19 1*20' \
-gltLabel 28 'random_time0to8' -gltCode 28 'condition : 1*random1 1*random2 timepoint : 1*0 1*1 1*2 1*3 1*4 1*5 1*6 1*7 1*8' \
-gltLabel 29 'random_time0to11' -gltCode 29 'condition : 1*random1 1*random2 timepoint : 1*0 1*1 1*2 1*3 1*4 1*5 1*6 1*7 1*8 1*9 1*10 1*11' \
-gltLabel 30 'random_time0to14' -gltCode 30 'condition : 1*random1 1*random2 timepoint : 1*0 1*1 1*2 1*3 1*4 1*5 1*6 1*7 1*8 1*9 1*10 1*11 1*12 1*13 1*14' \
-gltLabel 31 'swear_v_random_time0to2' -gltCode 31 'condition : 1*swear_words -1*random1 -1*random2 timepoint : 1*0 1*1 1*2' \
-gltLabel 32 'swear_v_random_time3to5' -gltCode 32 'condition : 1*swear_words -1*random1 -1*random2 timepoint : 1*3 1*4 1*5' \
-gltLabel 33 'swear_v_random_time6to8' -gltCode 33 'condition : 1*swear_words -1*random1 -1*random2 timepoint : 1*6 1*7 1*8' \
-gltLabel 34 'swear_v_random_time9to11' -gltCode 34 'condition : 1*swear_words -1*random1 -1*random2 timepoint : 1*9 1*10 1*11' \
-gltLabel 35 'swear_v_random_time12to14' -gltCode 35 'condition : 1*swear_words -1*random1 -1*random2 timepoint : 1*12 1*13 1*14' \
-gltLabel 36 'swear_v_random_time15to17' -gltCode 36 'condition : 1*swear_words -1*random1 -1*random2 timepoint : 1*15 1*16 1*17' \
-gltLabel 37 'swear_v_random_time18to20' -gltCode 37 'condition : 1*swear_words -1*random1 -1*random2 timepoint : 1*18 1*19 1*20' \
-gltLabel 38 'swear_v_random_time0to8' -gltCode 38 'condition : 1*swear_words -1*random1 -1*random2 timepoint : 1*0 1*1 1*2 1*3 1*4 1*5 1*6 1*7 1*8' \
-gltLabel 39 'swear_v_random_time0to11' -gltCode 39 'condition : 1*swear_words -1*random1 -1*random2 timepoint : 1*0 1*1 1*2 1*3 1*4 1*5 1*6 1*7 1*8 1*9 1*10 1*11' \
-gltLabel 40 'swear_v_random_time0to14' -gltCode 40 'condition : 1*swear_words -1*random1 -1*random2 timepoint : 1*0 1*1 1*2 1*3 1*4 1*5 1*6 1*7 1*8 1*9 1*10 1*11 1*12 1*13 1*14' \
-gltLabel 41 'swear_v_match_words_time0to2' -gltCode 41 'condition : 1*swear_words -1*avfc_match_words timepoint : 1*0 1*1 1*2' \
-gltLabel 42 'swear_v_match_words_time3to5' -gltCode 42 'condition : 1*swear_words -1*avfc_match_words timepoint : 1*3 1*4 1*5' \
-gltLabel 43 'swear_v_match_words_time6to8' -gltCode 43 'condition : 1*swear_words -1*avfc_match_words timepoint : 1*6 1*7 1*8' \
-gltLabel 44 'swear_v_match_words_time9to11' -gltCode 44 'condition : 1*swear_words -1*avfc_match_words timepoint : 1*9 1*10 1*11' \
-gltLabel 45 'swear_v_match_words_time12to14' -gltCode 45 'condition : 1*swear_words -1*avfc_match_words timepoint : 1*12 1*13 1*14' \
-gltLabel 46 'swear_v_match_words_time15to17' -gltCode 46 'condition : 1*swear_words -1*avfc_match_words timepoint : 1*15 1*16 1*17' \
-gltLabel 47 'swear_v_match_words_time18to20' -gltCode 47 'condition : 1*swear_words -1*avfc_match_words timepoint : 1*18 1*19 1*20' \
-gltLabel 48 'swear_v_match_words_time0to8' -gltCode 48 'condition : 1*swear_words -1*avfc_match_words timepoint : 1*0 1*1 1*2 1*3 1*4 1*5 1*6 1*7 1*8' \
-gltLabel 49 'swear_v_match_words_time0to11' -gltCode 49 'condition : 1*swear_words -1*avfc_match_words timepoint : 1*0 1*1 1*2 1*3 1*4 1*5 1*6 1*7 1*8 1*9 1*10 1*11' \
-gltLabel 50 'swear_v_match_words_time0to14' -gltCode 50 'condition : 1*swear_words -1*avfc_match_words timepoint : 1*0 1*1 1*2 1*3 1*4 1*5 1*6 1*7 1*8 1*9 1*10 1*11 1*12 1*13 1*14' \
-dataTable \
Subj condition age gender movie timepoint InputFile \
1 swear_words 23 M 1 0 sub-1_500daysofsummer_"$file".nii.gz['swear_words#0_Coef'] \
1 swear_words 23 M 1 1 sub-1_500daysofsummer_"$file".nii.gz['swear_words#1_Coef'] \
1 swear_words 23 M 1 2 sub-1_500daysofsummer_"$file".nii.gz['swear_words#2_Coef'] \
1 swear_words 23 M 1 3 sub-1_500daysofsummer_"$file".nii.gz['swear_words#3_Coef'] \
1 swear_words 23 M 1 4 sub-1_500daysofsummer_"$file".nii.gz['swear_words#4_Coef'] \
1 swear_words 23 M 1 5 sub-1_500daysofsummer_"$file".nii.gz['swear_words#5_Coef'] \
1 swear_words 23 M 1 6 sub-1_500daysofsummer_"$file".nii.gz['swear_words#6_Coef'] \
1 swear_words 23 M 1 7 sub-1_500daysofsummer_"$file".nii.gz['swear_words#7_Coef'] \
1 swear_words 23 M 1 8 sub-1_500daysofsummer_"$file".nii.gz['swear_words#8_Coef'] \
1 swear_words 23 M 1 9 sub-1_500daysofsummer_"$file".nii.gz['swear_words#9_Coef'] \
1 swear_words 23 M 1 10 sub-1_500daysofsummer_"$file".nii.gz['swear_words#10_Coef'] \
1 swear_words 23 M 1 11 sub-1_500daysofsummer_"$file".nii.gz['swear_words#11_Coef'] \
1 swear_words 23 M 1 12 sub-1_500daysofsummer_"$file".nii.gz['swear_words#12_Coef'] \
1 swear_words 23 M 1 13 sub-1_500daysofsummer_"$file".nii.gz['swear_words#13_Coef'] \
1 swear_words 23 M 1 14 sub-1_500daysofsummer_"$file".nii.gz['swear_words#14_Coef'] \
1 swear_words 23 M 1 15 sub-1_500daysofsummer_"$file".nii.gz['swear_words#15_Coef'] \
1 swear_words 23 M 1 16 sub-1_500daysofsummer_"$file".nii.gz['swear_words#16_Coef'] \
1 swear_words 23 M 1 17 sub-1_500daysofsummer_"$file".nii.gz['swear_words#17_Coef'] \
1 swear_words 23 M 1 18 sub-1_500daysofsummer_"$file".nii.gz['swear_words#18_Coef'] \
1 swear_words 23 M 1 19 sub-1_500daysofsummer_"$file".nii.gz['swear_words#19_Coef'] \
1 swear_words 23 M 1 20 sub-1_500daysofsummer_"$file".nii.gz['swear_words#20_Coef'] \
1 avfc_match_words 23 M 1 0 sub-1_500daysofsummer_"$file".nii.gz['avfc_match_words#0_Coef'] \
1 avfc_match_words 23 M 1 1 sub-1_500daysofsummer_"$file".nii.gz['avfc_match_words#1_Coef'] \
1 avfc_match_words 23 M 1 2 sub-1_500daysofsummer_"$file".nii.gz['avfc_match_words#2_Coef'] \
1 avfc_match_words 23 M 1 3 sub-1_500daysofsummer_"$file".nii.gz['avfc_match_words#3_Coef'] \
1 avfc_match_words 23 M 1 4 sub-1_500daysofsummer_"$file".nii.gz['avfc_match_words#4_Coef'] \
1 avfc_match_words 23 M 1 5 sub-1_500daysofsummer_"$file".nii.gz['avfc_match_words#5_Coef'] \
1 avfc_match_words 23 M 1 6 sub-1_500daysofsummer_"$file".nii.gz['avfc_match_words#6_Coef'] \
1 avfc_match_words 23 M 1 7 sub-1_500daysofsummer_"$file".nii.gz['avfc_match_words#7_Coef'] \
1 avfc_match_words 23 M 1 8 sub-1_500daysofsummer_"$file".nii.gz['avfc_match_words#8_Coef'] \
1 avfc_match_words 23 M 1 9 sub-1_500daysofsummer_"$file".nii.gz['avfc_match_words#9_Coef'] \
1 avfc_match_words 23 M 1 10 sub-1_500daysofsummer_"$file".nii.gz['avfc_match_words#10_Coef'] \
1 avfc_match_words 23 M 1 11 sub-1_500daysofsummer_"$file".nii.gz['avfc_match_words#11_Coef'] \
1 avfc_match_words 23 M 1 12 sub-1_500daysofsummer_"$file".nii.gz['avfc_match_words#12_Coef'] \
1 avfc_match_words 23 M 1 13 sub-1_500daysofsummer_"$file".nii.gz['avfc_match_words#13_Coef'] \
1 avfc_match_words 23 M 1 14 sub-1_500daysofsummer_"$file".nii.gz['avfc_match_words#14_Coef'] \
1 avfc_match_words 23 M 1 15 sub-1_500daysofsummer_"$file".nii.gz['avfc_match_words#15_Coef'] \
1 avfc_match_words 23 M 1 16 sub-1_500daysofsummer_"$file".nii.gz['avfc_match_words#16_Coef'] \
1 avfc_match_words 23 M 1 17 sub-1_500daysofsummer_"$file".nii.gz['avfc_match_words#17_Coef'] \
1 avfc_match_words 23 M 1 18 sub-1_500daysofsummer_"$file".nii.gz['avfc_match_words#18_Coef'] \
1 avfc_match_words 23 M 1 19 sub-1_500daysofsummer_"$file".nii.gz['avfc_match_words#19_Coef'] \
1 avfc_match_words 23 M 1 20 sub-1_500daysofsummer_"$file".nii.gz['avfc_match_words#20_Coef'] \
1 random1 23 M 1 0 sub-1_500daysofsummer_"$file".nii.gz['random1#0_Coef'] \
1 random1 23 M 1 1 sub-1_500daysofsummer_"$file".nii.gz['random1#1_Coef'] \
1 random1 23 M 1 2 sub-1_500daysofsummer_"$file".nii.gz['random1#2_Coef'] \
1 random1 23 M 1 3 sub-1_500daysofsummer_"$file".nii.gz['random1#3_Coef'] \
1 random1 23 M 1 4 sub-1_500daysofsummer_"$file".nii.gz['random1#4_Coef'] \
1 random1 23 M 1 5 sub-1_500daysofsummer_"$file".nii.gz['random1#5_Coef'] \
1 random1 23 M 1 6 sub-1_500daysofsummer_"$file".nii.gz['random1#6_Coef'] \
1 random1 23 M 1 7 sub-1_500daysofsummer_"$file".nii.gz['random1#7_Coef'] \
1 random1 23 M 1 8 sub-1_500daysofsummer_"$file".nii.gz['random1#8_Coef'] \
1 random1 23 M 1 9 sub-1_500daysofsummer_"$file".nii.gz['random1#9_Coef'] \
1 random1 23 M 1 10 sub-1_500daysofsummer_"$file".nii.gz['random1#10_Coef'] \
1 random1 23 M 1 11 sub-1_500daysofsummer_"$file".nii.gz['random1#11_Coef'] \
1 random1 23 M 1 12 sub-1_500daysofsummer_"$file".nii.gz['random1#12_Coef'] \
1 random1 23 M 1 13 sub-1_500daysofsummer_"$file".nii.gz['random1#13_Coef'] \
1 random1 23 M 1 14 sub-1_500daysofsummer_"$file".nii.gz['random1#14_Coef'] \
1 random1 23 M 1 15 sub-1_500daysofsummer_"$file".nii.gz['random1#15_Coef'] \
1 random1 23 M 1 16 sub-1_500daysofsummer_"$file".nii.gz['random1#16_Coef'] \
1 random1 23 M 1 17 sub-1_500daysofsummer_"$file".nii.gz['random1#17_Coef'] \
1 random1 23 M 1 18 sub-1_500daysofsummer_"$file".nii.gz['random1#18_Coef'] \
1 random1 23 M 1 19 sub-1_500daysofsummer_"$file".nii.gz['random1#19_Coef'] \
1 random1 23 M 1 20 sub-1_500daysofsummer_"$file".nii.gz['random1#20_Coef'] \
1 random2 23 M 1 0 sub-1_500daysofsummer_"$file".nii.gz['random2#0_Coef'] \
1 random2 23 M 1 1 sub-1_500daysofsummer_"$file".nii.gz['random2#1_Coef'] \
1 random2 23 M 1 2 sub-1_500daysofsummer_"$file".nii.gz['random2#2_Coef'] \
1 random2 23 M 1 3 sub-1_500daysofsummer_"$file".nii.gz['random2#3_Coef'] \
1 random2 23 M 1 4 sub-1_500daysofsummer_"$file".nii.gz['random2#4_Coef'] \
1 random2 23 M 1 5 sub-1_500daysofsummer_"$file".nii.gz['random2#5_Coef'] \
1 random2 23 M 1 6 sub-1_500daysofsummer_"$file".nii.gz['random2#6_Coef'] \
1 random2 23 M 1 7 sub-1_500daysofsummer_"$file".nii.gz['random2#7_Coef'] \
1 random2 23 M 1 8 sub-1_500daysofsummer_"$file".nii.gz['random2#8_Coef'] \
1 random2 23 M 1 9 sub-1_500daysofsummer_"$file".nii.gz['random2#9_Coef'] \
1 random2 23 M 1 10 sub-1_500daysofsummer_"$file".nii.gz['random2#10_Coef'] \
1 random2 23 M 1 11 sub-1_500daysofsummer_"$file".nii.gz['random2#11_Coef'] \
1 random2 23 M 1 12 sub-1_500daysofsummer_"$file".nii.gz['random2#12_Coef'] \
1 random2 23 M 1 13 sub-1_500daysofsummer_"$file".nii.gz['random2#13_Coef'] \
1 random2 23 M 1 14 sub-1_500daysofsummer_"$file".nii.gz['random2#14_Coef'] \
1 random2 23 M 1 15 sub-1_500daysofsummer_"$file".nii.gz['random2#15_Coef'] \
1 random2 23 M 1 16 sub-1_500daysofsummer_"$file".nii.gz['random2#16_Coef'] \
1 random2 23 M 1 17 sub-1_500daysofsummer_"$file".nii.gz['random2#17_Coef'] \
1 random2 23 M 1 18 sub-1_500daysofsummer_"$file".nii.gz['random2#18_Coef'] \
1 random2 23 M 1 19 sub-1_500daysofsummer_"$file".nii.gz['random2#19_Coef'] \
1 random2 23 M 1 20 sub-1_500daysofsummer_"$file".nii.gz['random2#20_Coef'] \
1 other_words 23 M 1 0 sub-1_500daysofsummer_"$file".nii.gz['other_words#0_Coef'] \
1 other_words 23 M 1 1 sub-1_500daysofsummer_"$file".nii.gz['other_words#1_Coef'] \
1 other_words 23 M 1 2 sub-1_500daysofsummer_"$file".nii.gz['other_words#2_Coef'] \
1 other_words 23 M 1 3 sub-1_500daysofsummer_"$file".nii.gz['other_words#3_Coef'] \
1 other_words 23 M 1 4 sub-1_500daysofsummer_"$file".nii.gz['other_words#4_Coef'] \
1 other_words 23 M 1 5 sub-1_500daysofsummer_"$file".nii.gz['other_words#5_Coef'] \
1 other_words 23 M 1 6 sub-1_500daysofsummer_"$file".nii.gz['other_words#6_Coef'] \
1 other_words 23 M 1 7 sub-1_500daysofsummer_"$file".nii.gz['other_words#7_Coef'] \
1 other_words 23 M 1 8 sub-1_500daysofsummer_"$file".nii.gz['other_words#8_Coef'] \
1 other_words 23 M 1 9 sub-1_500daysofsummer_"$file".nii.gz['other_words#9_Coef'] \
1 other_words 23 M 1 10 sub-1_500daysofsummer_"$file".nii.gz['other_words#10_Coef'] \
1 other_words 23 M 1 11 sub-1_500daysofsummer_"$file".nii.gz['other_words#11_Coef'] \
1 other_words 23 M 1 12 sub-1_500daysofsummer_"$file".nii.gz['other_words#12_Coef'] \
1 other_words 23 M 1 13 sub-1_500daysofsummer_"$file".nii.gz['other_words#13_Coef'] \
1 other_words 23 M 1 14 sub-1_500daysofsummer_"$file".nii.gz['other_words#14_Coef'] \
1 other_words 23 M 1 15 sub-1_500daysofsummer_"$file".nii.gz['other_words#15_Coef'] \
1 other_words 23 M 1 16 sub-1_500daysofsummer_"$file".nii.gz['other_words#16_Coef'] \
1 other_words 23 M 1 17 sub-1_500daysofsummer_"$file".nii.gz['other_words#17_Coef'] \
1 other_words 23 M 1 18 sub-1_500daysofsummer_"$file".nii.gz['other_words#18_Coef'] \
1 other_words 23 M 1 19 sub-1_500daysofsummer_"$file".nii.gz['other_words#19_Coef'] \
1 other_words 23 M 1 20 sub-1_500daysofsummer_"$file".nii.gz['other_words#20_Coef'] \
2 swear_words 25 F 1 0 sub-2_500daysofsummer_"$file".nii.gz['swear_words#0_Coef'] \
2 swear_words 25 F 1 1 sub-2_500daysofsummer_"$file".nii.gz['swear_words#1_Coef'] \
etc...