Dear Mike,

I am a researcher at Indian Institute of Technology Kanpur, India. I have been benefitting from your books from past several years and got your valuable suggestions in the issues faced by me in our earlier google forum.

Currently I am using Loreta software for my Phd work since last six months. I have been facing an issue. I tried resolving it but could not do so. It would of great help if you could help me to resolve it.

While applying Non-parmetric permutation t statistics in my analysis of comparing two conditions, I got significant difference between the two conditions. And this was in accordance with my hypothesis. However when I wrote my own code as guided by your book in Matlab in trying to replicate the statistics done by Loreta software I found different results ( loreta could perform better). I felt that t test statistics used by Loreta software is a bit more refined than that used by Matlab. I even got different result when I did the analysis t -statistics, Parametric (without any randomised permutation involved ) in comparing both the conditions. Your comments on the above issue would be highly appreciated. Waiting eagerly for your early response.

the paper which Loreta software referred for Non-parametric permutation based statistics is

Nichols, T. E., & Holmes, A. P. (2002). Nonparametric permutation tests for functional neuroimaging: a primer with examples. *Human brain mapping* , *15* (1), 1-25.

where under the section statistics talks about *random effects* model incorporating variability in activation from subject-to-subject

it reads out as below :

**Statistic**

Note that the permutations arrived at above permute across subjects, such that subject-to-subject differences in activation (expressed through the as yet unspecified statistic) will be represented in the permutation distribution. Because subject-to-subject differences in activation will be present in the permutation distribution, we must consider a voxel statistic that accounts for such inter-subject variability, as well as the usual intra-subject (residual) error variance. Thus we must use a *random effects* model incorporating a random subject by condition interaction term (many published analyses of multi-subject and group com- parison experiments have not accounted for variability in activation from subject-to-subject, and used fixed effects analyses).

**Voxel-level statistic**

Fortunately, a random effects analysis can be easily effected by collapsing the data within subject and com- puting the statistic across subjects (Worsley et al., 1991; Holmes and Friston, 1999). In this case the result is a repeated measures *t* -statistic after proportional scaling global flow normalization: Each scan is proportionally scaled to a common global mean of 50; each subjects data is collapsed into two average images, one for each con- dition; a paired *t* -statistic is computed across the subjectsâ€™ â€śrestâ€ťâ€“â€śactiveâ€ť pairs of average images.

question 1) does this incorporation of random effect analysis is what is responsible for getting different results ( between Loretta and my code in Matlab)

question 2) how could I can include this correction of random effect in my code in Matlabâ€¦ How it is done â€¦

your comments on the above question would be greatly of great help. waiting eagerly for your response.

yours sincerely,

Ashish Gupta

Researcher Scholar,

Indian Institute of Technology