help > invalid contrast
Showing 1-4 of 4 posts
Display:
Results per page:
Jan 20, 2018  08:01 PM | kathrinw
invalid contrast
Hi,
I need some help in setting up P, please.
 
my SPM.xX.name looks like this:

% 'Sn(1) Congruent*bf(1)'
% 'Sn(1) INCongruent*bf(1)'
% 'Sn(1) Errors*bf(1)'
% 'Sn(1) Miss*bf(1)'
% 'Sn(1) x T'
% 'Sn(1) y T'
% 'Sn(1) z T'
% 'Sn(1) x R'
% 'Sn(1) y R'
% 'Sn(1) z R'
% 'Sn(1) constant'

this is what I have for P:
vname = {'F2_3mm_1.mat'}
 
%(imagine a subject and voi loop around it)
P.subject = list1(s).name;
P.directory = [usepp];
P.VOI = [usepp '\VOI_' vname{v} ];

P.Region = [vname{1}(1:6)'_gPPI']; 
P.analysis ='psy';
P.method ='cond';
P.extract ='eig';
 P.contrast = {'spmF_0001.nii,1'};
 P.Weights = [];
 P.WB=0
 P.Tasks = {'1' 'Congruent' 'INCongruent' 'Errors' 'Miss'};
P.Estimate = 1;
P.CompContrasts = 1;
P.Weighted = 0;
P.Contrasts(1).left = {'INCongruent'};
P.Contrasts(1).right = {'Congruent'};
P.Contrasts(1).STAT ='T';
P.Contrasts(1).Weighted = 0;
P.Contrasts(1).MinEvents = 1;
P.Contrasts(1).name ='IC_min_C_contrast';
PPPI(P);
 
1) I am unsure which file has to be entered in order for it to recognise the omnibus F test in  P.contrast, I tried several, none of them work without errors (e.g. 'spmF_0001.nii,1' or 'spmF_0001.nii', or 'ess_0001.nii'). Which one is it?
 
2) is my P.Tasks alright given the SPM.xX.name?
 
it does run, but also gives several warnings:
 
the favourite seems to be:
Valid Contrast
Warning: Missing conditions!!! Invalid Contrast
 
in the middle:
VOI has 3 voxels in 2.800000e+000x2.800000e+000x3 space. This is in the the same space as the input data and functional mask.
3) what does this mean and is this a problem indicating that I entered the wrong VOIs? If so, which one would be correct?

and at the end:
 
Moving Contrast Images
error moving contrast PPI_IC_min_C_contrast
 
the full log I am getting is:
Log File: 008_PPPI_1_20_2018.log
 
PPPI Version: 13.1.4-17-2014
 
 
Parameters used:
     Processing subject: 008
     VOI file          : C:\Users\kathrin\Documents\StroopReanalysis\data\PPIdata\008\VOI_F2_3mm_1.mat
     Output file will be: 008_F2_3mm_gPPI_session#_cond_PPI_regressors.txt
Valid Contrast
Warning: Missing conditions!!! Invalid Contrast
Invalid Contrast
Warning: Missing conditions!!! Invalid Contrast
Invalid Contrast
Valid Contrast
Warning: Missing conditions!!! Invalid Contrast
Invalid Contrast
Warning: Missing conditions!!! Invalid Contrast
Invalid Contrast
Valid Contrast
Warning: Missing conditions!!! Invalid Contrast
Invalid Contrast
Warning: Missing conditions!!! Invalid Contrast
Invalid Contrast
Valid Contrast
Warning: Missing conditions!!! Invalid Contrast
Invalid Contrast
Warning: Missing conditions!!! Invalid Contrast
Invalid Contrast
 ESS image  2                    :        ...written ess_0002.nii
 spm{F} image  2                 :       ...written spmF_0002.nii
 Saving SPM.mat                  :               ...SPM.mat saved
     Contrast          : Omnibus F-test for PPI Analyses
     Analysis          : Psychophysiological Interactions
     Extraction        : eigenvariate
     Tasks             : _1_Congruent_INCongruent_Errors_Miss
     Method            : Condition Specific

VOI has 3 voxels in 2.800000e+000x2.800000e+000x3 space

VOI has 3 voxels in 2.800000e+000x2.800000e+000x3 space. This is in the the same space as the input data and functional mask.

SPM12: spm_fMRI_design (v7210)                     20:01:27 - 20/01/2018
========================================================================
Saving fMRI design                      :               ...SPM.mat saved

SPM12: spm_fmri_spm_ui (v7018)                     20:01:27 - 20/01/2018
========================================================================
Mapping files                           :                        ...done
Calculating globals                     :                        ...done
Saving SPM configuration                :               ...SPM.mat saved
estimate_PPI.m

SPM12: spm_spm (v7120)                             20:01:34 - 20/01/2018
========================================================================

SPM12: spm_est_non_sphericity (v6913)              20:01:35 - 20/01/2018
========================================================================
Chunk   1/1                             :                        ...done
Temporal non-sphericity (78110 voxels)  :             ...ReML estimation
  ReML Block 1               
  ReML Iteration 1                      :        ...1.999186e+001 [+4.25]
  ReML Iteration 2                      :        ...2.053851e-001 [+4.50]
  ReML Iteration 3                      :        ...1.056071e-003 [+4.75]

SPM12: spm_spm (v7120)                             20:01:37 - 20/01/2018
========================================================================
Chunk   1/1                             :                        ...done
Spatial non-sphericity (over scans)     :                        ...done
Saving SPM.mat                          :                        ...done
Completed                               :          20:01:41 - 20/01/2018
Valid Contrast
Valid Contrast
 contrast image  1               :        ...written con_0001.nii
 spm{T} image  1                 :       ...written spmT_0001.nii
 contrast image  2               :        ...written con_0002.nii
 spm{T} image  2                 :       ...written spmT_0002.nii
 Saving SPM.mat                  :               ...SPM.mat saved
Moving Contrast Images
error moving contrast PPI_IC_min_C_contrast
error moving contrast PPI_IC_min_C_contrast
Moving Contrast Images
error moving contrast PPI_C_min_IC_contrast
error moving contrast PPI_C_min_IC_contrast
 
Jan 24, 2018  02:01 PM | kathrinw
RE: invalid contrast
Hi, I have pinned down the problem to the P.contrast input.
According to the manual this error (invalid contrast) is common with the F test as input and no reason to worry.

The question remains what is the preferred input here,
using 0 = no adjustments
or the F-test?
I found this: Adjustments remove the effect of the null space of the contrast.

Is this advisable? in my example, what would be the null space I am correcting for?

Thank you for taking the time,
Cheers,
kathrin
Jan 24, 2018  05:01 PM | Donald McLaren
RE: invalid contrast
Hi,

Yes. The error "Warning: Missing conditions!!! Invalid Contrast" simply means that it couldn't find the temporal or dispersion derivative terms. I should really fix the message and suppress it, but its not a high priority since it has no impact on the model or the toolbox.

I prefer to use the default 'Omnibus F-test for PPI Analyses'. This will remove any effects of non-task regressor in your model (e.g. motion, noise, etc.). This should give a better estimate of the underlying neural activity that is critical to the connectivity estimates.

In your model, it would remove the effect of motion parameters.

Best,
Donald
Jan 24, 2018  06:01 PM | kathrinw
RE: invalid contrast
Hi,
thank you very much for your help and the explanation!
Cheers,
kathrin