I understand how to run those functions but would these functions use the dataset read by "cosmo_fmri_dataset" , not the nii file itself?
Dear experts,I am new to CoSMoMVPA and have completed RSA searchlight analyses at each participant level based on many useful examples and this group discussion.But, I am not sure how can I prepare the dataset for group analysis.If my understanding is correct, I think I should stack the data came from first analyses (e.g., sub1_RSM.nii, sub2_RSM.nii....) .When reading many examples and Q&A, I think I should use "cosm_stack" and, if necessary, "cosmo_mask_dim_intersect".I understand how to run those functions but would these functions use the dataset read by "cosmo_fmri_dataset" , not the nii file itself?How can I adjust the results(i.e., the nii files) that came from first-level analyses?It may be a basic question but I really appreciate any advice that you have--
You received this message because you are subscribed to the Google Groups "CoSMoMVPA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cosmomvpa+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/cosmomvpa/6256c4d5-d507-4976-92eb-dbd122ac39e7n%40googlegroups.com.
After stacking the dataset(the nifti files), I think I should use cosmo_map2fmri (i.e., stack_nifti = cosmo_map2fmri (ds_stack,'nii')) to return the nifti file. Is it correct?
I have one more question about the whole brain mask file in dataset for group analysis.
Which mask should I use?
Should I also stack all of the participants' binary mask files?
To view this discussion on the web, visit https://groups.google.com/d/msgid/cosmomvpa/f1b2aada-4846-44f1-b6cf-4a3836a70b17n%40googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/cosmomvpa/cf318569-e4e5-4d36-abd6-b2ab368c34bdn%40googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/cosmomvpa/9f64dd30-7edc-4adb-b948-8c0edc42a67dn%40googlegroups.com.
% get your masked map
% it should have only zeros and ones (for voxels that survived staistical test)
ds = cosmo_fmri_dataset('spmT_0010_masked.nii');
% get neighbors for each voxels
nh=cosmo_cluster_neighborhood(ds_masked);
% convert to matrix (for cosmo_clusterize)
nh_mat=cosmo_convert_neighborhood(nh,'matrix');
% find clusters
cl=cosmo_clusterize(ds_masked.samples,nh_mat);
% number of clusters
ncl = length(cl);
% get size of each cluster and sort them
[ncl_sorted, ind_sorted] = sort(cellfun(@numel, cl), 'desc');
% plot cluster size
figure; bar(ncl_sorted);ylabel('# Voxels');xlabel('Clusters');
% order clusters
cl = cl(ind_sorted);
% get the values of the biggest cluster
ds_unmasked(cl{1})
To view this discussion on the web, visit https://groups.google.com/d/msgid/cosmomvpa/42bd551f-20fd-42a8-b850-3af9d7e1a93en%40googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/cosmomvpa/42bd551f-20fd-42a8-b850-3af9d7e1a93en%40googlegroups.com.