3dDeconvolve and General Linear Test (GLTsym) problem

Hello,
I’m trying to use the gltsym command with 3dDeconvolve to run linear tests between my conditions in different time points.
I don’t understand in the output matrix the order and the numbers of the lags. By defining the lags [2…4] I expected to get 3 time points for each variable, and not 4 (as the output suggests).

INPUT:
3dDeconvolve -input r4.$sub.pic.scale+orig.HEAD \
-mask $sub.struc_al_ss_mask+orig
-censor $sub.pic.WholeBrainF.Censor.1D
-num_stimts 6
-stim_times 1 …/O$ord.Vio.txt ‘CSPLINzero(0,15,6)’
-stim_label 1 violence
-stim_times 2 …/O$ord.Dgt.txt ‘CSPLINzero(0,15,6)’
-stim_label 2 disgust
-stim_times 3 …/O$ord.Ero.txt ‘CSPLINzero(0,15,6)’
-stim_label 3 erotica
-stim_times 4 …/O$ord.Fam.txt ‘CSPLINzero(0,15,6)’
-stim_label 4 family
-stim_times 5 …/O$ord.Obj.txt ‘CSPLINzero(0,15,6)’
-stim_label 5 object
-stim_times 6 …/O$ord.Peo.txt ‘CSPLINzero(0,15,6)’
-stim_label 6 people
-jobs 2
-gltsym ‘SYM: +violence[2…4] -disgust[2…4]’
-bucket $sub.stats.GLTtest

OUTPUT:
GLT matrix from ‘SYM: +violence[2…4] -disgust[2…4]’:
0 0 1 1 1 1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Any suggestion would be greatly appreciated.

thanks,
nicola

any suggestion or comment?!

Hi Nicola,

That is certainly strange (I do not see such behavior
on a similar test here). What is the TR, 3 or 2.5?

  • rick

Oh wait, you are using CSPLINzero, not CSPLIN.

That means you should only have 4 parameters per
class, not 6, meaning 2…4 is actually out of range.
I hope you are getting more warnings out of this,
but it looks like 3dDeconvolve is actually applying
“+violence -disgust” (meaning [0…3] for each).

What is the complete text output?

In any case, think about that you really want, as
there are only 4 betas to begin with.

  • rick

Hmmmm. But the IRF output for CSPLINzero has 6 parameters: the 1st and 6th are 0 and then the are betas are at 1,2,3,4. So- are you saying that in 3dDeconvolve when we specify the “lag” (see below), we are supposed to change from 2…4 to 1…3? That seems OK, but is that documented anywhere do you know? thanks, nicola

So, for instance, following the -gltsym command, we were putting the lags of the STIM we wanted to use in the test.
Stim[2…7] = means put +1 in the matrix for lags 2…7 of Stim

And no - there are no errors - just the odd matrix which is impossible to understand?

Hi Nicola,

This is just a little confusing because the iresp options
have slightly different behavior than the betas, and it is
the betas that correspond to the gltsym indices.

The -iresp option shows a TR-locked time series (unless you
specify otherwise) for the duration of the CSPLIN. But the
betas (and regressors), which correspond to the stim class
indices in the GLTs, are as you specify with the parameters.

In this case I will assume your TR = 3s, since you say the
iresp output has 6 time points. But there are still only
4 regressors in the design matrix, because you used the
‘zero’ version of the basis function name. And since there
are only 4 regressors, the index of 4 is out of range, and
should give you an error message probably like:

** ERROR: selector index 4 is out of range 0…3

Though the command will still run (that is probably a
mistake, it should probably fail).

Yes, you should change 2…4 to 1…3 because the actual
basis function that you are using is CSPLIN(3,12,4). This
sort of confusion is why I suggest not using ‘zero’
versions of these basis functions. They are just a
programming convenience to assume the end points
are zero, rather than estimating them.

Forget +1 and such. I suggest not using CSPLINzero,
but using CSPLIN the way your really want to. Do you
want CSPLIN(3,12,4)? If so, use that instead.

Does this make sense?

  • rick

Yes that makes sense. Thanks alot.

One more question, if you don’t mind. Let’s say we use CSPLIN (3,12,4) and then do a contrast between 2 conditions at one lag. e.g:

+cond1[1] -cond2[1]

Will the coefficient that is printed for the glt at each voxel be the DIFFERENCE of the IRF’s for each condition for this at this timepoint?
i.e. will the coefficient = IRF.cond1[1]-IRF.cond2[1]?

In the 3dDeconvolve documentation, it indicates that the coefficient will be equal to hr[1] - he[1]
(see pg. 45, example 1.4.4.3)

thanks again, nicola & mb

Yes, that contrast should be the difference in lag 1
values (offset 6 seconds from the event times in this
case) between the cond1 and cond2 classes.

  • rick