help > PPI contrasts estimation problem
Showing 1-6 of 6 posts
Display:
Results per page:
Nov 12, 2015  02:11 AM | Ming-Ching Wen
PPI contrasts estimation problem
Dear Dr. McLaren:
   I was trying to run gPPI on one subject, but was given the following error message. The program then stopped but generated files named 'fMRI_VOI_5_-70_32_session1_cond_PPI_regressors.mat.' and ' SWM_VOI_5_-70_32_session1_cond_PPI_regressor.txt'. Please could you give me some pointers. Many tanks.
---------------------------------------------------------------------
VOI has 110 voxels in 2x2x2 space

VOI has 110 voxels in 2x2x2 space. This is in the the same space as the input data and functional mask.
Estimation Failed
PPI Contrasts were not estimated for some reason.
----------------------------------------------------------------------
Here is the set up details:

clear P
P.subject='fMRI';
P.directory=pwd;
P.VOI='/mnt/HZLHD1/Researcher/TCRP/Idata/TCRP004-1/Process/fMRI/concate/spm/1st_level/VOI_5_-70_32_mask.nii'
P.Region='VOI_5_-70_32';
P.Estimate=1;
P.contrast=0;
P.extract='mean';
P.Tasks={1,'encodingCor1','encodingCor3','encodingCor5','retenCor1','retenCor3','retenCor5','probCor1','probCor3','probCor5'};
P.Weightes=[];
P.maskdir='/mnt/HZLHD1/Researcher/TCRP/Idata/TCRP004-1/Process/fMRI/concate/spm/1st_level'
P.equalroi=1;
P.FLmask=0;
P.VOI2='/mnt/HZLHD1/Researcher/TCRP/Idata/TCRP004-1/Process/fMRI/concate/spm/1st_level/VOI_10_30_20_mask.nii';
P.analysis='psy';
P.method='cond';
P.ComContrasts=1;
P.Weighted=0;
P.ConcatR=0;
P.preservearcorr=0;
P.correct=1;

P.Contrasts(1).left{1}={'encodingCor1'};
P.Contrasts(1).right{1}={'none'};
P.Contrasts(1).STAT='T';
P.Contrasts(1).Weighted=0;
P.Contrasts(1).MinEvents=5;
P.Contrasts(1).name='encodingCor1';
P.Contrasts(2).left{1}={'encodingCor3'};
P.Contrasts(2).right{1}={'none'};
P.Contrasts(2).STAT='T';
P.Contrasts(2).Weighted=0;
P.Contrasts(2).MinEvents=5;
P.Contrasts(2).name='encodingCor3';
P.Contrasts(3).left{1}={'encodingCor5'};
P.Contrasts(3).right{1}={'none'};
P.Contrasts(3).STAT='T';
P.Contrasts(3).Weighted=0;
P.Contrasts(3).MinEvents=5;
P.Contrasts(3).name='encodingCor5';
P.Contrasts(4).left{1}={'retenCor1'};
P.Contrasts(4).right{1}={'none'};
P.Contrasts(4).STAT='T';
P.Contrasts(4).Weighted=0;
P.Contrasts(4).MinEvents=5;
P.Contrasts(4).name='retenCor1';
P.Contrasts(5).left{1}={'retenCor3'};
P.Contrasts(5).right{1}={'none'};
P.Contrasts(5).STAT='T';
P.Contrasts(5).Weighted=0;
P.Contrasts(5).MinEvents=5;
P.Contrasts(5).name='retenCor3';
P.Contrasts(6).left{1}={'retenCor5'};
P.Contrasts(6).right{1}={'none'};
P.Contrasts(6).STAT='T';
P.Contrasts(6).Weighted=0;
P.Contrasts(6).MinEvents=5;
P.Contrasts(6).name='retenCor5';
P.Contrasts(7).left{1}={'probCor1'};
P.Contrasts(7).right{1}={'none'};
P.Contrasts(7).STAT='T';
P.Contrasts(7).Weighted=0;
P.Contrasts(7).MinEvents=5;
P.Contrasts(7).name='probCor1';
P.Contrasts(8).left{1}={'probCor3'};
P.Contrasts(8).right{1}={'none'};
P.Contrasts(8).STAT='T';
P.Contrasts(8).Weighted=0;
P.Contrasts(8).MinEvents=5;
P.Contrasts(8).name='probCor3';
P.Contrasts(9).left{1}={'probCor5'};
P.Contrasts(9).right{1}={'none'};
P.Contrasts(9).STAT='T';
P.Contrasts(9).Weighted=0;
P.Contrasts(9).MinEvents=5;
P.Contrasts(9).name='probCor5';
Nov 12, 2015  02:11 AM | Donald McLaren
RE: PPI contrasts estimation problem
I believe that you mistyped some of the parameter. See inline responses below. After correcting the typos, please try re-running.

