help > RE: Single subject pre/post treatment analysis
Nov 21, 2020  03:11 PM | Nabila BRIHMAT - Kessler Foundation
RE: Single subject pre/post treatment analysis
Dear Alfonso and other Conn-users,

I am interested in pre/post treatment single subject analysis( functional connectivity difference). I used the code mentionned above to create and visualize the between conditions p-unc and p-FDR maps. This code works very well thank you.

However, I was wondering what exactly do these p-FDR maps show? between condition functional connectivity difference ?or only their corresponding p-values?

Also, I am interested in creating corresponding spm T-maps to visualize the results, I used a part of a code mentionned in another post but I came across an error. Please find below the code and the resulting error. Any hint about this ? or the correct code to create spm T-maps please ?

d1=load('resultsROI_Subject001_Condition001.mat','DOF');
d2=load('resultsROI_Subject001_Condition002.mat','DOF');
se=sqrt(1/max(0,d1.DOF-3)+1/max(0,d2.DOF-3));
files=dir('BETA_Subject001_Condition001_Source*.nii');
sources=cellfun(@(x)sscanf(x,'BETA_Subject001_Condition001_Source%d.nii'),{files.name});
for source=sources
filenames=arrayfun(@(n)sprintf('BETA_Subject001_Condition%03d_Source%03d.nii',n,source),1:2,'uni',0);
a=spm_vol(char(filenames));
z=spm_read_vols(a); % fisher-transformed correlation values
mask=any(isnan(z),4)|all(z==0,4);
p=spm_Ncdf((z(:,:,:,2)-z(:,:,:,1))/se); % difference in correlations p-value
p=2*min(p,1-p); % two-sided p-values
p(mask)=nan;
filename=sprintf('p_corr_Subject001_Condition001vsCondition002_Source%03d.nii',source);
V=struct('mat',a(1).mat,'dim',a(1).dim,'fname',filename,'pinfo',[1;0;0],'n',[1,1],'dt',[spm_type('float32') spm_platform('bigend')]);
spm_write_vol(V,p);
p(:)=conn_fdr(p(:));
filename=sprintf('pFDR_corr_Subject001_Condition001vsCondition002_Source%03d.nii',source);
V=struct('mat',a(1).mat,'dim',a(1).dim,'fname',filename,'pinfo',[1;0;0],'n',[1,1],'dt',[spm_type('float32') spm_platform('bigend')]);
spm_write_vol(V,p);
filename=sprintf('T_SubjectSubject001_Condition001vsCondition002_Source%03d.nii',source);
a.descrip='SPM{T_[1e6]}';
spm_write_vol(a,spm_invTcdf(max(eps,min(1-eps,1-p)),1e6));
end

Scalar structure required for this assignment.
Error in Code_testSS_Tmaps (line 22)
a.descrip='SPM{T_[1e6]}';

Thanks you very much,
Regards,
Nabila

Threaded View

TitleAuthorDate
Helen Carlson Jun 5, 2014
Alfonso Nieto-Castanon Jun 7, 2014
Kaitlin Cassady Jun 26, 2015
Alfonso Nieto-Castanon Jun 28, 2015
RE: Single subject pre/post treatment analysis
Nabila BRIHMAT Nov 21, 2020
Johann Philipp Zöllner Jan 24, 2016
Alfonso Nieto-Castanon Jan 24, 2016
Kaitlin Cassady Jun 30, 2015
Alfonso Nieto-Castanon Jul 1, 2015
Kaitlin Cassady Jul 2, 2015
Alfonso Nieto-Castanon Jul 3, 2015
Kaitlin Cassady Jul 6, 2015