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