If you still get the error message, can you check to see if the program works with the test dataset provided on NITRC.

If the test dataset works and you only have 1 run of data, please do the following:

Assuming that you only have 1 run, then I would try the following after defining P.

cd(firsteveldirectory)
SPM=spm_estimate_PPI(P.subject,'SPM.mat',P.Region,P.method,P.analysis,P.CompContrasts,0,[],0,0);

This will help determine where the error is occurring.

As a side note, you should not concatenate the runs together. It messes up the the modeling.
Originally posted by Ming-Ching Wen:
Dear Dr. McLaren:
   I was trying to run gPPI on one subject, but was given the following error message. The program then stopped but generated files named 'fMRI_VOI_5_-70_32_session1_cond_PPI_regressors.mat.' and ' SWM_VOI_5_-70_32_session1_cond_PPI_regressor.txt'. Please could you give me some pointers. Many tanks.
---------------------------------------------------------------------
VOI has 110 voxels in 2x2x2 space

VOI has 110 voxels in 2x2x2 space. This is in the the same space as the input data and functional mask.
Estimation Failed
PPI Contrasts were not estimated for some reason.
----------------------------------------------------------------------
Here is the set up details:

clear P
P.subject='fMRI';
P.directory=pwd;
P.VOI='/mnt/HZLHD1/Researcher/TCRP/Idata/TCRP004-1/Process/fMRI/concate/spm/1st_level/VOI_5_-70_32_mask.nii'
P.Region='VOI_5_-70_32';
P.Estimate=1;
P.contrast=0;
P.extract='mean';
P.Tasks={1,'encodingCor1','encodingCor3','encodingCor5','retenCor1','retenCor3','retenCor5','probCor1','probCor3','probCor5'};
P.Weightes=[];
P.maskdir='/mnt/HZLHD1/Researcher/TCRP/Idata/TCRP004-1/Process/fMRI/concate/spm/1st_level'
P.equalroi=1;
P.FLmask=0;
P.VOI2='/mnt/HZLHD1/Researcher/TCRP/Idata/TCRP004-1/Process/fMRI/concate/spm/1st_level/VOI_10_30_20_mask.nii';
P.analysis='psy';
P.method='cond';
P.ComContrasts=1;
>>> Should be P.CompContrasts=1;
 
P.Weighted=0;
P.ConcatR=0;
P.preservearcorr=0;
>>> Should be P.preservevarcorr=0;

P.correct=1;

