Correlating HRF estimates with behaviors

Dear AFNI experts,

I have an experiment where I ran 3dDeconvolve on subjects to approximate the HRF using 9 TENT functions. I want to see if the activity in some ROIs correlates with behavioral scalar values (i.e., just one value for each subject). These ROIs were identified as having the largest interaction effects between my two within and between groups of interest when running group level 3dMSS.

I computed the AUC with trapezoidal integration on each subject's HRF using the beta values for the TENT functions within a mask defined by each ROI, and correlated these with each subject's behavioral measure. However, even before I correlate with behavioral measures, the AUC is not different between the two experimental groups, despite the HRF being different at the 3dMSS level. I understand that it is possible to have 3dMSS show a significant interaction between two groups that may have HRFs that integrate to the same value because the null is simply that the HRFs h'(t) = 0 (Chen et al. 2023). For example, h1(t) = t and h2(t) = -t would show up as significant but have the same AUC. However, that isn't the case here, as the "painless" condition almost certainly has a larger AUC than "pain":

The HRFs here look untraditional partly because of an odd experimental design.

Is this the right approach? I'm worried that some subjects may be throwing the results off by having "jagged" or "weird" HRF shapes. Subjects with these HRFs would be "weighted" the same as other subjects. Is this a valid concern? Or is it possible that my effect is too small to detect inter-individual differences without 3dMSS smoothing?

The values displayed in the attached plot are unclear—are they the estimated hemodynamic response or the estimated slope effects of the behavioral measure for a particular individual? Rather than using the integrated UAC value, how about applying the same population-level modeling strategy for the slope effects using 3dMSS?

Gang Chen

The top left plot is the estimated HRF in the ROI for the pain (red) and control (green) groups. This one is a population-level result.

I think the population-level modeling strategy to investigate behavioral measures sounds good, but I'm not sure how I would implement it in AFNI. Here is my current model specification:

3dMSS -prefix output_contrast_filtered -jobs 16 \
	-lme 's(TENT,k=9)+s(TENT,k=9,by=pain)' \
	-ranEff 'list(Subj=~1)' \
	-qVars 'pain,TENT' \
	-prediction @HRF.contrast.table \
	-dataTable @contrast_table.tsv

I understand that the s(TENT,k=9,by=pain) part is the interaction b/w the HRF and the pain group. However I'm not sure how I would add the behavior measures to this if they are continuous (for example, depression score).

I misunderstood the situation. How about trying the following 3dMSS script?

3dMSS -prefix output_contrast_filtered -jobs 16 \
	-lme 'behavioral_value+s(TENT,k=9)+s(TENT,k=9,by=pain)' \
	-ranEff 'list(Subj=~1)' \
	-qVars 'behavioral_value,pain,TENT' \
	-prediction @HRF.contrast.table \
	-dataTable @contrast_table.tsv

Gang Chen

Thanks! I copied that specification over, but I'm not sure how I should change the prediction table. I am trying to change my prediction table to align with this, but I'm not sure how. Looking at the 3dMSS documentation, it seems like I would need to add 9 age (or behavioral_value) rows per subject, one for each TENT function? I'm not sure what to put here

Here is my old prediction table for reference:

label	pain	TENT
g1t1	0.5	0
g1t2	0.5	1
g1t3	0.5	2
g1t4	0.5	3
g1t5	0.5	4
g1t6	0.5	5
g1t7	0.5	6
g1t8	0.5	7
g1t9	0.5	8
g2t1	-0.5	0
g2t2	-0.5	1
g2t3	-0.5	2
g2t4	-0.5	3
g2t5	-0.5	4
g2t6	-0.5	5
g2t7	-0.5	6
g2t8	-0.5	7
g2t9	-0.5	8

Would I modify it to this, where each subject has 9 rows?

label	behavior	pain	TENT
g1t1	2.2	0.5	0
g1t2	2.2	0.5	1
g1t3	2.2	0.5	2
g1t4	2.2	0.5	3
g1t5	2.2	0.5	4
g1t6	2.2	0.5	5
g1t7	2.2	0.5	6
g1t8	2.2	0.5	7
g1t9	2.2	0.5	8
g1t1	5.3	0.5	0
g1t2	5.3	0.5	1
g1t3	5.3	0.5	2
g1t4	5.3	0.5	3
g1t5	5.3	0.5	4
g1t6	5.3	0.5	5
g1t7	5.3	0.5	6
g1t8	5.3	0.5	7
g1t9	5.3	0.5	8
...			
g2t1	3.3	-0.5	0
g2t2	3.3	-0.5	1
g2t3	3.3	-0.5	2
g2t4	3.3	-0.5	3
g2t5	3.3	-0.5	4
g2t6	3.3	-0.5	5
g2t7	3.3	-0.5	6
g2t8	3.3	-0.5	7
g2t9	3.3	-0.5	8
g2t1	1.1	-0.5	0
g2t2	1.1	-0.5	1
g2t3	1.1	-0.5	2
g2t4	1.1	-0.5	3
g2t5	1.1	-0.5	4
g2t6	1.1	-0.5	5
g2t7	1.1	-0.5	6
g2t8	1.1	-0.5	7
g2t9	1.1	-0.5	8

You may include a centered value (e.g., the group mean) for the behavioral measure in the prediction table. However, this may not be essential, as the focus of your analysis in this case is on the effect of behavior rather than the predicted hemodynamic responses.

Gang Chen

I ran that model and it worked, but I think I'm looking for a different analysis--sorry, I should have been more clear.

I have two groups, pain and healthy, who are receiving taste or tasteless stimuli. I'm trying to see how much the behavioral value (eg depression or BMI) modulates the HRF in some ROI in response to a tasty stimulus, and I'm also interested in seeing if this behavior-HRF modulation differs between pain and healthy groups. In a canonical HRF analysis, I would do this by correlating the average beta value in that ROI for each subject with their depression score, but since the HRF has 9 beta values, this is more complicated. I tried doing numerical integration on each subjects' HRF from 3dDeconvolve to get a single number for each subject but there seems to be a lot of noise.

Is there any way to solve this issue with some other population level analysis using 3dMSS? Please let me know if this doesn't make sense and I can try to clarify! Thanks again for all the help.

Thanks for the clarifications!

I don’t have a straightforward solution using 3dMSS at the moment. However, an approximate approach with 3dMVM or 3dLMEr might be worth trying:

3dMVM -prefix ...               \
      -bsVars 'pain*behavior'   \
      -wsVars 'TENT'            \
      -qVars 'behavior'         \
      -dataTable @contrast_table.tsv

In this setup, the interaction TENT:behavior approximately represents the association between behavior and the tasty stimulus, while TENT:pain:behavior indicates the difference in this association between pain and healthy groups.

This approximate method is illustrated in the middle column of Figures 4-8 in the HDR estimation paper. The rationale for the approximation is provided in an old paper. Let me know if this approach is helpful for your analysis.

Gang Chen

I think that worked! I'll take a closer look at the paper to make sure I'm interpreting everything right. Thanks again!