Nonparametric wild bootstrap setup and TFCE outputs

145 views
Skip to first unread message

Sherry Chen

unread,
Dec 22, 2020, 8:57:39 AM12/22/20
to SwE-Toolbox Support
Dear SwE experts,

I have two questions about the nonparametric wild bootstrap setup and the interpretation on the TFCE outputs. 

To my understanding, unlike the parametric mode allowing successive specification of contrast like in SPM, contrast vector is required at the time of model configuration for the nonparametric wild bootstrap. That is, the contrast has to be specified before the model is estimated and only one contrast can be specified per model. Let's say I would like to investigate the group differences of longitudinal changes between group A and group B. The covariates that were included in the design were "groupA visitA_crossCoV visitA_longCov groupB visitB_crossCov visitB_longCov". The contrast could be something like "0 0 1 0 0 -1". Am I correct here? 



Second, I noticed that even though I only specified one contrast SwE returned results of two contrasts naming as  "swe_tfce_lpFWE-WB_c01.nii" and "swe_tfce_lpFWE-WB_c02.nii". According to the manual, these results were known as "lp{+ -}" in previous versions of the toolbox. Does this mean no matter what direction specified for the contrast, positive or negative, SwE would return both the positive and negative results?

Thanks heaps for this longitudinal toolbox! Any feedback would be appreciated!

Best,
Sherry

Sherry Chen

unread,
Dec 22, 2020, 9:01:48 AM12/22/20
to SwE-Toolbox Support
design.png

This is a screenshot of the nonparametric wild bootstrap setup.

Thomas Nichols

unread,
Dec 22, 2020, 9:27:31 AM12/22/20
to swe-t...@googlegroups.com
Dear Sherry,

I have two questions about the nonparametric wild bootstrap setup and the interpretation on the TFCE outputs. 

To my understanding, unlike the parametric mode allowing successive specification of contrast like in SPM, contrast vector is required at the time of model configuration for the nonparametric wild bootstrap. That is, the contrast has to be specified before the model is estimated and only one contrast can be specified per model.

That is correct.  Because the wild bootstrap distribution estimated is specific to the particular contrast investigated.
 
Let's say I would like to investigate the group differences of longitudinal changes between group A and group B. The covariates that were included in the design were "groupA visitA_crossCoV visitA_longCov groupB visitB_crossCov visitB_longCov". The contrast could be something like "0 0 1 0 0 -1". Am I correct here? 

Yes, that is correct!
 
Second, I noticed that even though I only specified one contrast SwE returned results of two contrasts naming as  "swe_tfce_lpFWE-WB_c01.nii" and "swe_tfce_lpFWE-WB_c02.nii". According to the manual, these results were known as "lp{+ -}" in previous versions of the toolbox. Does this mean no matter what direction specified for the contrast, positive or negative, SwE would return both the positive and negative results?

That's right; since we can obtain the negative changes "for free" it seemed silly not to save them out.

-Tom
 

Thanks heaps for this longitudinal toolbox! Any feedback would be appreciated!

Best,
Sherry

--
You received this message because you are subscribed to the Google Groups "SwE-Toolbox Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swe-toolbox...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/swe-toolbox/836099bc-8b49-4282-9971-6b3cc2087203n%40googlegroups.com.

Sherry Chen

unread,
Dec 22, 2020, 10:24:01 PM12/22/20
to SwE-Toolbox Support
Dear Tom,

Thanks so much for your prompt reply! I really appreciate it!

Just one more question about the model design. In addition to the group differences in longitudinal brain changes, I also want to see if these changes were associated with cognitive changes over time. To do so, can I include a covariate of demeaned cognitive scores, say "cog", and set a simple contrast with only the "cog" labeled with "1/-1"? The final design would be "group A  visitA_crossCov  visitA_longCov   cogA  groupB  visitB_crossCov  visitB_longCov  cogB  TIV", and the contrast of the associations for group A would be "0 0 0 -1 0 0 0 0 0". Is this correct?

I had the design attached here. Just want to double check with you if this design does make sense. Thanks in advance!

 model.png


Best,
Sherry

Thomas Nichols

unread,
Dec 23, 2020, 7:29:01 AM12/23/20
to swe-t...@googlegroups.com
Dear Sherry,

Just one more question about the model design. In addition to the group differences in longitudinal brain changes, I also want to see if these changes were associated with cognitive changes over time. To do so, can I include a covariate of demeaned cognitive scores, say "cog", and set a simple contrast with only the "cog" labeled with "1/-1"? The final design would be "group A  visitA_crossCov  visitA_longCov   cogA  groupB  visitB_crossCov  visitB_longCov  cogB  TIV", and the contrast of the associations for group A would be "0 0 0 -1 0 0 0 0 0". Is this correct?

Yes. 

Looking at the design matrix below, the only thing that concerns me is that variables for Group A should be all zero for Group B rows, and Group B should be all zeros for Group A rows.  From the image below it seems like that this isn't the case.  Can you check this? 

