2 Groups, Two-sample t-Test

742 views
Skip to first unread message

Marcel Daamen

unread,
Sep 26, 2014, 10:37:56 AM9/26/14
to snpm-s...@googlegroups.com
Hello,

I have just started working with the SnPM toolbox, and am confused by the output for the "2 Groups: Two-Sample t-test" module.

I can virtually replicate the original regional pattern from my SPM analysis (where Group B > Group A), when I do the SnPM analysis and choose "Display negative effects" for Inference (which should also test Group B > Group A?!).

So far, so good. What puzzles me is that the SnPM design matrix looks like a mirror image of the corresponding SPM design matrix (sorry, obviously I can't attach an image):

The positive contrast weight (=gray bar) appears over the first regressor, the negative over the second (like an A>B contrast in SPM). Yet, Group A images seem to be assigned to the second regressor, Group B to the first (assuming that white cells represent "1" coding). When I additionally review the design in the SnPM output.ps file, Group A images have Condition "1", Group B images have Condition "-1").

So my question: Does the "2 Groups: Two-Sample t-test" module actually switch the order of the two groups?

There was a rather old SPM posting that suggested this possibility for a different module, but I could not find (or missed) updated information.....

https://www.jiscmail.ac.uk/cgi-bin/webadmin?A2=ind03&L=SPM&D=0&I=-3&d=No+Match%3BMatch%3BMatches&P=1750528

Thanks in advance!

Best wishes,

Marcel

Thomas Nichols

unread,
Sep 26, 2014, 11:31:24 AM9/26/14
to Marcel Daamen, snpm-s...@googlegroups.com
Dear Marcel,

I fear this could be the case. I'll ask my post doc Camille to look into this.

Camille: can you see if this match is occurring.

-Tom
> --
> You received this message because you are subscribed to the Google Groups "Statistical Nonparametric Mapping" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to snpm-support...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Maumet, Camille

unread,
Sep 26, 2014, 12:46:07 PM9/26/14
to Marcel Daamen, snpm-support
Dear Marcel,

Thank you for your feedback. 

I can confirm that, in SnPM "2 Groups: Two-Sample t-test", the beta numbers are switched compared to SPM "Two-sample t-test". For two groups denoted by A and B, beta_001 would correspond to Group B and beta_002 to Group A in SnPM (while with SPM, beta_001=> to Group A and beta_002 => Group B).

While this can be confusing, it should not affect your analysis as a "Positive effect" nevertheless corresponds to Group A > Group B (as in SPM). 

I have attached two examples of contrasts obtained in SnPM "2 Groups: Two-Sample t-test" (SnPM_twosample.png) and SPM "Two-sample t-test" (SPM_twosample.png). In SnPM, both the contrast vector and the design matrix are reverted compared to SPM, leading overall to the same contrast. If this is different from what you observe, could you install the latest SnPM updates (available here) and let us know if this solved the issue? That would help me in investigating this further.

To avoid further confusion we will change the beta numbering to match SPM in the next SnPM update.

Best wishes,

Camille


On 26 Sep 2014, at 16:31, Thomas Nichols <ten.p...@gmail.com>
 wrote:

Dear Marcel,

I fear this could be the case.  I'll ask my post doc Camille to look into this.

Camille: can you see if this match is occurring.

-Tom

On Sep 26, 2014, at 3:37 PM, Marcel Daamen <burrhus.fred...@googlemail.com> wrote:

Hello,

I have just started working with the SnPM toolbox, and am confused by the output for the "2 Groups: Two-Sample t-test" module.

I can virtually replicate the original regional pattern from my SPM analysis (where Group B > Group A), when I do the SnPM analysis and choose "Display negative effects" for Inference (which should also test Group B > Group A?!).

So far, so good. What puzzles me is that the SnPM design matrix looks like a mirror image of the corresponding SPM design matrix (sorry, obviously I can't attach an image):

The positive contrast weight (=gray bar) appears over the first regressor, the negative over the second (like an A>B contrast in SPM). Yet, Group A images seem to be assigned to the second regressor, Group B to the first (assuming that white cells represent "1" coding). When I additionally review the design in the SnPM output.ps file, Group A images have Condition "1", Group B images have Condition "-1").

So my question: Does the "2 Groups: Two-Sample t-test" module actually switch the order of the two groups?

