which brick (out of two similar ones) is the t-statistic map?

Dear AFNI experts,

Two weeks ago I struggled to export the t-statistic map after a single subject analysis. I asked a question on the message board, did not get any help, but was later able to solve most of the problems by myself:

https://afni.nimh.nih.gov/afni/community/board/read.php?1,156394,156394#msg-156394

However, I still do not understand why two bricks in the ‘stats_REML’ output are so similar to each other, and which one is the t-statistic map for the H_0: no response to the stimulus. I am still not sure whether it is the statistic map in brick [2]:

– At sub-brick #0 ‘activation_stimulus#0_Tstat’ datum type is float: -6.67307 to 22.7179
statcode = fitt; statpar = 88

or the one in brick [7]:

– At sub-brick #0 ‘activity#0_Tstat’ datum type is float: -8.30011 to 19.8636
statcode = fitt; statpar = 88

The employed AFNI command was:

  afni_proc.py                                                                \
     -subj_id $subject                                                        \
     -script proc.$subject -scr_overwrite                                     \
     -tcat_remove_first_trs 0                                                 \
     -dsets ${path_data}/${subject}_${task}_bold.nii                          \
     -volreg_align_to third                                                   \
     -blur_size ${smoothing}.${zero_aux}                                      \
     -regress_stim_types AM1                                                  \
     -regress_stim_times                                                      \
        ${path_manage}/experimental_designs/AFNI_${study}_${exper_design}.txt \
     -regress_stim_labels activation_stimulus                                 \
     -regress_basis SPMG2(20)                                               \
     -regress_opts_3dD                                                        \
        -jobs 1                                                               \
        -gltsym 'SYM: activation_stimulus'                                    \
        -glt_label 1 activity                                                 \
     -regress_make_ideal_sum sum_ideal.1D                                     \
     -regress_run_clustsim no                                                 \
     -regress_est_blur_epits                                                  \
     -regress_est_blur_errts                                                  \
     -regress_reml_exec                                                       \
     -regress_opts_reml -Rwherr whitened_errts.${subject}_REML

I hope someone could give me a hint.

Best wishes,

Wiktor Olszowy

Hi Wiktor,

Sorry, almost all of us were away from the office on
and off two weeks ago.

The first volume is a Full F-stat, measuring the entire
model against the baseline. While this should show the
visual area (and any other main areas of activation), it
is usually not too much use beyond a QC check. In your
case, with only 1 condition of interest, it might be
basically the same as the “activation_stimulus” t-stat
map (squared).

There is no need for -gltsym ‘SYM: activation_stimulus’,
as the main betas are output by default.

What sorts of modulators do you have for AM1? If you
want the ability to differentiate areas that respond to
the modulation effect with ones that do not, use AM2.

Did you extract all of these volumes before running
3dinfo? You can run “3dinfo -verb” on main dataset
to get info for all volumes. The -verb option is so
that output is not limited to only the first 3.

3dinfo -verb stats.${subject}_REML+orig

The “activation_stimulus#0_Tstat” volume and the
“activity#0_Tstat” one should be basically the same.
That goes to the comment about not needing a GLT for
any single beta. The _Coef volumes should be identical.
You are asking for a GLT contrast that is identical to
the default output of the beta.

  • rick

Dear Rick,

Thanks a lot for your response! Regarding the use of 3dinfo, I was looking at single bricks using the square brackets, but it is indeed more convenient to use the -verb flag to see all of the information together. Thanks for the suggestion! Regarding GLT, I deleted the 4 lines:

-regress_opts_3dD \
-jobs 1 \
-gltsym ‘SYM: activation_stimulus’ \
-glt_label 1 activity \

And the file ‘stats.${subject_name}_REML’ consists now of 5 bricks rather than 8. These 5 bricks are the same as previously the first 5 ones. However, I am not sure if I understand the difference between AM1 and AM2. Now in ‘3dDeconvolve’ help I see that " ‘AM1’ is for special cases, and normally should not be used for FMRI task activation analyses!! " However, when I change AM1 to AM2, I run into errors I can not understand:

