# What is the best regress basis of slow_event related design

Hi AFNI experts,
My experiment is a slow event related design, the experiment starts with a second of sound, then the next three seconds are the task time of event, and finally there is a time interval of 10 seconds between events, all the events are like this(1+3+10=14s). So what is the best regress basis of slow_event related design and how should I set up my regress basis, block or gam or tent?
Best regards,
QianqianWU

What is the time interval of interest for you: a second of sound, the three seconds of the task time of event, or the time interval of 10 seconds between events?

Gang Chen

Dear Gang
Thans for your relply. The time interval that I'am interested in is the three seconds of the task time of event. After reaing many case in AFNI discuss,maybe I shoud chose TENT(0,14,8) as the best regress basis, cause a week before,I used the GAM as the regress basis,that AFNI told me there's a lot of colinearity warnings.

Qianqian Wu

Using the tent basis function would definitely be more accurate in capturing the hemodynamic response profile. However, if the gamma basis function caused a collinearity problem, you might encounter a similar issue with the tent basis function. How many task conditions are in the experimental design? Is the interval between events fixed at 10 seconds? Could you share the stimulus timing information?

Gang Chen

Hi Gang
GraspLeftSmall,GraspLeftLarge,GraspRightSmall,OpenRightLarge)，
and the interval between events fixed at 10 seconds.We took 8 runs, randomly repeated each of the two paired conditions (for example: OpenLeftSmall-OpenLeftLarge; OpenRightSmall-OpenRightLarge; GraspLeftSmall-GraspLeftLarge; GraspRightSmall-OpenRightLarge) 25 times for each of the two runs.
Each event consists 1s(cue)+3s(haptical event)+10s(the interval between events).The timing of each stimulus presentation corresponded as follows：9 23 37 51 65 79 93 107 121 135 149 163 177 191 205 219 233 247 261 275 289 303 317 331 345. 9 represents the first eight seconds of each run plus the time of stimulus presentation，subsequent stimulus times were incremented by 14 seconds one by one (i.e., the time for each event).
And finally the collinearity problem prompted by afni

Have you already acquired the data? If not, consider spacing the events apart somewhat randomly, with a mix of 14s, 18s, 22s, 26s (for example). This will help with collinearity -- which happens strongly when the hemodynamic responses from one event mix up with the following event in exactly the same time relationship in every case.

Hi~
Thanks for your suggestion! In fact, I'm only acquired the data from one subject right now and would like to do some preprocessing steps first. Your suggestion will be carefully considered, thank you very much!
Now we are using TENT(0,14,7) as regress basis and there is no error reported about collinearity problem, but it prompts as follows
Number of time points: 1432(before censor); 1418 (after)
Number of parameters: 1816 [80 baseline ; 1736 signal]
ERROR: Regression model has too many parameters for dataset length :
FATAL ERRoR: 3dDeconvolve dies: Insufficient data (1418)for estimating 1816 parameters

To avoid the collinearity problem, it is very important to vary the inter-trial interval.

Does each condition have 25 trials? Are you analyze each trial separately? If your TR is 2 seconds, I suggest using `TENTzero(0,14,8)`.

Gang Chen

Hi Gang~
Each condition have 25 trials and I will analyze each trial separately.
I will try the new regress basis that you suggested, btw, I have a small question. For TENT(b,c,n)，does total time(14s) divided by TR(2s) equals the third parameter minus 1(n-1). I used TENT(0,14,7) as regress basis yesterday, and as I reply above, may be wrong.
And finally, I would like to ask if it is correct for me to add ''_IM'' after "stim_times" ? Or is it not necessary?
Qianqian Wu

What is your analytical goal: estimating the hemodynamic response at the condition level or the trial level? Additionally, could you share the `3dDeconvolve` script that led to the collinearity issue?

Gang Chen

Hi Gang
Our goal was to average the responses for the condition level and finally to compare between conditions.
As you suggested, there were no further collinearity problems after using TENTzero(0,14,8). But 3dDeconvolve.err reported an error as follows：
*+ WARNING: Smallest FDR q [4 OpenLeftSmall#1_Tstat] = 0.424979 ==> few true single voxel detections
*+ WARNING: Smallest FDR q [8 OpenLeftSmall#3_Tstat] = 0.103205 ==> few true single voxel detections
*+ WARNING: Smallest FDR q [17 OpenRightSmall#1_Tstat] = 0.999899 ==> few true single voxel detections
*+ WARNING: Smallest FDR q [19 OpenRightSmall#2_Tstat] = 0.9999 ==> few true single voxel detections
*+ WARNING: Smallest FDR q [21 OpenRightSmall#3_Tstat] = 0.106166 ==> few true single voxel detections
*+ WARNING: Smallest FDR q [23 OpenRightSmall#4_Tstat] = 0.110849 ==> few true single voxel detections
*+ WARNING: Smallest FDR q [30 OpenLeftLarge#1_Tstat] = 0.263192 ==> few true single voxel detections
*+ WARNING: Smallest FDR q [36 OpenLeftLarge#4_Tstat] = 0.158431 ==> few true single voxel detections
*+ WARNING: Smallest FDR q [43 OpenRightLarge#1_Tstat] = 0.349963 ==> few true single voxel detections
*+ WARNING: Smallest FDR q [45 OpenRightLarge#2_Tstat] = 0.124988 ==> few true single voxel detections
*+ WARNING: Smallest FDR q [47 OpenRightLarge#3_Tstat] = 0.12058 ==> few true single voxel detections
*+ WARNING: Smallest FDR q [58 GraspLeftSmall#2_Tstat] = 0.158148 ==> few true single voxel detections
*+ WARNING: Smallest FDR q [69 GraspRightSmall#1_Tstat] = 0.999886 ==> few true single voxel detections
*+ WARNING: Smallest FDR q [73 GraspRightSmall#3_Tstat] = 0.999898 ==> few true single voxel detections
*+ WARNING: Smallest FDR q [75 GraspRightSmall#4_Tstat] = 0.999895 ==> few true single voxel detections
*+ WARNING: Smallest FDR q [77 GraspRightSmall#5_Tstat] = 0.711281 ==> few true single voxel detections
*+ WARNING: Smallest FDR q [86 GraspLeftLarge#3_Tstat] = 0.99989 ==> few true single voxel detections
*+ WARNING: Smallest FDR q [90 GraspLeftLarge#5_Tstat] = 0.737431 ==> few true single voxel detections
*+ WARNING: Smallest FDR q [95 GraspRightLarge#1_Tstat] = 0.119459 ==> few true single voxel detections
*+ WARNING: Smallest FDR q [97 GraspRightLarge#2_Tstat] = 0.999898 ==> few true single voxel detections
*+ WARNING: Smallest FDR q [99 GraspRightLarge#3_Tstat] = 0.999899 ==> few true single voxel detections
*+ WARNING: Smallest FDR q [103 GraspRightLarge#5_Tstat] = 0.133745 ==> few true single voxel detections
Qianqian Wu

You can disregard those warnings. Instead, focus on verifying whether the estimated hemodynamic responses for those conditions appear reasonable and check for strong statistical evidence in the expected brain regions.

Gang Chen

Maybe that are warings and not errors, I will refer to some of the questions and answers from others