There was a rather old SPM posting that suggested this possibility for a different module, but I could not find (or missed) updated information.....

https://www.jiscmail.ac.uk/cgi-bin/webadmin?A2=ind03&L=SPM&D=0&I=-3&d=No+Match%3BMatch%3BMatches&P=1750528

Thanks in advance!

Best wishes,

Marcel

_______________________________
Camille Maumet, PhD
Postdoctoral Research Fellow
Neuroimaging Statistics
Institute of Digital Healthcare, Warwick Manufacturing Group
University of Warwick, Coventry  CV4 7AL, United Kingdom

burrhus.fred...@googlemail.com

unread,
Sep 27, 2014, 9:42:32 AM9/27/14
to snpm-s...@googlegroups.com, burrhus.fred...@googlemail.com, c.m.j....@warwick.ac.uk
Dear Camille, dear Tom,

I am grateful for your immediate feedback!

This resolves my confusion.... I can confirm, my output looks similar to your example, and is compatible with my correspending SPM results then. I'm already using the latest SnPM update (SnPM13_updates_1_00_2014-09-22).

Thank you very much!

Best wishes,

Marcel


Am Freitag, 26. September 2014 18:46:07 UTC+2 schrieb Maumet, Camille:
> Dear Marcel,
>
>
>
>
>
> Thank you for your feedback. 
>
>
>
>
>
> I can confirm that, in SnPM "2 Groups: Two-Sample t-test", the beta numbers are switched compared to SPM "Two-sample t-test". For two groups denoted by A and B, beta_001 would correspond to Group B and beta_002 to Group A in SnPM (while with SPM, beta_001=>
> to Group A and beta_002 => Group B).
>
>
>
>
>
> While this can be confusing, it should not affect your analysis as a "Positive effect" nevertheless corresponds to Group A > Group B (as in SPM). 
>
>
>
>
>
> I have attached two examples of contrasts obtained in SnPM "2 Groups: Two-Sample t-test" (SnPM_twosample.png) and SPM "Two-sample t-test" (SPM_twosample.png). In SnPM, both the contrast vector and the design matrix are reverted compared to SPM, leading overall to
> the same contrast. If this is different from what you observe, could you install the latest SnPM updates (available here) and let us know if this solved the issue? That would help me
> in investigating this further.
>
>
>
>
>
> To avoid further confusion we will change the beta numbering to match SPM in the next SnPM update.
>
>
>
>
>
> Best wishes,
>
>
>
>
>
> Camille
>
>
>
>
>
>
>
>
>
>
>
Message has been deleted

Thomas Nichols

unread,
Apr 23, 2018, 4:19:15 AM4/23/18
to khup...@umich.edu, Statistical Nonparametric Mapping
Hi Kathleen,

No, so sorry, we haven't fixed this yet!

I've made an issue to make sure we don't forget: https://github.com/SnPM-toolbox/SnPM-devel/issues/67

-Tom

On Thu, Mar 15, 2018 at 1:41 PM, <khup...@umich.edu> wrote:
Dear Dr. Nichols,

Has this issue been resolved yet? I am using SnPM13_updates_1_06, and it looks like the beta numbers are still switched in SnPM "2 Groups: Two-Sample t-test" compared to SPM "Two-sample t-test."

Camille's answer above resolves my confusion over this, but I was wondering if there are any more recent updates that I had missed that have resolved this?

Best,
Kathleen
--
You received this message because you are subscribed to the Google Groups "Statistical Nonparametric Mapping" group.
To unsubscribe from this group and stop receiving emails from it, send an email to snpm-support+unsubscribe@googlegroups.com.
To post to this group, send an email to snpm-s...@googlegroups.com.
Visit this group at https://groups.google.com/group/snpm-support.
To view this discussion on the web, visit https://groups.google.com/d/msgid/snpm-support/ea8907ad-874e-47f6-a628-2e3ec9fdd2cd%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
__________________________________________________________
Thomas Nichols, PhD
Professor of Neuroimaging Statistics
Nuffield Department of Population Health | University of Oxford
Big Data Institute | Li Ka Shing Centre for Health Information and Discovery
Old Road Campus | Headington | Oxford | OX3 7LF | United Kingdom
T: +44 1865 743590 | E: thomas....@bdi.ox.ac.uk
W: http://nisox.org | http://www.bdi.ox.ac.uk
Reply all
Reply to author
Forward
0 new messages