P.Contrasts(1).left{1}={'encodingCor1'};
P.Contrasts(1).right{1}={'none'};
P.Contrasts(1).STAT='T';
P.Contrasts(1).Weighted=0;
P.Contrasts(1).MinEvents=5;
P.Contrasts(1).name='encodingCor1';
P.Contrasts(2).left{1}={'encodingCor3'};
P.Contrasts(2).right{1}={'none'};
P.Contrasts(2).STAT='T';
P.Contrasts(2).Weighted=0;
P.Contrasts(2).MinEvents=5;
P.Contrasts(2).name='encodingCor3';
P.Contrasts(3).left{1}={'encodingCor5'};
P.Contrasts(3).right{1}={'none'};
P.Contrasts(3).STAT='T';
P.Contrasts(3).Weighted=0;
P.Contrasts(3).MinEvents=5;
P.Contrasts(3).name='encodingCor5';
P.Contrasts(4).left{1}={'retenCor1'};
P.Contrasts(4).right{1}={'none'};
P.Contrasts(4).STAT='T';
P.Contrasts(4).Weighted=0;
P.Contrasts(4).MinEvents=5;
P.Contrasts(4).name='retenCor1';
P.Contrasts(5).left{1}={'retenCor3'};
P.Contrasts(5).right{1}={'none'};
P.Contrasts(5).STAT='T';
P.Contrasts(5).Weighted=0;
P.Contrasts(5).MinEvents=5;
P.Contrasts(5).name='retenCor3';
P.Contrasts(6).left{1}={'retenCor5'};
P.Contrasts(6).right{1}={'none'};
P.Contrasts(6).STAT='T';
P.Contrasts(6).Weighted=0;
P.Contrasts(6).MinEvents=5;
P.Contrasts(6).name='retenCor5';
P.Contrasts(7).left{1}={'probCor1'};
P.Contrasts(7).right{1}={'none'};
P.Contrasts(7).STAT='T';
P.Contrasts(7).Weighted=0;
P.Contrasts(7).MinEvents=5;
P.Contrasts(7).name='probCor1';
P.Contrasts(8).left{1}={'probCor3'};
P.Contrasts(8).right{1}={'none'};
P.Contrasts(8).STAT='T';
P.Contrasts(8).Weighted=0;
P.Contrasts(8).MinEvents=5;
P.Contrasts(8).name='probCor3';
P.Contrasts(9).left{1}={'probCor5'};
P.Contrasts(9).right{1}={'none'};
P.Contrasts(9).STAT='T';
P.Contrasts(9).Weighted=0;
P.Contrasts(9).MinEvents=5;
P.Contrasts(9).name='probCor5';
Nov 12, 2015  04:11 AM | Ming-Ching Wen
RE: PPI contrasts estimation problem
Thanks for replying, Dr. McLaren:
   After correcting the two typos, I still faced the same error message, so tried this command (SPM=spm_estimate_PPI(P.subject,'SPM.mat',P.Region,P.method,P.analysis,P.CompContrasts,0,[],0,0) as you suggested. Below is the subsequent error. I'd appreciate your further comments/ help.

Mapping files                           :                        ...done
Calculating globals                     :                        ...done
Saving SPM configuration                :               ...SPM.mat saved
Design reporting                        : ??? Index exceeds matrix dimensions.

Error in ==> spm_DesMtx at 637
if size(rX,2)>1 && max([1,find(rPnames(1,:)=='(')]) < ...
Error in ==> spm_DesRep at 752
hDesMtxIm = image((spm_DesMtx('sca',varargin{2}.X,     Xnames) +
1)*32);
Error in ==> spm_fmri_spm_ui at 459
spm_DesRep('DesMtx',SPM.xX,fname,SPM.xsDes)
Error in ==> spm_estimate_PPI at 271
SPM = spm_fmri_spm_ui(SPM);
Nov 12, 2015  08:11 PM | Donald McLaren
RE: PPI contrasts estimation problem
I have not seen this error message before. It originates in one of SPMs core functions.

Can you compress the functional data, the first-level SPM.mat file and associated images and your Parameter structure?

Then I can test it on my local computer to see what is causing the error.
Nov 25, 2015  02:11 AM | Donald McLaren
RE: PPI contrasts estimation problem
I'm unable to replicate the issue on my location computer with SPM12.

I would suggest removing the VOI directory and re-running this subject.

Does this happen on other subjects?
Nov 26, 2015  04:11 AM | Ming-Ching Wen
RE: PPI contrasts estimation problem
Hi Dr. McLaren:
   After removing the brackets on the right side of P.contrast, the script can work on multiple subjects now.
   Thanks for looking into this!