Print

Print


Thank you very much Anderson, this is very helpful!
Lizanne


From: FSL - FMRIB's Software Library [[log in to unmask]] on behalf of Anderson M. Winkler [[log in to unmask]]
Sent: Wednesday, April 06, 2016 12:39 AM
To: [log in to unmask]
Subject: Re: [FSL] PALM error and permutations

Hi Lizanne,

Please see below:

On 5 April 2016 at 13:51, Schweren, Lizanne <[log in to unmask]> wrote:
Dear FSL experts, 

I'm experiencing two problems running PALM (on a concatenated bvars file converted to .nii) in matlab. I've attached my design.mat (.txt to send trough email), tcontrast_1vs234_int.con, and group.grp files. The palm command (5 permutations just for testing) is this: 

First thing: the design is rank deficient: you can remove EVs 2 and 4 and it won't affect the results. This isn't the cause for the errors, though.
 

Problem 1: 
I want to know whether there is a difference between patients and controls (contrasts C1 and C2). These are not one-sample t-tests, yet PALM says only 1 permutation is possible. 

Number of possible permutations is 1.
Generating 1 shufflings (permutations only).
Building null distribution.
10% [Design 1/1, Contrast 1/10, Shuffling 1/1, Modality 1/1]

Why is this? And how can I solve it?

Given the group.grp file, all the permutations will happen within group, but in this design supplied, all observations within a group have the same values for the two relevant EVs (EV5 and EV6), such that there is nothing to be permuted. To address this, and if all groups have exactly the same size, i.e., all of them with exactly two observations, then you can add the options "-whole" together with "-within", such that permutations will happen within block, and also the blocks as a whole will be shuffled.

However, on a quick skim I can see this isn't the case. This means that to respect exchangeability you will need to use multi-level block permutation, by preparing and supplying a file with multiple columns. There are instructions in this page. See also this paper.

 

Problem 2: 
I want to know whether there is a difference between the age-slope of patients and the age-slope of controls (contrasts C9 and C10). C9 runs just fine, but strangely C10 doesn't. I get the following error: 

82% [Design 1/1, Contrast 9/10, Shuffling 1/5, Modality 1/1]
Saving file: /home/mrphys/lizsch/shape/data/r.gp/1vs234_int/palm_vox_tstat_c9
Error using betainc
X must be in the interval [0,1].

Error in palm_gcdf (line 63)
        gcdf(ig) = betainc(1./(1+G(ig).^2./df2(ig)),df2(ig)/2,.5)/2;

Error in palm_gtoz (line 69)
        Z(~idx) = -erfcinv(2*palm_gcdf( G(~idx),1,df2(~idx)))*sqrt(2);

Error in palm_core (line 1473)
                            G{y}{m}{c} = palm_gtoz(G{y}{m}{c},plm.rC0{m}(c),df2{y}{m}{c});

Error in palm (line 80)
palm_core(varargin{:});

Error in r_run_palm_all (line 7)
addpath(genpath('/home/mrphys/lizsch/Desktop/palm-alpha72'));palm -i /home/mrphys/lizsch/shape/data/r.gp/1vs234_int/r.gp.nii -m
/home/mrphys/lizsch/shape/data/r.gp/1vs234_int/r.gp.mask.nii -o /home/m 

I've tried ordering them the other way around, but then C9 (that was previously C10) crashes. I've also tried taking out all other contrasts, moving them to a different folder, removing all files, starting again from scratch, etc. Nothing worked. I hope you can help me.

I can't reproduce this error using random noise as input, but also I note that you're using a fairly old version and this command has changed recently. If you could, please, update to the most recent version, and if the problem persists, please feel free to post again.

Also, the issue is in C9, as C10 doesn't actually start.

All the best,

Anderson


 

Thank you again, you're help is very much appreciated!

All my best,
Lizanne