Using montecarlo cluster stat.
I have an experiment where I am decoding 5 stimuli classes (different auditory frequencies) in surface space (10 subjects; ld = 16). I obtained null distribution for each subject after decoding shuffled labels in 100 permutations, and bootstrapping 1000 values per subject to generate the null distribution for group statistical comparison at p = 0.01 (99 % upper bound in my null distribution). This way I can filter out those accuracies below the 99% threshold. The limitation is that I am not correcting for multiple comparisons and I am not taking into account cluster size in my analyses (I found some small clusters of 1 or 2 nodes that I do not know if these are noise or signal, possily a cluster level threshold might help to resolve this).
Thus, I am applying the cosmomvpa function comos_montecarlo_cluster_stat to perform the bootstrapping and cluster analyses together, however I am obtaining Z values maps that do not correspond at all with the maps I generated using only the permutation and bootstrapping procedure mentioned above.
I am going to explain what I am doing, I hope someone has patient enough to check if I am doing something wrong.
First of all, I created a ds variable with 10 chunks (10 subjects), and the samples are [number of subjects features] -> [10 5124] (see at the end of this email the cosmo_disp(ds) output)
To calculate the surface neighborhoods I load the inflated surface of one subject as follows:
[v_inf,f_inf] = surfing_read(inflated_fn);
opt.vertices = v_inf;
opt.faces = f_inf;
nh = cosmo_cluster_neighborhood(ds,'progress',false,opt);
then,
I set the options for the comos_montecarlo_cluster_stat :
opt=struct();
opt.cluster_stat='tfce'; % Threshold-Free Cluster Enhancement;
opt.niter=1000;
opt.h0_mean=0.2; %1/5 classes
and I run the function:
z_ds=cosmo_montecarlo_cluster_stat(ds,nh,opt);
In the end, most of the z are 0. This is the z values histogram that I am obtaining
Does this makes sense to you? I think that I am doing something wrong.
Additionally, I am trying to use my 100 permutation null distributions with the cosmo_montercarlo function
To do that, I create a cell variable called
null_data{n_subjects} = [100 5124]
and I add this to the previous opt structure:
opt.null = null_data
and then I run again
z_ds=cosmo_montecarlo_cluster_stat(ds,nh,opt);
Cosmomvpa reports:
"Error using cosmo_montecarlo_cluster_stat>check_null_datasets (line 505)
1-th null dataset: not a valid dataset"
I have tried different options but I think that I am missing something in the structions..
Here I show you what is the ds format
cosmo_disp(ds)
.a
.fdim
.labels
{ 'node_indices' }
.values
{ [ 1 2 3 ... 5.12e+03 5.12e+03 5.12e+03 ]@1x5124 }
.fa
.node_indices
[ 1 2 3 ... 5.12e+03 5.12e+03 5.12e+03 ]@1x5124
.center_ids
[ 1 2 3 ... 5.12e+03 5.12e+03 5.12e+03 ]@1x5124
.samples
[ 0.1 0.0667 0.2 ... 0.167 0.333 0.2
0.267 0.1 0.3 ... 0.133 0.233 0.133
0.133 0.167 0.333 ... 0.267 0.2 0.233
: : : : : :
0.333 0.2 0.167 ... 0.233 0.133 0.2
0.2 0.367 0.267 ... 0.133 0.167 0.133
0.167 0.3 0.267 ... 0.267 0.3 0.167 ]@10x5124
.sa
.targets
[ 1
1
1
:
1
1
1 ]@10x1
.chunks
[ 1
2
3
:
8
9
10 ]@10x1
Thanks!
alex