TL;DR: Is it possible to generate “tent-wise” (stats and coefficient sub-bricks for each tent in the model) contrasts with REMLfit?

Hi,

we are doing some exploration of what kind of statistical analysis we are going to use for some within subject event-related data. Right now we are testing several of the options that AFNI has for unassumed response, and using REMLfit. At the moment we have some questions about generating beta coefficients for linear contrasts, when model parameters are estimated using TENT functions.

This is a simplified example, to explain our issue:

Design: GLM with several conditions (AX, AY, BX, BY), plus motion and baseline.

Model: Event related, with a 12 knots TENT → estimates 12 coefficients per condition

The beta coefficients in the Rbeta bucket ‘coeffs_REML.nii.gz’ for a couple of conditions (AY, BY) are:

```
-- At sub-brick #13 'AY#0' datum type is float: -10.5198 to 12.0947
-- At sub-brick #14 'AY#1' datum type is float: -14.4774 to 14.2492
-- At sub-brick #15 'AY#2' datum type is float: -10.7006 to 29.2615
-- At sub-brick #16 'AY#3' datum type is float: -10.4982 to 15.4763
-- At sub-brick #17 'AY#4' datum type is float: -11.3314 to 13.9812
-- At sub-brick #18 'AY#5' datum type is float: -18.0366 to 14.8256
-- At sub-brick #19 'AY#6' datum type is float: -10.8122 to 14.2825
-- At sub-brick #20 'AY#7' datum type is float: -11.169 to 13.0405
-- At sub-brick #21 'AY#8' datum type is float: -16.3513 to 13.9745
-- At sub-brick #22 'AY#9' datum type is float: -11.1111 to 19.9063
-- At sub-brick #23 'AY#10' datum type is float: -11.6218 to 12.7166
-- At sub-brick #24 'AY#11' datum type is float: -10.6524 to 12.1144
-- At sub-brick #49 'BY#0' datum type is float: -5.99066 to 8.83811
-- At sub-brick #50 'BY#1' datum type is float: -12.6251 to 8.76343
-- At sub-brick #51 'BY#2' datum type is float: -6.22629 to 8.00951
-- At sub-brick #52 'BY#3' datum type is float: -13.6331 to 11.808
-- At sub-brick #53 'BY#4' datum type is float: -7.90775 to 10.9032
-- At sub-brick #54 'BY#5' datum type is float: -7.14886 to 8.84861
-- At sub-brick #55 'BY#6' datum type is float: -12.3782 to 7.46458
-- At sub-brick #56 'BY#7' datum type is float: -7.29068 to 8.59295
-- At sub-brick #57 'BY#8' datum type is float: -9.93772 to 6.05665
-- At sub-brick #58 'BY#9' datum type is float: -8.36734 to 8.40712
-- At sub-brick #59 'BY#10' datum type is float: -7.23587 to 7.60442
-- At sub-brick #60 'BY#11' datum type is float: -6.90086 to 8.04251
```

With these coefficients we usually plot the mean response timeseries for each condition, obtained with 3dROIstats (masked with Gordon parcels).

What we want:

A mean response timeseries of the contrast AY-BY

What we have tried:

(1)

```
"gltsym 'SYM: +AY -BY' A_B" # yields only one sub-brick for coeff and one for t-stat in the Rglt bucket.
```

(2)

```
"gltsym 'SYM: +AY[0..11] -BY[0..11]' A_B" # same as in (1)
```

(3)

```
3dcalc -a 'coeffs_REML.nii.gz[13..24]' -b 'coeffs_REML.nii.gz[49..60]' -expr '(b-a)' -prefix A_B.nii.gz
# just a linear operation, so it generates the 12 sub-bricks of the conditions coefficients subtraction
```

About how the GLTs are performed, I’m wondering if (1) only takes the column specified by the onsets, meaning just the first tent, and that’s why it generates only one sub-brick. Or is it the result of averaging the pair-wise subtraction AY[j]-BY[j], for j in {1, 2, …,12}?

I thought specifying the glt in (2), with the tent columns indices, would result in 12 contrast coeffcients sub-bricks, one for each tent in the conditions, which was not the case. Is (2) just replicating the operation in (1), and the single sub-brick obtained in the Rglt bucket is an average?

Since (3) is a linear operation over the 12 estimated tent coefficients(the pair-wise subtraction mentioned above), this are the “tent-wise” coefficients for the linear contrast that we want right? Is there a way to do this directly with REMLfit or should we just use 3dcalc to calculate all our “tent-wise” linear contrasts?

Thanks,

Carolina.