help > ROI2ROI task modulation unaffected by pipeline
Jan 23, 2026  05:01 PM | shaiberman0 - ELSC, the Hebrew University of Jerusalem
ROI2ROI task modulation unaffected by pipeline

Hello, 


I'm a new user to this toolbox so forgive me if I've missed obvious documentation that answers my question.


I should also note that I've been running conn on an hpc so none of the process is done with the GUI.


I'm trying to test whether the connectivity between a pair of ROIs is modulated by my task condition (2 different conditions). I'm getting one marginal p value (0.08) and was wondering how affected it is by some preprocessing/modelling choices. 
- I tried smoothing vs not smoothing but that made 0 differnce on the final second level values (I think I did see documetation claiming roi2roi analysis will take raw data even given smoothing). 
- I also tried relaxing the confounds taken into account, but that made 0 difference on what I think are the final p-values, which I'm finding a bit confusing. 

My script uses the abtch structure to define the following:


for setup:



  • batch.Setup.structurals{subI}{1}=...

  • batch.Setup.functionals{subI}{runI} = ..

  • batch.Setup.confound.files{subI}{runI}=..




    • batch.Setup.confounds.dimensions = {5,5,6}; % or {5,5,12}

    • batch.Setup.confounds.deriv = {0,0,1}; % or {1,1,1} 

    • batch.Setup.confounds.names = {'White Matter','CSF','Motion'}




  • batch.Setup.condition.names = {'con1','con2'}

    • batch.Setup.conditions.onsets{conI}{subI}{runI} =..

    • batch.Setup.conditions.durations{conI}{subI}{runI} = ..



  • batch.Setup.rois.names = {'roiname1','roiname2'}

    • batch.Setup.rois.files{roiI,subI}=..

    • batch.Setup.roi.multiplelabels = 0



  • batch.Setup.preprocessing.steps = {'functional_smooth'}

    • batch.Setup.preprocessing.fwhm = 6 % or 0. I'm using preprocessed data and the only reason I added smoothing in the first place iis because when leaving preprocessing steps empty matlab tries to open a dialogue box which doesnot work on my server... 




for denoising:
* batch.Denoiding.filter = [0.008 Inf]; 


for analysis (first level?):





  • batch.Analysis.name = 1; %

  • batch.Analysis.type = 1; % ROI 2 ROI

  • batch.Analysis.measure = 1; % bivariate correlation

  • batch.Analysis.weight = 2; % HRF-weighted

  • batch.Analysis.modulation = 1; % gPPI

  • batch.Analysis.sources = {'roiname1','roiname2'};

  • batch.Analysis.conditions = {'con1','con2'};

  • batch.Analysis.overwrite = 'Yes';

  • batch.Analysis.done = 1;


for "results" (second level)





  • batch.Results.between_conditions.contrast = [1 -1]; % com1> con2

  • batch.Results.between_conditions.effect_names = {'con1','con2'};

  • batch.Results.between_sources.contrast = eye(2);

  • batch.Results.between_sources.effect_names = {'roi1','roi2'}

  • batch.Results.between_subjects.effect_names = {'AllSubjects'};

  • batch.Results.between_subjects.contrast = [1]; % one-sample t-test


Finally, to look at the results im loading ROI.mat inside the condition directory in the second level folder, and looking at [ROI(:).p].


Would appreciate advice letting me know whether it makes sense for the p values to remain the same even when varying the confounds (and if so why). Alternatively am I doing something wrong or looking at the wrong output? 

Many thanks,


Shai