Hi Alain,


On 28 September 2015 at 08:07, Alain Imaging <[log in to unmask]> wrote:

Hi Anderson, 

thanks a lot for your answers, informative and priceless as usual!


I kind of got the entire picture, but I am not sure to understand the point made by Micheal Harms and what do you mean when it says the "the interaction terms there makes the equivalences between (1) and (2) to longer hold".


For a simpler model (without the interaction), reversing the EV of interest and the response variable yields the same result, but the interaction term clouds the matters, unless everything were orthogonal to everything, that is, there were no effect, or -- and here is an interesting bit -- if the interaction between SNP and whatever is on the left side of the equation (shape or cognition) were also included in the model (i.e., a second interaction term in the same model).

Since shape is voxelwise, you can't do it in SPSS anyway.

 


Also, about the averaging and the possibility of "losing" the effect after the spatial average has been computed, even if on a certain level I do get it, there's a part of me, let's say the one fed with common belief and "lay man statistic" that can not completely wrap his head around it. I mean: let's say that I run a simple correlational design between grey matter volume and age. Let's also say that I find a cluster of positive associations. I could use this cluster as an ROI, average the GMV in the ROI and then calculate again the correlation between this value and age along subject. In this case I DO expect to find a correlation, and the first reviewer passing by would shoot me for double dipping. Exactly why this should be different for a linear model with more parameter than one ?


Unless there is no effect anywhere, or the extra interaction term I just mentioned above, the models (1) and (2) are different, and will not yield the same results.

All the best,

Anderson

 


Thanks again 

Best

A.




De : FSL - FMRIB's Software Library <[log in to unmask]> de la part de Anderson M. Winkler <[log in to unmask]>
Envoyé : samedi 26 septembre 2015 10:35
À : [log in to unmask]
Objet : Re: [FSL] can't replicate effects found with randomize using SPSS
 
Hi Alain,

Michael Harms (WashU) emailed pointing out that the interaction term there makes the equivalences between (1) and (2) to longer hold. MH is right: we'd need a very peculiar scenario for it to be valid, with all EVs orthogonal to each other (which would also imply no effect), none of which is ever the case with real data.

Regarding the original question (why SPSS doesn't give the same result), it's related to the average issue.

All the best,

Anderson



On 25 September 2015 at 07:31, Anderson M. Winkler <[log in to unmask]> wrote:
PS: Sorry, now I see I committed two errors when typing:
- I used gamma_s twice in (2), but the text description should be clear.
- The only new piece given by (2) is the effect of SNP on cognition while having shape as nuisance, not on imaging.

On 25 September 2015 at 07:10, Anderson M. Winkler <[log in to unmask]> wrote:
Hi Alain,

Please, see below:


On 24 September 2015 at 10:53, Alain Imaging <[log in to unmask]> wrote:

Hi everyone,


I have a strange situation going on with randomize and I would really need some help.


I am performing shape analysis of the striatum in a large sample. I perforemd the FIRST segmentation and now I am assessing the effect of various SNPs on local volume using randomise.


I am using the following matrix

/NumWaves 9

/NumPoints 487

/PPheights 6.00E+01

/Matrix

-14.93 -.63 9.41 1 -1 -1 -1 -1 1
8.07 .37 2.99 1 -1 -1 1 -1 -1
-8.93 -.63 5.63 -1 -1 -1 -1 -1 -1
8.07 -.63 -5.08 1 -1 -1 -1 -1 1
-4.93 .37 -1.82 -1 -1 -1 1 -1 -1
8.07 .37 2.99 1 -1 -1 -1 1 -1

[TRUNCATED]

The first columns is a mean centered cognitive variable, the second column is the mean centered SNP (coded as the beginning as -1/1), the third columns is the interaction between the first two, calculated as the arithmetic multiplication, then there are gender and site of acquisition of the scan.


There seems to be more columns. One of these needs to be a column full of ones, or the data needs to be mean-centered (use -D)
 


And then I test f contrast and t contrast for the main effect of the SNPs and the interaction between SNPs and a cognitive variable.

The .con matrix looks as follow


/ContrastName1 main 1 

/ContrastName2 main 2

/ContrastName3 Interaction

/ContrastName4 Gender

/NumWaves 9

/NumContrasts 4

/PPheights 6.000000e+01 6.000000e+01

/RequiredEffect 0.681 0.681


/Matrix

1 0 0 0 0 0 0 0 0 0

0 1 0 0 0 0 0 0 0 0

0 0 1 0 0 0 0 0 0 0

0 0 0 1 0 0 0 0 0 0



The .fts matrix looks as follow


/NumWaves 4

/NumContrasts 4


/Matrix

1 0 0 0

0 1 0 0

0 0 1 0

0 0 0 1



This is fine.
 

I am proceeding like this: at first I look at the f contrast, then, if the f contrast is significant, I peek at the t contrast.


This is fine: the F-test here is as a two-tailed t-test and the error rate is protected.
 


For several of the SNPs I am looking at both the main effect of the SNP and the interaction between SNP and cognition is significant. 


Now, the model that I am testing with randomise here is something like (1) Shape ~ a + B Cognition + B SNP + B Cognition x SNP + Covariables. I wanted to test rather if (2)Cognition ~  a + B Shape + B SNP + B Shape x SNP + Covariables.


It isn't necessary to run the 2nd model. I'll write again in a slightly different way:

(1) Shape = intercept + Cognition*beta_c + SNP*beta_s + Cognition(.)SNP*beta_i + covariates

(2) Cognition = intercept + Shape*gamma_s + SNP*gamma_s + Shape(.)*SNP*gamma_i + covariates

In the above, the (.) represents the elementwise product used to produce the interaction EV (i.e., the Hadamard product).

It turns out that inference on beta_c (effect of cognition on shape) is the same as inference on gamma_s (effect of shape on cognition). Likewise, inference on beta_i (interaction effect Cognition by SNP on Shape) should be the same as inference on gamma_i (interaction effect Shape by SNP on Cognition). The only new information given by (2) is the effect of SNP on imaging, while having shape as nuisance, but then compared to (1), the effect of SNP on shape isn't computed.

In any case, you can run (2) in randomise. Take your current Shape NIFTI file, average across the 4th dimension, binarise it creating a mask, then create a new 4D NIFTI file that has, at each volume, this mask multiplied by the Cognition score for that subject. Use Shape as a voxelwise EV, as well as Shape(.)SNP (you'll need to make this product by hand too).


In order to do this, I have extracted the average shape value from the cluster that were significant,e.g., for the main effect of one of the SNP (as tested by the t contrast number 1 in the .con matrix). Then I used the values from all my subjects to perform  linear model (2) in SPSS. 


Here came the surprise: I could not indeed replicate the main effect of the SNP in SPSS. And this is happening for several SNPs, and the same is happening if I follow the same logic trying to test for interaction in SPSS.


Once the average across space has been computed, there's no guarantee that the result is the same any more. To replicate results, it has to remain a voxelwise test, something that SPSS cannot do.

All the best,

Anderson


 


Is there something intrinsically wrong that I am doing ?


Is this normal ?


Any hint or suggestion is more than welcome


Alain