Errors running 3dLME (incorrect level coding in variable cond)

Hi AFNI expert,

I have questions regarding setting up 3dLME, to look if betwee-subject factor (Group: control, patient) and within-subject variable (Time: Time 1 and Time 2) account for significant variance in the brain activity. I am mostly interested in effect of Broup By Time interaction. I ran into error when I run the script : Incorrect level coding in variable cond: v1.

Please let me know what seeting in my script caused that error. Thank you! Here is my script:

3dLME \
-prefix Ctrl29_vs_Pat36_V1-V2 \
-jobs 2 \
-mask $brain_mask \
-model 'cond*group' \
-ranEff '~1' \
-SS_type 3 \
-num_glt 8 \
-gltLabel 1 'v1' -gltCode 1 'cond : 1*v1' \
-gltLabel 2 'v2' -gltCode 2 'cond : 1*v2' \
-gltLabel 3 'ctrl' -gltCode 3 'group : 1*ctrl' \
-gltLabel 4 'pat' -gltCode 4 'group : 1*pat' \
-gltLabel 5 'v1-v2' -gltCode 5 'cond : 1*v1 -1*v2' \
-gltLabel 6 'ctrl-pat' -gltCode 6 'group : 1*ctrl -1*pat' \
-gltLabel 7 'ctrl_v1-v2' -gltCode 7 'cond : 1*v1 -1*v2 group : 1*ctrl' \
-gltLabel 8 'pat_v1-v2' -gltCode 8 'cond : 1*v1 -1*v2 group : 1*pat' \
-num_glf 1 \
-glfLabel 1 'GroupByTime' -glfCode 1 'group : 1*ctrl -1*pat cond : 1*v1 -1*v2' \
-dataTable \
Subj cond group InputFile \
s1 v1 ctrl '$c1v1' \
s1 v2 ctrl '$c1v2' \
s2 v1 ctrl '$c2v1' \
s2 v2 ctrl '$c2v2' \
s3 v1 ctrl '$c3v1' \
...
...
s30 v1 pat '$p1v1' \
s30 v2 pat '$p1v2' \
s31 v1 pat '$p2v1' \
s31 v2 pat '$p2v2' \
s32 v1 pat '$p3v1' \
s32 v2 pat '$p3v2' \
s33 v1 pat '$p4v1' \
...
...

I don't see any obvious problems with your script. What is your AFNI version?

afni -ver

Unrelated to the error message, the following line

-glfLabel 1 'GroupByTime' -glfCode 1 'group : 1*ctrl -1*pat cond : 1*v1 -1*v2' \

could be changed to

-gltLabel 9 'GroupByTime' -gltCode 9 'group : 1*ctrl -1*pat cond : 1*v1 -1*v2' \

Thank you for checking. Below is my afni version.
-Yuhan

(base) [cheny4@reslnvmlr03 beta_V1-V2_ttest]$ afni -ver
Precompiled binary linux_centos_7_64: Jul 10 2019 (Version AFNI_19.2.01 ‘Claudius’)

Yuhan,

Update your AFNI:

@update.afni.binaries -d

Let us know if the problem persists.

Hi Gang,

We finally installed the latest AFNI, after our cluster migrated to a new RedHat. I ran the same script described in the previous message, but now got this error message:

** Error:
Missing R_io.so
Error in if (an$type == "BRIK" && !is.na(an$view)) { :
missing value where TRUE/FALSE needed
Calls: process.LME.opts -> exists.AFNI.name -> file.exists -> head.AFNI.name
Execution halted.

My R version is 4.2.3. Not sure if this is due to some R packages missing and if we need to rebuild it?

Thanks!
Yuhan

Hi Yuhan,
Would you please post (or directly Message me) with the output from:
afni_system_check.py -check_all

That would help for figuring out what state you are in.
Thanks,

  • rick

Thank you Rick!

Here is the output:

[cheny4@reslnvhpc0143 beta_GroupXTime]$ afni_system_check.py -check_all
-------------------------------- general ---------------------------------
architecture: 64bit ELF
cpu type: x86_64
system: Linux
release: 5.14.0-162.6.1.el9_1.x86_64
version: #1 SMP PREEMPT_DYNAMIC Fri Sep 30 07:36:03 EDT 2022
distribution: Red Hat Enterprise Linux 9.1 (Plow)
number of CPUs: 4
apparent login shell: bash
shell RC file: .bashrc (exists)

--------------------- AFNI and related program tests ---------------------
which afni : /cm/shared/apps_chop/afni/23.0.08/bin/afni
afni version : Precompiled binary 1: Jun 2 2023
: AFNI_99.99.99 'Alexios V Doukas the Bushy-eyebrowed'
AFNI_version.txt :
which python : /cm/shared/easybuild/software/Python/3.10.4-GCCcore-11.3.0/bin/python
python version : 3.10.4
which R : /cm/shared/apps_chop/R/4.2.3/lib64/R/bin/R
R version : R version 4.2.3 (2023-03-15) -- "Shortstop Beagle"
which tcsh : /cm/shared/easybuild/software/tcsh/6.24.01-GCCcore-11.3.0/bin/tcsh

instances of various programs found in PATH:
afni : 1 (/cm/shared/apps_chop/afni/23.0.08/bin/afni)
R : 1 (/cm/shared/apps_chop/R/4.2.3/lib64/R/bin/R)
python : 2
/cm/shared/easybuild/software/Python/3.10.4-GCCcore-11.3.0/bin/python3.10
/usr/bin/python3.9
python2 : 0
python3 : 2
/cm/shared/easybuild/software/Python/3.10.4-GCCcore-11.3.0/bin/python3.10
/usr/bin/python3.9

** have python3 but not python2

testing ability to start various programs...
afni : success
suma : success
3dSkullStrip : success
uber_subject.py : success
3dAllineate : success
3dRSFC : success
SurfMesh : success
3dClustSim : success
3dMVM : success

checking for R packages...
rPkgsInstall -pkgs ALL -check : success

R RHOME : /cm/shared/apps_chop/R/4.2.3/lib64/R

checking for $HOME files...
.afnirc : missing
.sumarc : missing
.afni/help/all_progs.COMP : missing

------------------------------ python libs -------------------------------
** failed to load module PyQt4
-- PyQt4 is no longer needed for an AFNI bootcamp

Illegal instruction (core dumped)