Thanks - that does answer my original question.

However, I do have the following concerns about this approach.

Suppose XN is the nuisance-only model and rN are the nuisance-only residuals formed after fitting XN to data. Then

(1) Elements of vector rN - rN(1),rN(2),..etc. are not independent.

(2) Further, elements of rN have non-constant variance under the nuisance-only model (null hypothesis).

Given (1) and (2), how do you justify the permutation of "raw" residuals rN?

It seems like (2) is easily corrected as follows:

If, H = XN * inv(XN^T XN) * XN^T then if we transform the residuals

rN_modified(k) = rN(k) / sqrt(1 - H(k,k))

then elements of rN_modified will have the same variance under the null hypothesis. ( Elements of rN_modified are still not independent. )

I would have thought that rN_modified would be used for permutation. What are your thoughts on this?

Thanks,

Hans.

On Thu, Jul 2, 2009 at 3:39 PM, Thomas Nichols <[log in to unmask]> wrote:

Dear Hans,

Yes, I can confirm, the "raw" residual from the nuisance-only model is not modified in any way... it is simply permuted before having the nuisance effect added back on.

Does this clarify things?

-Tom--On Thu, Jul 2, 2009 at 4:18 PM, Hans Tissot <[log in to unmask]> wrote:

Dear Jesper,Thanks for the reply. It does seem pretty straightforward. However, the devil is often in the details.So to summarize your point -(1) Let the residual vector for a voxel be r = [r_1,r_2,...r_n](after fitting the null only model, n = timepoints in the model)(2) This "raw" residual vector r is permuted. It is *not* modified or standardized in any fashion before permuting.Is that accurate?Thanks,Hans.On Thu, Jul 2, 2009 at 11:02 AM, Jesper Andersson <[log in to unmask]> wrote:

Dear Hans,I'm no expert on randomise, but is seems pretty straightforward to me.Thanks, but I am interested in a more detailed answer about exactly how the residuals are permuted :). Here's my question again for reference:---I have a question regarding randomise residuals. As per my understanding randomise fits the null model only to the data and calculates null only residuals. Then it permutes these null only residuals and adds them back onto the fitted null model to create realizations of null data. My question is:Are these null only residuals modified (or standardized) in any way before permuting them? If so, exactly how?Let's say you have a model with two groups and age as a covariate, and that your contrast happens to be [1 0], i.e. you are interested in effects of group after affects of age have been removed.By virtue of you contrast not spanning the age regressor randomise can identify it as a "confound" and regress out all effects of age. What is left is the residuals, i.e. that which in our model can be explained either by group or not at all. randomise will the permute these residuals (equivalent to permuting the group indicators), for each permutation fitting the GLM to all voxels and calculating the t-statistic. Depending on your inference it may then save away maximum voxel, maximum cluster size etc, thus building an empirical distribution of that statistic.I hope this is clear?Good Luck Jesper---Thanks,Hans.

On Thu, Jul 2, 2009 at 10:48 AM, Matthew Webster <[log in to unmask]> wrote:Hello Hans,

Randomise separates the input model into tested and nuisance effects, the input data is adjusted for the nuisance effects and this adjusted data is then fitted to the full permuted model..

Many Regards

Matthew

Hi FSL experts,

I have a question regarding randomise residuals. As per my understanding randomise fits the null model only to the data and calculates null only residuals. Then it permutes these null only residuals and adds them back onto the fitted null model to create realizations of null data. My question is:

Are these null only residuals modified (or standardized) in any way before permuting them? If so, exactly how?

Thanks,

Hans Tissot.

____________________________________________

Thomas Nichols, PhD

Director, Modelling & Genetics

GlaxoSmithKline Clinical Imaging Centre

Senior Research Fellow

Oxford University FMRIB Centre