AFNI Message Board

Dear AFNI users-

We are very pleased to announce that the new AFNI Message Board framework is up! Please join us at:

https://discuss.afni.nimh.nih.gov

Existing user accounts have been migrated, so returning users can login by requesting a password reset. New users can create accounts, as well, through a standard account creation process. Please note that these setup emails might initially go to spam folders (esp. for NIH users!), so please check those locations in the beginning.

The current Message Board discussion threads have been migrated to the new framework. The current Message Board will remain visible, but read-only, for a little while.

Sincerely, AFNI HQ

History of AFNI updates  

|
January 05, 2023 12:40PM
Hello AFNI experts,

I am trying to run 3dLME to look at some between subject and within subject effects in my dataset, but I keep running into errors. I would really appreciate some help figuring out what is going on.
My model has 16 subjects with one within subject factor (Arm) that has data from two time points. Data from the second time point is considered a between subject factor. The first time point is called “Baseline” and the second time point is either “Exercise” or “Nutrition”. I am also interested in looking at the effects of two covariates, “Age” and “CIPN20”. Here is the script that I used to look at the effect of Exercise, compared to the Nutrition group.
set dirname_input = "input-2022.12.15-PAG"
set seed_array = ("PAG_6mm" "rPAG_3mmresamp")

set script_name = "1i-3dLME-T1orT3_eq_Arm+Age"
#----------------------------------------------------------

# Set up output dir
mkdir outputdir

#-------------------------
@ s = 0
foreach seed ( $seed_array )
@ s = $s + 1
echo "Working on $seed ($s of $Nseeds)..."
set output_name = "${script_name }-${seed}"

3dLME -prefix out-$output_name \
-jobs 12 \
-model "Arm*Age+CIPN20 " \
-qVars "Age,CIPN20" \
-ranEff '~1' \
-SS_type 3 \
-num_glt 1 \
-gltLabel 1 'Ex_min_Nut' -gltCode 1 'Arm : 1*Exercise -1*Nutrition' \
-resid out-resid-$output_name \
-dataTable \
Subj Arm Age CIPN20 InputFile \
s001 Baseline 53 21 ${dirname_input}/z.s001_T1.rest.clean_data.${seed}+tlrc'[0]' \
s002 Baseline 73 26 ${dirname_input}/z.s002_T1.rest.clean_data.${seed}+tlrc'[0]' \
.
.
s001 Exercise 53 22 ${dirname_input}/z.s001_T3.rest.clean_data.${seed}+tlrc'[0]' \
s002 Nutrition 73 39 ${dirname_input}/z.s002_T3.rest.clean_data.${seed}+tlrc'[0]' \
.
.
s021 Nutrition 83 31 ${dirname_input}/z.s021_T3.rest.clean_data.${seed}+tlrc'[0]'


Here is output that I get for one of the seeds,
Working on PAG_6mm (1 of 2)...
----------------------------------------------------------
----------------------------------------------------------


Warning message:
In is.null(ss) || !length(ss) || ss == "" :
'length(x) = 140 > 1' in coercion to 'logical(1)'
Loading required package: nlme
Package nlme loaded successfully!

Loading required package: phia
Loading required package: car
Loading required package: carData
Package phia loaded successfully!

++++++++++++++++++++++++++++++++++++++++++++++++++++
***** Summary information of data structure *****
16 subjects : s001 s002 s003 s004 s005 s008 s009 s010 s011 s013 s014 s015 s018 s019 s020 s021
27 response values
3 levels for factor Arm : Baseline Exercise Nutrition
27 centered values for numeric variable Age : -12.85185 7.148148 1.148148 15.14815 -25.85185 0.1481481 6.148148 0.1481481 -7.851852 7.148148 -14.85185 3.148148 3.148148 17.14815 -12.85185 7.148148 -4.851852 -1.851852 1.148148 15.14815 0.1481481 0.1481481 -7.851852 -14.85185 3.148148 -0.8518519 17.14815
27 centered values for numeric variable CIPN20 : -6 -1 -6 -4 -7 -8 3 0 0 1 -7 -2 -7 14 -5 12 2 -6 -2 5 -7 15 7 8 1 -4 4
1 post hoc tests

Contingency tables of subject distributions among the categorical variables:

Tabulation of subjects against all categorical variables
~~~~~~~~~~~~~~
Subj vs Arm:

Baseline Exercise Nutrition
s001 1 1 0
s002 1 0 1
.
.
s021 1 0 1
***** End of data structure information *****
++++++++++++++++++++++++++++++++++++++++++++++++++++

Reading input files now...

Reading input files: Done!


Range of input data: [-1.356, 2.026]

If the program hangs here for more than, for example, half an hour,
kill the process because the model specification or the GLT coding
is likely inappropriate.

Error in if (is.na(gltRes[[n]])) fm <- NULL :
the condition has length > 1
Execution halted

Done with PAG_6mm (1 of 2)...
----------------------------------------------------------

Thank you!!
Subject Author Posted

3dLME fails- Error in if (is.na(gltRes[[n]])) fm <- NULL

thewavita January 05, 2023 12:40PM

Re: 3dLME fails- Error in if (is.na(gltRes[[n]])) fm <- NULL

gang January 06, 2023 09:47AM

Re: 3dLME fails- Error in if (is.na(gltRes[[n]])) fm <- NULL

thewavita January 12, 2023 04:21PM