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  

|
dfm
May 20, 2015 07:06PM
Hi AFNI Folks,

I have a question about 3dLME's glt syntax. For this analysis I have extracted an average HRF with 20 time points from many subjects, some of whom have multiple measurements. For each subject we calculated the a metric of motion, over the course of all of the trials that contributed to the estimate of the HRF. This measure and its square are referred to as 'TrialDisplacement' and 'TrialDisplacementSquared' respectively. The 'Time' variable is a categorical variable that refers to a particular TR within an HRF and has the format T##, where ## is the leading zero padded TR number. In addition, for each recording session we have an 'Age' variable for the subject.

I would like to estimate the HRF time course at a particular age, in this case age 18, for an idealized zero-motion case. For this situation I set the -qVarCenters to zero for all variables. If I understand the 3dLME documentation correctly, this will effectively NOT center any of my quatitative variables. By not centering the variables I hope to be able to enter the parameters for the glt in 'native units', so to speak, rather than their centered or zscored equivalents.

The full 3dLME script is included below, but here I've pulled out the line that I have questions about and which seems to be the source of some problems:

-gltCode 1 'Time : 1*T00 Age : 18 TrialDisplacement : 0 TrialDisplacementSquared : 0'

Here is where I try to express that I want to estimate a voxel's value at TR 0 for an 18 year old subject who did not move at all. Is this the correct expression? If not, where am going wrong?

When I execute this script:

#!/bin/bash
3dLME \
-prefix LELMLeftLME \
-jobs 8 \
-qVarCenters '0,0,0' \
-qVars 'Age,TrialDisplacement,TrialDisplacementSquared' \
-model "1+Time+TrialDisplacement+TrialDisplacementSquared" \
-ranEff '~1' \
-num_glt 20 \
-gltLabel 1 'T00' -gltCode 1 'Time : 1*T00 Age : 18 TrialDisplacement : 0 TrialDisplacementSquared : 0' \
-gltLabel 2 'T01' -gltCode 2 'Time : 1*T01 Age : 18 TrialDisplacement : 0 TrialDisplacementSquared : 0' \
-gltLabel 3 'T02' -gltCode 3 'Time : 1*T02 Age : 18 TrialDisplacement : 0 TrialDisplacementSquared : 0' \
-gltLabel 4 'T03' -gltCode 4 'Time : 1*T03 Age : 18 TrialDisplacement : 0 TrialDisplacementSquared : 0' \
-gltLabel 5 'T04' -gltCode 5 'Time : 1*T04 Age : 18 TrialDisplacement : 0 TrialDisplacementSquared : 0' \
-gltLabel 6 'T05' -gltCode 6 'Time : 1*T05 Age : 18 TrialDisplacement : 0 TrialDisplacementSquared : 0' \
-gltLabel 7 'T06' -gltCode 7 'Time : 1*T06 Age : 18 TrialDisplacement : 0 TrialDisplacementSquared : 0' \
-gltLabel 8 'T07' -gltCode 8 'Time : 1*T07 Age : 18 TrialDisplacement : 0 TrialDisplacementSquared : 0' \
-gltLabel 9 'T08' -gltCode 9 'Time : 1*T08 Age : 18 TrialDisplacement : 0 TrialDisplacementSquared : 0' \
-gltLabel 10 'T09' -gltCode 10 'Time : 1*T09 Age : 18 TrialDisplacement : 0 TrialDisplacementSquared : 0' \
-gltLabel 11 'T10' -gltCode 11 'Time : 1*T10 Age : 18 TrialDisplacement : 0 TrialDisplacementSquared : 0' \
-gltLabel 12 'T11' -gltCode 12 'Time : 1*T11 Age : 18 TrialDisplacement : 0 TrialDisplacementSquared : 0' \
-gltLabel 13 'T12' -gltCode 13 'Time : 1*T12 Age : 18 TrialDisplacement : 0 TrialDisplacementSquared : 0' \
-gltLabel 14 'T13' -gltCode 14 'Time : 1*T13 Age : 18 TrialDisplacement : 0 TrialDisplacementSquared : 0' \
-gltLabel 15 'T14' -gltCode 15 'Time : 1*T14 Age : 18 TrialDisplacement : 0 TrialDisplacementSquared : 0' \
-gltLabel 16 'T15' -gltCode 16 'Time : 1*T15 Age : 18 TrialDisplacement : 0 TrialDisplacementSquared : 0' \
-gltLabel 17 'T16' -gltCode 17 'Time : 1*T16 Age : 18 TrialDisplacement : 0 TrialDisplacementSquared : 0' \
-gltLabel 18 'T17' -gltCode 18 'Time : 1*T17 Age : 18 TrialDisplacement : 0 TrialDisplacementSquared : 0' \
-gltLabel 19 'T18' -gltCode 19 'Time : 1*T18 Age : 18 TrialDisplacement : 0 TrialDisplacementSquared : 0' \
-gltLabel 20 'T19' -gltCode 20 'Time : 1*T19 Age : 18 TrialDisplacement : 0 TrialDisplacementSquared : 0' \
-dataTable @LELMLeftModelTable.txt

I receive this error:

Read 45010 items
Error in seq.default(2, length(sepTerms), 2) :
wrong sign in 'by' argument
Calls: process.LME.opts -> gl_Constr -> glfConstr -> seq -> seq.default
In addition: Warning messages:
1: In if (is.na(code[[n]][QVpos + 2])) { :
the condition has length > 1 and only the first element will be used
2: In if (QVpos == 1) outList[[1]][[n]] <- NA else outList[[1]][[n]] <- glfConstr(code[[n]][-(QVpos:(QVpos + :
the condition has length > 1 and only the first element will be used
3: In QVpos:(QVpos + 2) :
numerical expression has 3 elements: only the first used
4: In QVpos:(QVpos + 2) :
numerical expression has 3 elements: only the first used
Execution halted

Obviously I'm setting this up incorrectly. Can you point me toward a solution?

Cheers!
David
Subject Author Posted

3dLME glt syntax

dfm May 20, 2015 07:06PM

Re: 3dLME glt syntax

gang May 21, 2015 01:46PM

Re: 3dLME glt syntax

dfm May 21, 2015 03:06PM

Re: 3dLME glt syntax

gang May 21, 2015 05:50PM