# What does fixelcfestats exactly do?

It would be greatly appreciated if you could kindly help me to understand how fixel-based analysis works especially in inferring significant between-group differences.

Here I have 5 questions.

(1) Is my understanding of the statistical workflow of fixel based analysis correct?

(step 1) smooth each fixel’s value (e.g. fiber density, fiber cross-section) based on fixel–fixel connectivity in each subject

(step 2) calculate fixel-wise t statistics by carrying out two-sample t-tests for each fixel separately, which makes an uncorrected p-value map

(step 3) enhance each fixel’s t value based on t values of connected fixels by using the equation (2) in your paper (Raffelt et al., 2015)

(step 4) permute fixel labels spatially and do the enhancement with the spatially permuted t values

(step 5) take spatially max t value for each iteration of the permutation to make the null distribution of enhanced t values

(step 6) threshold the original enhanced t map by using the null distribution (with a thresholding t value corresponding to p=0.05 based on the null distribution), which makes an FWE-corrected p-value map

(2) In the above-mentioned step 2, what kind of t-test is used? Is that parametric two sampled t-test? Or, non-parametric t-test similar to what FSL’s randomise uses?

(3) In step 2, does the GLM used for the test automatically include constant term? Or, should it be included in the design matrix? Or, is there any option such as FSL’s randomise’s -D option?

(4) We conducted two-sample t-tests for each fixel with MATLAB (by ttest2.m function), and compared the results with figures called ‘T-values’ produced by fixelcfestats. We found that the t-maps made by MATLAB are very different from those made by fixelcfestats. Do you know what makes such a difference?

(5) It’s not clear to me that what kind of permutation is conducted in step 4.

After reading your paper, we found the following description: ’ Here, complete images are permuted as a whole, preserving the complicated dependence structure, and the maximum is computed over all fixels’ test statistics after CFE (i.e. the CFE procedure is applied to the statistic image for every permutation, effectively becoming part of the definition of the test statistic, as for TFCE or for the smoothed-variance t-map described by Nichols and Holmes, 2002). ’ We could not find any more relevant information about the procedure corresponding to the process underlined. Could you please clarify how to make the permuted data?

Sincerely yours,
HKTH

Hi @HKTH,

(step 1) smooth each fixel’s value (e.g. fiber density, fiber cross-section) based on fixel–fixel connectivity in each subject

The fixel-fixel connectivity is calculated in template space, and is used to smooth the data from each subject that has already been transformed into the template space. Just to be clear that fixel-fixel connectivity is not calculated “in each subject”.

(step 4) permute fixel labels spatially and do the enhancement with the spatially permuted t values

No. The fixels themselves are not permuted. What is permuted (currently) is, within each fixel individually, the data between subjects. For each of the (default 5000) permutations, the order in which the values will be permuted is pre-calculated, and that permutation order is then applied individually to the data within each fixel in the template. In this manuscript, how the current MRtrix3 code code works is referred to as the “Shuffle-Y” method.

(step 6) threshold the original enhanced t map by using the null distribution (with a thresholding t value corresponding to p=0.05 based on the null distribution), which makes an FWE-corrected p-value map

Firstly, I would refer to the enhanced t-statistics when the subject data are not permuted as the “default permutation”; describing it as the “original” is slightly ambiguous.

Secondly, I wouldn’t describe it as a “thresholding”. Yes, theoretically you could find the enhanced t-statistic that corresponds to p=0.05 and apply a threshold to select only fixels with an enhanced t-statistic greater than that value, but that’s not what `fixelcfestats` actually does. The null distribution provides a mapping from enhanced t-statistic to FWE-corrected p-value: For each fixel in the template, the mapping counts the fraction of permutations for which the maximal enhanced t-statistic anywhere in the template was greater than the value observed in that fixel for the default permutation (i.e. no permutation). This fraction is the p-value; literally the likelihood of observing a value that large due to chance alone.

(2) In the above-mentioned step 2, what kind of t-test is used? Is that parametric two sampled t-test? Or, non-parametric t-test similar to what FSL’s randomise uses?

Non-parametric. See Equation 3 in the paper linked above (not exactly how it’s calculated in the code, but the outcome is the same).

In step 2, does the GLM used for the test automatically include constant term? Or, should it be included in the design matrix? Or, is there any option such as FSL’s randomise’s -D option?

Hmmm, I thought a note on this had been added to the Description section of the help pages of relevant commands, but it seems to have either disappeared or be only in a development branch. MRtrix3 does not automatically add a column of ones to the design matrix, as there are entirely reasonable hypotheses that require such a column to not be present. So you need to add such yourself if your experiment requires it. There is no equivalent to `randomise`'s `-D` option (apparently demeans both the data and the EVs); demeaning data is not necessary if you have a column of ones given it’s there specifically to model a non-zero mean (well technically the mean value when all EVs are zero, but I digress), and demeaning EVs can be done manually when constructing the design matrix if desired.

(4) We conducted two-sample t-tests for each fixel with MATLAB (by ttest2.m function), and compared the results with figures called ‘T-values’ produced by fixelcfestats. We found that the t-maps made by MATLAB are very different from those made by fixelcfestats. Do you know what makes such a difference?

The obvious source of difference will be the fact that `fixelcfestats` performs smoothing of the data; unless you are duplicating construction of the fixel-fixel connectivity matrix and performing data smoothing prior to the T-test, you won’t get the same result. Future software updates will better expose these steps for such tinkering (i.e. have the connectivity matrix itself, generate smoothed data outside of the `fixelcfestats` command), but that’s still a little way off.