The best way to construction your design matrices for SwE is to build them up for all groups together, do whatever centering you need to do (for all groups together), and then only at the last stage split up the covariates by group, filling in zeros as appropriate.  (BTW, I don't mean to say that you must split TIV... keeping that as a main effect is fine.

Let me know if this all makes sense.

-Tom

 

I had the design attached here. Just want to double check with you if this design does make sense. Thanks in advance!

 model.png


Best,
Sherry

On Tuesday, 22 December 2020 at 22:27:31 UTC+8 ten.p...@gmail.com wrote:
Dear Sherry,

I have two questions about the nonparametric wild bootstrap setup and the interpretation on the TFCE outputs. 

To my understanding, unlike the parametric mode allowing successive specification of contrast like in SPM, contrast vector is required at the time of model configuration for the nonparametric wild bootstrap. That is, the contrast has to be specified before the model is estimated and only one contrast can be specified per model.

That is correct.  Because the wild bootstrap distribution estimated is specific to the particular contrast investigated.
 
Let's say I would like to investigate the group differences of longitudinal changes between group A and group B. The covariates that were included in the design were "groupA visitA_crossCoV visitA_longCov groupB visitB_crossCov visitB_longCov". The contrast could be something like "0 0 1 0 0 -1". Am I correct here? 

Yes, that is correct!
 
Second, I noticed that even though I only specified one contrast SwE returned results of two contrasts naming as  "swe_tfce_lpFWE-WB_c01.nii" and "swe_tfce_lpFWE-WB_c02.nii". According to the manual, these results were known as "lp{+ -}" in previous versions of the toolbox. Does this mean no matter what direction specified for the contrast, positive or negative, SwE would return both the positive and negative results?

That's right; since we can obtain the negative changes "for free" it seemed silly not to save them out.

-Tom
 

Thanks heaps for this longitudinal toolbox! Any feedback would be appreciated!

Best,
Sherry

--
You received this message because you are subscribed to the Google Groups "SwE-Toolbox Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swe-toolbox...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/swe-toolbox/836099bc-8b49-4282-9971-6b3cc2087203n%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "SwE-Toolbox Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swe-toolbox...@googlegroups.com.

Sherry Chen

unread,
Dec 23, 2020, 9:16:34 AM12/23/20
to SwE-Toolbox Support
Dear Tom,

This is also what confused me. I did compute the variables for all groups together. I then split them up by groups and filling in zeros. I did this in an EXCEL spreadsheet. Variables for Group A were all zeros for Group B rows. As you can see here, however, the grey scale for the zeros is really weird. Is it possible that the grey scale is determined based on the variance of the variables? I had my SwE.mat attached here for your reference.

Please let me know if anything is unclear.

Thanks,
Sherry

Sherry Chen

unread,
Dec 23, 2020, 9:25:59 AM12/23/20
to SwE-Toolbox Support
It seems that the .mat cannot be attached with the post. Please check the file via the link below. Thanks!



Thomas Nichols

unread,
Jan 1, 2021, 8:23:21 AM1/1/21
to swe-t...@googlegroups.com
Dear Sherry,

I'm sorry for the delay over the holidays.  I'm afraid I can't open that link (it directs me to a page to select my institution, from a list of only Australian and New Zealand institutions).

ANYWAY, it could just be a trick of the design matrix visualisation.  The best way to check exactly what is going on is to check the design matrix stored within the SwE.mat structure.

Do this:
load SwE.mat
X = SwE.xX.X;
and then examine the matrix X... e.g. with imagesc(X) or by inspecting the individual elements.  As long as you see the exact zeros where you expect them you're all good!

-Tom



On Wed, Dec 23, 2020 at 2:26 PM Sherry Chen <sherry...@gmail.com> wrote:
It seems that the .mat cannot be attached with the post. Please check the file via the link below. Thanks!



--
You received this message because you are subscribed to the Google Groups "SwE-Toolbox Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swe-toolbox...@googlegroups.com.

Sherry Chen

unread,
Jan 5, 2021, 10:19:06 AM1/5/21
to SwE-Toolbox Support
Dear Tom,

No worries at all. I hope you had a great holiday.

Sorry for my mistake. The link that I attached was incorrect. Please check the link below:

Thank you for your advices. I have double checked the .mat file. The matrix is exactly what I expected. The design figure was produced automatically by the design setup function of SwE toolbox. No idea why the zeros looked so different from the designs that were posted in this group. 

I would greatly appreciate it if you kindly have a quick look at my .mat file, just for peace of mind.

Thank you as always,
Sherry

Thomas Nichols

unread,
Jan 6, 2021, 6:36:26 AM1/6/21
to swe-t...@googlegroups.com
Dear Sherry,

Sorry for my mistake. The link that I attached was incorrect. Please check the link below:

Got it.
 
Thank you for your advices. I have double checked the .mat file. The matrix is exactly what I expected. The design figure was produced automatically by the design setup function of SwE toolbox. No idea why the zeros looked so different from the designs that were posted in this group. 

There is a design matrix scaling that takes place to make the image sensible even if the design matrix has weird scale.

I would greatly appreciate it if you kindly have a quick look at my .mat file, just for peace of mind.

Everything looks fine in that design you sent.

-Tom
 

Thank you as always,
Sherry


On Friday, 1 January 2021 at 21:23:21 UTC+8 ten.p...@gmail.com wrote:
Dear Sherry,

I'm sorry for the delay over the holidays.  I'm afraid I can't open that link (it directs me to a page to select my institution, from a list of only Australian and New Zealand institutions).

ANYWAY, it could just be a trick of the design matrix visualisation.  The best way to check exactly what is going on is to check the design matrix stored within the SwE.mat structure.

Do this:
load SwE.mat
X = SwE.xX.X;
and then examine the matrix X... e.g. with imagesc(X) or by inspecting the individual elements.  As long as you see the exact zeros where you expect them you're all good!

-Tom



On Wed, Dec 23, 2020 at 2:26 PM Sherry Chen <sherry...@gmail.com> wrote:
It seems that the .mat cannot be attached with the post. Please check the file via the link below. Thanks!



--
You received this message because you are subscribed to the Google Groups "SwE-Toolbox Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swe-toolbox...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "SwE-Toolbox Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swe-toolbox...@googlegroups.com.

Sherry Chen

unread,
Jan 6, 2021, 6:38:42 AM1/6/21
to SwE-Toolbox Support
Thank you so much for your input Tom! I really appreciate it!!
Reply all
Reply to author
Forward
0 new messages