*+ WARNING: -------------------------------------------------
*+ WARNING: Problems with the X matrix columns, listed below:
*+ WARNING: !! * Column 4 [activation_stimulus#2] is all zeros
*+ WARNING: !! * Column 5 [activation_stimulus#3] is all zeros
*+ WARNING: -------------------------------------------------
*+ WARNING: !! in Signal+Baseline matrix:

  • Largest singular value=2.05851
  • 2 singular values are less than cutoff=2.05851e-07
  • Implies strong collinearity in the matrix columns!
    *+ WARNING: !! in Signal-only matrix:
  • Largest singular value=1.00013
  • 2 singular values are less than cutoff=1.00013e-07
  • Implies strong collinearity in the matrix columns!
    *+ WARNING: +++++ !! Matrix inverse average error = 0.0138889 ** BEWARE **
    ** ERROR: !! 3dDeconvolve: Can’t run past 5 matrix warnings without ‘-GOFORIT 5’
    ** ERROR: !! Currently at -GOFORIT 0
    ** ERROR: !! See file 3dDeconvolve.err for all WARNING and ERROR messages !!
    ** ERROR: !! Be sure you understand what you are doing before using -GOFORIT !!
    ** ERROR: !! If in doubt, consult with someone or with the AFNI message board !!
    ** FATAL ERROR: !! 3dDeconvolve (regretfully) shuts itself down !!

My afni_proc.py command is now:

afni_proc.py
-subj_id $subject
-script proc.$subject -scr_overwrite
-tcat_remove_first_trs 0
-dsets ${subject}${task}bold.nii
-volreg_align_to third
-blur_size 8.0
-regress_stim_types AM2
-regress_stim_times
AFNI
${study}
${exper_design}.txt
-regress_stim_labels activation_stimulus
-regress_basis ‘SPMG2(20)’
-regress_make_ideal_sum sum_ideal.1D
-regress_run_clustsim no
-regress_est_blur_epits
-regress_est_blur_errts
-regress_reml_exec
-regress_opts_reml -Rwherr whitened_errts.${subject}_REML

Do you know to what extent can the results differ/be biased if I leave AM1 (no errors)?

Best wishes,

Wiktor Olszowy

Hi Wiktor,

The main difference between AM1 and AM2 is that using
AM1 does not lead to any extra regressors, meaning the
modulation effect is assumed to exist. With AM2 there
will be one regressor for the unmodulated response and
one for the modulated response. That allows for some
brain areas to be affected by the modulator, and some
not.

In your case, it looks like there is a problem with the
modulator. What does the timing file look like?

For extra details on AM1 and AM2 regression, see the
class handout afni07_advanced.pdf , starting one page
12, and with useful plots on page 16. The top plot is
the single regressor used for AM1, while the bottom 2
plots are those used for AM2.

  • rick

Dear Rick,

Thank you so much for the response! Answering your question, the timing file is:

20:20 60:20 100:20

I am wondering what is the advantage of AM2 compared to AM1 if the duration times are the same (as it is in my example)? if I understand page 16 in the class handout you mentioned, the additional regressor will just be a constant. Maybe that causes the numerical problems? The GLM uses a constant too, so there are two constant-regressors.

Best wishes,

Wiktor Olszowy

Hi Wiktor,

Indeed, since all of the modulators are exactly 20,
there is no actual modulation, and that regressor
ends up as all zero, leading to the errors. There
is no reason have be the 20 there as a duration.
A duration of 20 s is already specified in the basis
function SPMG(20).

Also, given that 20 is a duration, the intention would
be to use duration modulation, which only applies to
the dmBLOCK() basis function.

In any case, just take out those modulators.

  • rick

Dear Rick,

Thanks a lot for your response! I understand that putting duration times twice for AM1 is not a problem, once in the timing file, once in -regress_basis ‘SPMG2(20)’, is it? I have already analyzed the data, would have to re-analyze, and my results make sense: there is a lot of significant activation in the visual cortex and the stimulus was visual. So I presume the duration times in the timing file could not have changed anything. Besides, when I leave the duration times in the timing file, so that it is:

20 60 100

I run into problems:

stim type 1 is married (AM1), but file (AM1.1D) is not

Best wishes,

Wiktor Olszowy

Yes, I would expect AM1 to not be affected, though it
should whine a bit.

When there is no duration or other modulator attached,
it is indeed considered an error to use AM1 or AM2.
Do not use those types in that case.

  • rick

Thanks a lot!

Best wishes,

Wiktor Olszowy