Error in glfList[[ii]][sq, jj] "number of items to replace is not a multiple of replacement length"

AFNI version info (afni -ver):
Precompiled binary macos_13_ARM: Mar 12 2025 (Version AFNI_25.0.08 'Severus Alexander')

hi there Gang i'm struggling to specify a gltCode. my datatable:

cat datatable_offset_new.txt | head
 
Subj  Cond  Order    Half   InputFile
007 offset 0  half1  ../../clear_2nd_TENT_analyses_allTRs/sub007_TENT/stats.sub007_CLEAR5_tent_REML+tlrc[offset#0_Coef]
007 offset 1  half1  ../../clear_2nd_TENT_analyses_allTRs/sub007_TENT/stats.sub007_CLEAR5_tent_REML+tlrc[offset#1_Coef]
007 offset 2  half1  ../../clear_2nd_TENT_analyses_allTRs/sub007_TENT/stats.sub007_CLEAR5_tent_REML+tlrc[offset#2_Coef]
007 offset 3  half1  ../../clear_2nd_TENT_analyses_allTRs/sub007_TENT/stats.sub007_CLEAR5_tent_REML+tlrc[offset#3_Coef]
007 offset 4  half1  ../../clear_2nd_TENT_analyses_allTRs/sub007_TENT/stats.sub007_CLEAR5_tent_REML+tlrc[offset#4_Coef]
007 offset 5  half1  ../../clear_2nd_TENT_analyses_allTRs/sub007_TENT/stats.sub007_CLEAR5_tent_REML+tlrc[offset#5_Coef]
007 offset 6  half1  ../../clear_2nd_TENT_analyses_allTRs/sub007_TENT/stats.sub007_CLEAR5_tent_REML+tlrc[offset#6_Coef]
007 offset 7  half1  ../../clear_2nd_TENT_analyses_allTRs/sub007_TENT/stats.sub007_CLEAR5_tent_REML+tlrc[offset#7_Coef]
007 offset 8  half1  ../../clear_2nd_TENT_analyses_allTRs/sub007_TENT/stats.sub007_CLEAR5_tent_REML+tlrc[offset#8_Coef]

my 3dLMEr command:

3dLMEr -prefix CLEAR_TENTs_n20_offsets_trlock_halfs -jobs 18        \
       -mask clear_n21_mean_mask_75p.nii.gz                         \
       -model 'Cond*Half+(1|Subj)'                                  \
       -SS_type 3                                                   \
       -gltCode offsetContrast_half2 'Half : 0*half1 +1*half2 Cond : +1*offset -1*offsetcontrol'   \
       -dataTable @datatable_offset_new.txt

and my error:

++ Good: All InputFiles exist.

++ Good: All InputFiles have exactly 1 volume.
 
++ Good: All InputFiles are on the same grid.

Error in glfList[[ii]][sq, jj] <- as.numeric(sepTerms[seq(1, length(sepTerms),  :
  number of items to replace is not a multiple of replacement length
 Calls: process.LME.opts -> gl_Constr -> glfConstr
In addition: Warning message:
In glfConstr(code[[n]], lop$dataStr) : NAs introduced by coercion
Execution halted

any idea? i originally had

-gltCode offsetContrast_half2 'Half : 1*half2 Cond : +1*offset -1*offsetcontrol'

but we thought maybe we needed to zero-out the "half1" time points.
thanks!

-Sam

p.s. i just noticed that the "*" in some of those block quotes are turning into italics?

Hi Sam,

Just to clarify, are you saying that 3dLMEr works fine with this specification?

-gltCode offsetContrast_half2 'Half : 1*half2 Cond : +1*offset -1*offsetcontrol'

But not with this one?

-gltCode offsetContrast_half2 'Half : 0*half1 +1*half2 Cond : +1*offset -1*offsetcontrol'

Also, could you clarify the variable types for Cond and Half? Are they within- or between-individual factors?

I just noticed that the "*" in some of those block quotes are turning into italics?

To avoid that, use triple backticks (```) when embedding code chunks. This preserves the formatting and prevents markdown from interpreting asterisks as italics.

Gang Chen