single subject ANOVA using 3dDeconvolve

Hi AFNI team,

I want to test the main effect of two factors (each has two levels, so it’s a 2*2 design) and their interaction effect in every single subject (if it’s a group analysis, it should be repeated-measure two-way anova). I read some posts before on this topic and I want to confirm here to make sure I did this correctly.

Experiment:
I have two factors, a and b, each has two levels (a1,a2 and b1,b2). In total I have four conditions (a1b1,a1b2,a2b1,a2b2). In each of these conditions, I test 9 different touch frequencies stimulation (I’ll use numbers f1:f9 to represent) during scanning. My goal is to find the brain regions that show the main effect of a or b, and the interaction effect.

Here is the contrast I plan to use:
main effect of a: +a1b1_f1 +a1b1_f2 … +a1b1_f9 +a1b2_f1 +a1b2_f2 … +a1b2_f9 -a2b1_f1 -a2b1_f2 … -a2b1_f9 -a2b2_f1 -a2b2_f2 … -a2b2_f9
main effect of b: +a1b1_f1 +a1b1_f2 … +a1b1_f9 +a2b1_f1 +a2b1_f2 + … +a2b1_f9 -a1b2_f1 -a1b2_f2 … -a1b2_f9 -a2b2_f1 -a2b2_f2 … -a2b2_f9
interaction effect: +a1b1_f1 +a1b1_f2 … +a1b1_f9 -a1b2_f1 -a1b2_f2 … -a1b2_f9 +a2b1_f1 +a2b1_f2 … +a2b1_f9 -a2b2_f1 -a2b2_f2 … -a2b2_f9

(the … represent all the frequency in the middle)

I also have two related questions here:

  1. Here I simply combined all the frequency together with + or - signs in each condition, because I don’t care about the effect of these conditions on a single frequency. So I’ll get a T stat for each of the three contrasts. However, I saw in some other posts that these analyses were done within each frequency, combined with the \ sign, and see the final F stats combining all the frequencies. Which one is more appropriate?

  2. It seems I can also add a coefficient in front of each condition like 0.0056. My understanding is that adding a coefficient or not, will not affect the final tstat or Fstat, but only the contrast coef value(which I’ll not use). Is this correct?

If would be nice if you can confirm this is correct or not!

Thank you!

–Lingyan

Lingyan,

I have two factors, a and b, each has two levels (a1,a2 and b1,b2). In total I have four conditions (a1b1,a1b2,a2b1,a2b2).
In each of these conditions, I test 9 different touch frequencies stimulation

Actually your experiment seems to be a 2 x 2 x 9 design. The specifications for the two main effects look fine, but the one for interaction

+a1b1_f1 +a1b1_f2 … +a1b1_f9 -a1b2_f1 -a1b2_f2 … -a1b2_f9 +a2b1_f1 +a2b1_f2 … +a2b1_f9 -a2b2_f1 -a2b2_f2 … -a2b2_f9

should be

+a1b1_f1 +a1b1_f2 … +a1b1_f9 -a1b2_f1 -a1b2_f2 … -a1b2_f9 -a2b1_f1 -a2b1_f2 … -a2b1_f9 -a2b2_f1 -a2b2_f2 … -a2b2_f9

I saw in some other posts that these analyses were done within each frequency, combined with the \ sign

That would be a different inference. For example,

+A
+B

is intended to set up a null hypothesis

H[sub]0[/sub]: A = 0 and B = 0

and to find out whether there is strong evidence for at least one of the effects.

I can also add a coefficient in front of each condition like 0.0056.

You could use a different weight (e.g., 0.0556) other than 1, and its impact is only on the interpretability of the effect estimate (beta), not the statistic value. Use 0.0556 if you care about the interpretability of the effect estimate.

Hi Gang,

Thanks for the reply. Let me make sure with you about the interaction, and let’s forget about the frequency just for simplicity:

my script was:
a1b1-a1b2-a2b1+a2b2
My understanding is: this is (a1b1-a1b2)-(a2b1-a2b2), it will contrast (b1-b2)'s differences in a1 and a2 condition, so that if there is any interaction effect, it will show.

Your suggestion was:
a1b1-a1b2-a2b1-a2b2
I don’t understand why this would be the way to show interaction.
according to https://afni.nimh.nih.gov/afni/community/board/read.php?1,72690,72714#msg-72714 , it seems my script was consistent with your previous post.

Can you elaborate a little bit?

Thank you!

my script was: a1b1-a1b2-a2b1+a2b2

If I didn’t misread your original specification, it was actually

a1b1-a1b2+a2b1-a2b2

Your suggestion was: a1b1-a1b2-a2b1-a2b2

I meant to show

a1b1-a1b2-a2b1+a2b2

but I forgot to change some of the signs after copy and paste.

Yes, thank you!

I think I meant to type the correct way but made a mistake. Thanks for correcting it!