Hi Pablo,

It seems some voxels are present in just very few subjects. In the case of the error it seems just 2 subjects had data. Since the bare minimum for the design is 2 EVs (for the three groups, and even so after mean-centering the data), this gives no margin for the analysis.

You can still try a step back and replace the full design (discussed in the other email a few days ago) for subtractions. But before spending time writing a script to subtract the 3 possible pairs of the 3 images for each subject, consider this simple experiment with your data: take just 1 image per subject (say, just timepoint 1), and run a simple 3-group comparison, and use the setup_masks to mask the lesions out and see if randomise works for you. If it does, and if the masks are the same for the three timepoints of each subject, then you can do the subtractions.

Otherwise, you may need to consider other strategies, e.g., dropping completely certain brain regions that are in just a few subjects, using instead an overall mask (option -m in randomise).

Another point to consider is that setup_masks shouldn't be used when it can cause dramatic differences in the degrees of freedom across the brain (that is, some voxels with tiny df, whereas others with comfortable df). Although the test is non-parametric, and does not depend on the df for the uncorrected p-values, the statistic still needs to behave similarly across tests (it has to be pivotal), and with the df varying too much across space, this property will be lost, thus affecting the correction for multiple testing (it can go either way: more conservative or invalid). It can also be harmful to TFCE.

All the best,

Anderson


On 8 September 2015 at 15:16, Pablo Ripolles <[log in to unmask]> wrote:
Sorry, it seems I messed up with the spaces in the previous post:

I am doing a TBSS analysis with stroke lesions. I have modified the TBSS pipeline to take into account the lesions during registration and everything was fine. Now I want to run randomise and would like to take into account the lesions during the analysis. I have followed the guidelines (http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/Randomise/UserGuide#Lesion_Masking) to generate the appropiate images to be used with the --vxf option.
I have a complex  3 (Group) x 3 (Time) model with 32 patients and thus my design matrix has 38 Evs (2 for each group and 32 for each patient). After doing setup_masks I get new .mat and .con files in which 96 more EVs (1 per each mask) have been added, to a total of 134 EVs. Both files look fine. I then run rundomise following the example that is shown after setup_masks ends:

randomise -i all_FA_skeletonised -o FA_Inter -m mean_FA_skeleton_mask -d MaskCorrected.mat -t MaskCorrected.con  --vxl=39,40,41,42,43.....(goes on until 134)...133,134 --vxf=MaskCorrected_0039,MaskCorrected_0040...(goes on until 134)...MaskCorrected_0133,MaskCorrected_0134   -f ftests.fts -e EB.grp --T2 -n 5000

And then the following error appears:

Loading voxelwise ev: Amusia_MaskCorrected_0132 for EV 132
Loading voxelwise ev: Amusia_MaskCorrected_0133 for EV 133
Loading voxelwise ev: Amusia_MaskCorrected_0134 for EV 134
Data loaded
ERROR: Program failed

An exception has been thrown
Logic error:- detected by Newmat: Want no. Rows >= no. Cols

MatrixType = Rect   # Rows = 96; # Cols = 132
Trace: SVD.

I have checked several times the .con and .mat files and they look OK. I have created my own files from scratch using Cream and Gedit (in case it had something to do with the editor) and converted them with Text2Vest and I still get the same error. I have been with this for days and I am totally clueless. Funny thing, if I run randomise but without the -f and -e options, the error is the same but instead of # Cols = 132 it shows # Cols = 133. I have tried to fill the .con and .mat with both spaces and \t but still get the same error. If I use the plain model without the 96 extra EVs and the run regular randomise, the program works without errors.I am using FSL 5.0.8 and Ubuntu 14.04 LTS. I am attaching the .con and .mat images just in case. If anyone could give a little help it would be very much appreaciated.
Best