AFNI Message Board

Dear AFNI users-

We are very pleased to announce that the new AFNI Message Board framework is up! Please join us at:

https://discuss.afni.nimh.nih.gov

Existing user accounts have been migrated, so returning users can login by requesting a password reset. New users can create accounts, as well, through a standard account creation process. Please note that these setup emails might initially go to spam folders (esp. for NIH users!), so please check those locations in the beginning.

The current Message Board discussion threads have been migrated to the new framework. The current Message Board will remain visible, but read-only, for a little while.

Sincerely, AFNI HQ

History of AFNI updates  

|
December 07, 2016 03:23PM
Hi

we recently had a problem regarding how to do a ttest as ((A-B) - (C-D)) and it was suggested that we create a contrast using 3dCalc to create the contrast for A-B and C-D per subject and then use 3dTtest to compare the two terms. I have included below the emails for reference.

However I have one more question. When I perform the 3dCalc should I be coding it as (A-B)/2 or just (A-B)?

For Example:

3dcalc -a "file name for sub brick / condition A" -b "file name for sub brick / condition B" -expr '(a-b)/2' -prefix ...

ie: 3dcalc -a /nfs/mint/MINT_A/${subj}_A/${subj}_A.pomp.results.2mm/stats.ForvBack.partialcorrectglt2mm.sep16.$subj+tlrc'[52]' \
-b /nfs/mint/MINT_A/${subj}_A/${subj}_A.pomp.results.2mm/stats.ForvBack.partialcorrectglt2mm.sep16.$subj+tlrc'[49]' \
-expr '(a-b)/2' -prefix ${subj}__dec2016_4_minus_3_div_2

or should it be

3dcalc -a "file name for sub brick / condition A" -b "file name for sub brick / condition B" -expr '(a-b)' -prefix ...

ie: 3dcalc -a /nfs/mint/MINT_A/${subj}_A/${subj}_A.pomp.results.2mm/stats.ForvBack.partialcorrectglt2mm.sep16.$subj+tlrc'[52]' \
-b /nfs/mint/MINT_A/${subj}_A/${subj}_A.pomp.results.2mm/stats.ForvBack.partialcorrectglt2mm.sep16.$subj+tlrc'[49]' \
-expr '(a-b)' -prefix ${subj}__dec2016_4_minus_3_div_2


-----Original Message-----
From: Richard Reynolds [mailto:reynoldr@mail.nih.gov]
Sent: Monday, December 05, 2016 7:02 AM

Hi Prerona,

Note that the 2 paired tests that you already ran should
be identical to 1-sample tests if the contrasts were given
as input. Do you have those contrasts per subject? If
not, perhaps it would be worth running 3dcalc to compute
them (they do not have to come directly from 3dDeconvove,
but should be identical to what 3dcalc would give).

Then your group comparison becomes a 2-sample t-test of
the contrasts.

Note that 3dttest++ will not compute that extra contrast
beforehand, which is why I suggest 3dcalc, if you do not
already have those volumes.

Anyway, feel free to continue this on the message board.
Just let me know if there is still any issue with your
login or account info.

- rick


On 12/04/2016 01:06 AM, Prerona Mukherjee wrote:

>
>
> I have 2 sub-bricks in my regressions:
>
>
> 1) Forwards Recall
>
> 2) Backwards Recall
>
> and 2 groups:
>
>
> 1) ADHD
>
> 2) Controls
>
>
> I want to do a t-test to compare
>
> {(back - forwards) in Controls} - {(back - forwards) in ADHD}
>
>
> I did t-tests as:
>
>
> 1) for Controls - Forwards Recall versus Backwards Recall
>
> 2) for ADHD - Forwards Recall versus Backwards Recall
>
>
> Now I am trying to do the t-test between the 2 groups
>
>
> For this can I use a 3dT-test++ in AFNI? I tried it but I am getting an error saying that we need to put at least 2 datasets in set A. I also tried using the Singleton option instead of set but that also gave me an error
>
> Can you suggest what I am getting wrong? Thanks so much!
>
>
> Sincerely
>
> Prerona
>
Subject Author Posted

correct expression for 3dCalc

prerona December 07, 2016 03:23PM

Re: correct expression for 3dCalc

rick reynolds December 08, 2016 12:52PM

Re: correct expression for 3dCalc

prerona December 08, 2016 08:33PM